Reduce ram usage? or at least not be at 100%

Hi, I rent/bought a server from heavynode, the specs are 5 threads of an AMD 7950x & 20gb ddr5 memory, and it's using Pterodactyl Control Panel. render distance is 11 and simulation distance is 6 The memory usage starts at about 30% when the server boots, then steadily climbs up to 100% over the next few hours before the daily restart sets it back to 30% again. The server is running fabric 1.20 I have anywhere from 5-25 people online at a time current installed mods: Dynmap Cloth-config Simple voice chat Fabric api lithium krypton ferritecore memoryleakfix simple_end_disable vanish MCDiscordChat Ledger Fabric Language Kotlin the server startup command/s are:
java -Xms128M -Xmx20480M -Dterminal.jline=false -Dterminal.ansi=true -jar fabric-server-launch.jar
java -Xms128M -Xmx20480M -Dterminal.jline=false -Dterminal.ansi=true -jar fabric-server-launch.jar
(This is how it came, I have not edited this) it's running on java 18 (NOT Java 18 OpenJ9) (I have the option to change this to 8/11/16/17) Sometimes the server will just crash out of nowhere, usually its due to "out of memory" but sometimes i can't find a crash reason, and it also does not create crash reports, i am unsure why my settings for dynmap are vlowres, i have deleted the cave and surface map for the overworld so it has to render less, i also pause it at the beginning of server start so it doesnt render anything at all, I have not touched any configs for lithium or ferritecore. It's possible that i have too many "optimization" mods? or maybe i need to add more JVM arguments, I really do not know. any help really appreciated. ask any and all questions and i will do my best to help provide what you need
43 Replies
Admincraft Meta
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 grimcyanide#0
applesauce
applesauce2y ago
iirc memoryleakfix causes a memory leak
Grim
GrimOP2y ago
thats ironic
applesauce
applesauce2y ago
also you should install starlight free performance with no downside
Grim
GrimOP2y ago
yes, ive been meaning to, always forget
ProGamingDk
ProGamingDk2y ago
dont give mc 20 gb honestly give it max1 6 max 16* and leave some for overhead
GiannisD
GiannisD2y ago
I suggest using up to xnx17408M cause you also have an operation system and a panel to run too not only Minecraft
Grim
GrimOP2y ago
So im paying for 20 but should only use 16?
GiannisD
GiannisD2y ago
at this point it could crash the hole system for better stability also there's an os under the hood not only Minecraft
ProGamingDk
ProGamingDk2y ago
hes not using a vps
GiannisD
GiannisD2y ago
the os and pterodactyl also need ram
Grim
GrimOP2y ago
👍🏻
ProGamingDk
ProGamingDk2y ago
heavynode is a mc host
GiannisD
GiannisD2y ago
still the same it's a vm
ProGamingDk
ProGamingDk2y ago
yes. but ur explanation of why is wrong u want overhead for jvm not panel or os
GiannisD
GiannisD2y ago
if the machines ram is 20gb there are other processes that need ram that's why I said give it 17gbs cause most Linux os use at idle around 300-2000mbs of ram
ProGamingDk
ProGamingDk2y ago
but ur not dealing with the machine its just the jvm
Grim
GrimOP2y ago
ok, so ive got it set to
java -Xms128M -Xmx16384M -Dterminal.jline=false -Dterminal.ansi=true -jar {{SERVER_JARFILE}}
java -Xms128M -Xmx16384M -Dterminal.jline=false -Dterminal.ansi=true -jar {{SERVER_JARFILE}}
now, that look good?
ProGamingDk
ProGamingDk2y ago
looks fine' pterodactyl uses alpine instances
ProGamingDk
ProGamingDk2y ago
No description
ProGamingDk
ProGamingDk2y ago
(alpine)
GiannisD
GiannisD2y ago
didn't know what os it was running on
snowznz.bak
snowznz.bak2y ago
can you use aikar flags?
snowznz.bak
snowznz.bak2y ago
flags.sh
flags.sh
A simple script generator to start your Minecraft servers with optimal flags.
Grim
GrimOP2y ago
im really not sure.
Grim
GrimOP2y ago
all i get is this
No description
snowznz.bak
snowznz.bak2y ago
so you have a 20gb server?
Grim
GrimOP2y ago
yes
snowznz.bak
snowznz.bak2y ago
and how much ram does it usually use
Grim
GrimOP2y ago
100% after a few hours, it only goes up, never down. it starts at 30% on server launch
snowznz.bak
snowznz.bak2y ago
how many players?
Grim
GrimOP2y ago
usually 5-25. depends on time of day
snowznz.bak
snowznz.bak2y ago
fuck use these flags
java -Xms16G -Xmx16G --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -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 -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15 -jar {{SERVER_JARFILE}} --nogui
java -Xms16G -Xmx16G --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -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 -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15 -jar {{SERVER_JARFILE}} --nogui
also use java 17 unless any of the mods require java 18
Grim
GrimOP2y ago
will try both these, thanks
snowznz.bak
snowznz.bak2y ago
also download this plugin and run the profiler to see what is using the most resources https://spark.lucko.me/
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
❌ Processing Error
The bot cannot process this Spark profile. Please use an alternative Spark profile.
Requested by eqzy#0
Grim
GrimOP2y ago
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Fabric
Requested by grimcyanide#0
Grim
GrimOP2y ago
it keep saying im using only 10/16.5 gb but the pteradactyl control panel says im at 91% ad hasnt changed or gone down in a long time
ProGamingDk
ProGamingDk2y ago
Panel shows reserved and not actual usage Also remove alwayspretouch It causes oom issues on pterodactyl panel
Grim
GrimOP2y ago
okay, removed it, suppose i should do a restart
ProGamingDk
ProGamingDk2y ago
Yes
Grim
GrimOP2y ago
right, done that

Did you find this page helpful?