mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 14:24:28 +00:00
docs: Clarify MEMORY limits vs overall container memory
Related to #691
This commit is contained in:
parent
37cad3f255
commit
c6ff80b71c
1 changed files with 7 additions and 8 deletions
15
README.md
15
README.md
|
@ -1099,19 +1099,18 @@ is passed to `docker run`.
|
|||
|
||||
### Memory Limit
|
||||
|
||||
By default, the image declares a Java initial and maximum memory limit of 1 GB. There are several
|
||||
ways to adjust the memory settings:
|
||||
By default, the image declares an initial and maximum Java memory-heap limit of 1 GB. There are several ways to adjust the memory settings:
|
||||
|
||||
- `MEMORY`, "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`)
|
||||
memory settings of the JVM
|
||||
- `INIT_MEMORY`, independently sets the initial heap size
|
||||
- `MAX_MEMORY`, independently sets the max heap size
|
||||
- `MEMORY`: "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`) memory heap settings of the JVM
|
||||
- `INIT_MEMORY`: independently sets the initial heap size
|
||||
- `MAX_MEMORY`: independently sets the max heap size
|
||||
|
||||
The values of all three are passed directly to the JVM and support format/units as
|
||||
`<size>[g|G|m|M|k|K]`. For example:
|
||||
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`. For example:
|
||||
|
||||
-e MEMORY=2G
|
||||
|
||||
> NOTE: 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).
|
||||
|
||||
### JVM Options
|
||||
|
||||
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
|
||||
|
|
Loading…
Reference in a new issue