Q:

Unexpected JVM behaviour on 64bit linux

i tried to compare my java web app behaviour on 32 bit windows and 64 bit linux.
When i view the memory usage via jconsole i find very different graph of memory usage.
On windows the appl never touches 512m.
However when i run on linux 64bit with 64 bit VM the memory keeps invcreasing gradually and reaches peak value about1000m very quickly and i also get oome error related to GC over head limit exceeded. on linux whenever i do manual run GC it drops below to less than 100m.
Its like the GC does seem to run so well as it does on windows.
On windows the app runs better with even more load.
How do i find the reason behind this?
Iam using jdk1.6.0.13
min heap:512m and max heap 1024m
EDIT:

Are you using the same JVM versions on both Windows and Linux?

yes.1.6.0.13.

Are you using the same garbage collectors on both systems?

I noticed in jconsole and i see that the gc are different.

Are you using the same web containers on both systems?

yes.Tomcat.

Does your webapp rely on native libraries?

Not sure. I use tomcat+spring+hibernate+jsf.

Are there other differences in the configuration of your webapp on the two platforms?
  No
What exactly was the error message associated with the OOME?

java.lang.OutOfMemoryError: GC overhead limit exceeded

How long does it take for your webapp to start misbehaving / reporting errors on Linux?

The difference in usage pattern is seen after i leave it running for say 3hrs. The error appears after like a day or 2 days since by then avg memory usage is      seen around 900 mb mark.

A:

A 64bit JVM will naturally use a lot more memory than a 32bit JVM, that's to be expected (the internal pointers are twice the size, after all). You can't keep the same heap settings when moving from 32bit to 64bit and expect the same behaviour.
If your app runs happily in 512m on a 32bit JVM, there are no reasons whatsoever to use a 64bit JVM. The only rationale for doing that is to take advantage of giant heap sizes.
Remeber, it's perfectly valid to run a 32bit JVM on a 64bit operating system. The two are not related.

