What to set java max heap size to?

  • 56 Views
  • Last Post 06 February 2017
Bi0Ph34r posted this 05 February 2017

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 06 February 2017

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 06 February 2017

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 06 February 2017 - Last edited 06 February 2017

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

Bi0Ph34r posted this 06 February 2017

I am hosting multiple servers btw

Mike posted this 06 February 2017

The Xmx flag is the maximum heap size.

Bi0Ph34r posted this 06 February 2017

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