Maximum application memory limit

How much memory can the server use (Jboss, Tomcat, etc.)? For example, if the server has 128 GB of memory, can it use at least 100 GB? I use these parameters for my local:

-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512 

Can these settings be configured to use 100gb?

+6
java max memory limit jboss
source share
3 answers

We use this to run a 64-bit 24 GB JVM with additional GC pauses while serving 100+ page requests per second:

 -Xms24g -Xmx24g -XX:MaxPermSize=256m -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 

There should be no reason why you cannot specify 100 GB if you have memory. Since we use 32 GB, we also use -XX:+UseCompressedOops to reduce the overhead of 64-bit addressing. In addition, to improve performance, we use -XX:+UseLargePages , however first you need to enable large page support for your OS.

+8
source share

As Mat said, these huge heaps can become problematic with the Garbage Collection, but then with a large heap, you probably use a multi-core machine, where you can use a collector that basically works on its own core.

Otherwise, -Xm takes the unit 'g', so you can write -Xmx100g

Manpage for java (on OS X) says:

On Mac OS X platforms, the upper limit for this value when operating in 32-bit mode (-d32) is approximately 2100 m minus overhead and approximately 127 t minus the overhead of the amount when working in 64-bit mode (-d64). On Solaris 7 and Solaris 8 SPARC platforms, the upper limit for this value is about 4000 m minus overhead. On Solaris 2.6 and x86 platforms, the upper limit is about 2000 m minus overhead. On Linux platforms, the upper limit is about 2000 m minus overhead.

+4
source share

You will come across (possibly) dramatic GC pauses for this heap size. (Other than that, I don’t know the hard limits if you are using a 64-bit virtual machine)

Not directly related to your question, but I found this Google TechTalks video on Ehcache interesting - Greg Luck talks about problems with heap size.

+3
source share

All Articles