Heap size not increasing over 4G

Hi,

I'm running a java server app on a 4-core 64-bit Linux box with JDK 1.6.0u1

The system has 8G of physical RAM and the java app is the dedicated app running on the server. I've allocated a max heap size of 8G to the java app.

The app does a lot of caching and as expected, the old gen starts filling up. The young gen only needs about 1.5G of space and the old gen can even eat up all of the available memory, which I want it to do.

Thing is that the jvm heap does not go over 4G. I've even changed the NewRatio to 6 but even then the old gen gets filled up to 99% and the app stops as the jvm does a full gc. Obviously, a gc will not help since there's nothing to gc.

I want the jvm to use more memory, but its not allocating more. Any ideas whats going on?

I'm using ParallelGC as well.

Regards,

Vinod.

[867 byte] By [thisisvinoda] at [2007-11-27 8:53:04]
# 1
-Xmx7000m -Xms7000m
tschodta at 2007-7-12 21:09:47 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
I'm already using -Xms8192 and -Xmx8192
thisisvinoda at 2007-7-12 21:09:47 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3

> I'm already using -Xms8192 and -Xmx8192

I would suggest backing down a bit from using all available memory - other things than your heap need to fit into memory - you are just forcing your system to start swapping.

But apart from that, if you specify -Xmx and -Xms as the same value

Runtime.maxMemory() and Runtime.totalMemory() should both return this value.

You should be able to use Runtime.totalMemory() as a gauge to verify that your heap is all allocated at start up and stays the same.

tschodta at 2007-7-12 21:09:47 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4
Never mind. I am using 'wrapper' from tanuki software and its internally setting max mem to just 4096 even when I'm telling it to set it to 8192. Easy enough to fix. Thanks for the replies!
thisisvinoda at 2007-7-12 21:09:47 > top of Java-index,Java HotSpot Virtual Machine,Specifications...