x4e / PaperBin

An experiment at improving the performance of PaperMC
Other
96 stars 8 forks source link

Java 15 using ZGC and large pages #23

Closed comendantmc closed 3 years ago

comendantmc commented 3 years ago

It doesn't seem to be working. Here is my start command:

java -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -Xms16G -Xmx16G -XX:+UseLargePages -agentpath:/home/user/lab/PaperBin/nativeloadhook/target/release/libJvmClassHook.so -jar PaperBin.jar cache/patched_1.12.2.jar -o true

And here is what I get (I have ~27G of free RAM):

Paperbin Agent Loaded
[0.024s][error][gc] Failed to commit memory (Not enough space)
[0.024s][error][gc] Failed to commit memory (Not enough space)
[0.024s][error][gc] Failed to commit memory (Not enough space)
[0.024s][error][gc] Failed to commit memory (Not enough space)
[0.024s][error][gc] Failed to commit memory (Not enough space)
[0.024s][error][gc] Failed to commit memory (Not enough space)
[0.024s][error][gc] Failed to commit memory (Not enough space)
[0.024s][error][gc] Failed to commit memory (Not enough space)
[0.024s][error][gc] Failed to commit memory (Not enough space)
[0.024s][error][gc] Failed to commit memory (Not enough space)
[0.024s][error][gc] Failed to commit memory (Not enough space)
[0.024s][error][gc] Forced to lower max Java heap size from 16384M(100%) to 0M(0%)
[0.024s][error][gc] Failed to allocate initial Java heap (1024M)
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
x4e commented 3 years ago

This does not seem like a problem with PaperBin (If it does not occur when you run without PaperBin then please let me know). I will therefore close the issue.

This looks like perhaps you do not have large pages setup? If you use -XX:+UseLargePages you first have to setup large pages on your operating system. This is a good guide if you need to set them up: https://www.redhat.com/en/blog/optimizing-rhel-8-run-java-implementation-minecraft-server (Look at the Memory section).

comendantmc commented 3 years ago

My bad, I didn't know I need to setup this. Thanks for letting me know