Can't change RAM allocation or the server wont start up.
I have bought a new raspberry pi with more ram and want to allocate more ram to the server.
I cannot change the ram allocation in the startup script or the server wont boot at all and the terminal opens and closes instantly.
I cant even allocate 1gb more to it (from 1.5 to 2 or 3) just the exact ram.
cd /home/pi/Desktop/PaperMC
java -Xms6G -Xmx6G \
-XX:+UseG1GC -XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=20 \
-XX:G1MaxNewSizePercent=30 -XX:G1HeapRegionSize=4M \
-XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 \
-XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 \
-XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 \
-XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 \
-Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true \
-jar paper-1.20.1-52.jar nogui
pause
Are my startup scripts.
If I change java -Xms6G -Xmx6G \ into java -Xms1024M -Xmx1536M \ it does work.
I cannot do 4G or higher even thought it should be able to
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
2 Replies
Thanks for asking your question!
Once you have finished, please close your thread.
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
command to close
/close
!close
!solved
Requested by n8mr#0
I think I found the problem, the raspbian 32bit can only allocate max 4gigabyte of ram so if I upgrade it to the 64bit version it should work properly.