Closed daniellavoie closed 2 years ago
So it seems like it is well known that 1.18
requires more memory out of the box.
The default behaviour for not setting -Xmx
through the MEMORY
will only assign 25% of the available container memory to the Heap.
[Global flags]size_t MaxHeapSize = 251658240 {product} {ergonomic}
double MaxRAMPercentage = 25.000000 {product} {default}
I would successfully run 1.17
with a 512mb
MEMORY
value and 1GB of container limit .
With 1.18
, 512mb
of heap is clearly not enough. 1GB runs fine (but still need ~350mb headroom within the container).
My conclusion is that the MEMORY should still be kept as a mandatory configuration and should not be deprecated in the future. If MEMORY
is not specified, 1.18
requires at least 3GB memory when only 25% will be used. This feels like a waste.
I already talk about this behavior in the memory section. What do you recommend to help further?
https://github.com/itzg/docker-minecraft-server#:~:text=To%20let%20the,general%20best%20practice.
You are absolutely right. Didn't see the specific mention about default behaviour being already documented. Good stuff!
The reason I shared my concerns is because I've came across the description of #742 mentioning future deprecation of MEMORY
env variable. I just hope it isn't considered in the future.
Describe the problem
According to the latest release note, #742 lets java caculcate heap memory limits by itself thanks to latest JVM optimization goodness.
That said, I'm under the impression that this is not a good behaviour since I have the feeling minecraft does non heap stuff which overlaps with the the default memory calculation.
Prior to
itzg/minecraft-server:java17
, I would setMEMORY
to half of my container memory limits so I could leave breathing room for non heap.My conclusion is that we shouldn't deprecate
MEMORY
given that default JVM heap sizing doesn't cope well with a standard 1GB container limit.Container definition
Container logs