Allocating Minecraft server ram????

H. Finner

Distinguished
Oct 16, 2014
175
0
18,710
(SOLVED)!!!!!
Hi! I've run multiple Minecraft servers before and completely understand how to allocate ram and use a bat file to do it, but every way I've tried, I've never been able to get the server to stay between the Xms and the Xmx... (ex.) Xms is set to 4 gigs while the xmx is set to 8 gigs but the server only runs 1500mb (1.5GB) can someone explain why it won't go up to the minimum it's supposed to be using??? Please do not answer with a template of how to allocate ram, I just want a straightforward answer... Should it be staying between the minimum and maximum that I set the ram to? Thanks.
 
Solution
I have found a solution!!!!!!!!!!!!
I found this JVM Argument to apply to my run.bat file for my server and the server can now run all mods butter smooth and there is no hit register or block lag...

java -server -Xms1024M -Xmx2048M -XX:parallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -jar forge-1.10.2-12.18.3.2281-universal.jar nogui

ParallelGCThreads=(amount of cores you want server to take)
And the other stuff is basic except for -XX:+UseConcMarkSweepGC -XX:+UseParNewGC which are BOTH VERY IMPORTANT!
And most of all, nogui is one of the best server factors to have even though it seems like having another window telling you tick time, player count, and ram usage is nice, disabling it with nogui will vastly increase...

genthug

Honorable
If it only needs to use 1.5, it only needs to use 1.5. Why would you want it eating another 2.5gigs of RAM if it doesn't need to? What form of a server are you attempting to run?

I'm not an expert in this, but I'd imagine it would allocate 4GB of memory to it, but if there isn't 4GB of RAM needed... it won't use 4GB. There is a difference between allocation and usage.
 

H. Finner

Distinguished
Oct 16, 2014
175
0
18,710
I have found a solution!!!!!!!!!!!!
I found this JVM Argument to apply to my run.bat file for my server and the server can now run all mods butter smooth and there is no hit register or block lag...

java -server -Xms1024M -Xmx2048M -XX:parallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -jar forge-1.10.2-12.18.3.2281-universal.jar nogui

ParallelGCThreads=(amount of cores you want server to take)
And the other stuff is basic except for -XX:+UseConcMarkSweepGC -XX:+UseParNewGC which are BOTH VERY IMPORTANT!
And most of all, nogui is one of the best server factors to have even though it seems like having another window telling you tick time, player count, and ram usage is nice, disabling it with nogui will vastly increase server performance!
Really hope this helps anyone with server (Modded/Vanilla) issues!
 
Solution