How much ram can I give to a Minecraft server?
I'm going to receive a desktop with 32gb of ram, an i9-9900k ^((yeah I know ryzen 3 exists)**), and a fairly large NVME for Linux Root and Home. Most of my work is in the Computer Science field, so I will have uses for this ungodly amount of speed, but I do like to play Minecraft with my friends sometimes. Usually, I host because I have the most knowhow with stuff like this and Linux makes it really easy. But I had the slowest computer, so lag was a common complaint.
Context: Before this, I had an Athlon x4 760 and 8gb of ram since 2015. The CPU worked like a champ but sometimes struggled with the server. Overall it was fine.
I basically want to host a server where even if my friends build lag machines, it can withstand it. (i don't know how bad they get) I don't plan to host it 24/7, only when we want to play.
I was thinking of 16gb of ram to the server. But I've heard that that can cause issues with the stop-the-world garbage collection. I could give like, 4 threads to the GC with -XX:ParallelGCThreads. I have quite a bit of knowledge about how the garbage collection works, but I don't know its real impacts on applications like Minecraft.
I know this is dumb, stupid, and completely unnecessary for a Minecraft server of 4-6 people if I'm lucky, but there's not much else to do with hardware like that. (When playing Minecraft, don't worry I DO HAVE SERIOUS PLANS FOR HARDWARE LIKE THIS)
Heres what I'm thinking so far:
java -jar [server.jar] -server -Xms=12G -Xmx=16G -XX:+UseParallelGC -XX:MaxGCPauseMillis=200
tldr; what is the theoretical best setup for a Minecraft server where the host has 32 gb of ram and an i9-9900k
^(also Linux > Windows :) nt sucks)
Posted Mar 26, 2020, 3:37 PM UTC · edited