What to set java max heap size to?

  • 28 Views
  • Last Post 2 weeks ago
Bi0Ph34r posted this 2 weeks ago

My java perms are:

-Xms2G -Xmx5G -Xmn512M -d64 -XX:+UseG1GC -Dfile.encoding=UTF-8

So what exactly to set for java max heap size is it one GB marger than server max?

6 Comments
Order By: Standard | Newest | Votes
Mike posted this 2 weeks ago

There's no good answer to this question. You shouldn't set the heap size yourself via an arg anyway, you should set it via McMyAdmins config file (McMyAdmin.conf or MinecraftModule.kvp depending on whether you're on MCMA2/3) - for a big server you want to be a couple of gig less than the actual installed system RAM.

Bi0Ph34r posted this 2 weeks ago

oh I have 32 gb on a dedi and I only want to start this server with 5 like in example above and in amp server there is a second option to set max heap size so i'm still not sure what to do?

Bi0Ph34r posted this 2 weeks ago - Last edited 2 weeks ago

so would it be safe to say to set xmx 5g and set heap size 1g bigger @ 6144?

Bi0Ph34r posted this 2 weeks ago

I am hosting multiple servers btw

Mike posted this 2 weeks ago

The Xmx flag is the maximum heap size.

Bi0Ph34r posted this 2 weeks ago

so if I keep it in the java arg would I just remove the max heap in the panel?