mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 06:14:14 +00:00
docs: described using MaxRAMPercentage when MEMORY is unset
This commit is contained in:
parent
ecee4069f1
commit
81994ec3b3
1 changed files with 3 additions and 1 deletions
|
@ -1288,7 +1288,9 @@ The values of all three are passed directly to the JVM and support format/units
|
|||
|
||||
-e MEMORY=2G
|
||||
|
||||
> To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`.
|
||||
To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`. By default, the JVM will use 25% of the container memory limit as the heap limit; however, as an example the following would tell the JVM to use 75% of the container limit of 2GB of memory:
|
||||
|
||||
-e MEMORY="" -e JVM_XX_OPTS="-XX:MaxRAMPercentage=75" -m 2000M
|
||||
|
||||
> The settings above only set the Java **heap** limits. Memory resource requests and limits on the overall container should also account for non-heap memory usage. An extra 25% is [a general best practice](https://dzone.com/articles/best-practices-java-memory-arguments-for-container).
|
||||
|
||||
|
|
Loading…
Reference in a new issue