JVM 1.8 Min and Max Heap Sizes
JVM 1.8 Min and Max Heap Sizes
(OP)
I have an app that I'm running in a version 1.8 JVM in Windows. I'm setting max and min heap size, but it only seems to actually use the max setting. The min memory allocation is much lower than what I specified and it grows as needed.
My memory settings are...
That's 10 GB for both (it's a big app). It does top out at 10 GB (plus perm gen, etc), but it starts out only being about 1 GB. I want it to pre-allocate everything.
Is this a version 1.8 thing? I've searched all of the JVM/JDK/JRE docs for 1.8 and nothing indicates that it would be acting the way it is.
Any ideas?
My memory settings are...
CODE
-Xms10240m -Xmx10240m
That's 10 GB for both (it's a big app). It does top out at 10 GB (plus perm gen, etc), but it starts out only being about 1 GB. I want it to pre-allocate everything.
Is this a version 1.8 thing? I've searched all of the JVM/JDK/JRE docs for 1.8 and nothing indicates that it would be acting the way it is.
Any ideas?
RE: JVM 1.8 Min and Max Heap Sizes
Cheers,
Dian
RE: JVM 1.8 Min and Max Heap Sizes
Plus, it should just work as advertised and it's not. That bugs me.
RE: JVM 1.8 Min and Max Heap Sizes
Cheers,
Dian
RE: JVM 1.8 Min and Max Heap Sizes
In addition to Task Manager, I've also opened up the port to look in with JConsole, JMap, and a few other tools that came in the JDK.
RE: JVM 1.8 Min and Max Heap Sizes
Anyway, do you have any performance issues or it's just that you don't see the memory reserved?
Cheers,
Dian
RE: JVM 1.8 Min and Max Heap Sizes
I'm doing some tuning on this app and historically setting min and max heap to the same value shaves a small amount of time off each garbage collection because the collector doesn't have to make any decisions on whether it needs to extend/expand or not. Older JVMs on slower processors, it was a noticeable time savings on larger JVMs.
So, when tuning the app, my first setting to put in is setting min same as max. I don't know if it will make a difference because it doesn't seem to be working. So I came on here (plus a great deal of Googling) to see if this is an expected behavior.
I knew Perm gen was gone and after reading how that part is being handled, it looks like a GREAT improvement.
The other link you provided contains stuff I've already done. In fact that's how I confirmed I wasn't getting the min I was asking for.
RE: JVM 1.8 Min and Max Heap Sizes
Cheers,
Dian