We have an application running on Mac with java 1.5 .This is a 32 bit VM. The heap memory is within the limit. When we move this application to Linux with java 1.5.(64 bit) We see a 50% increase in memory utilisation. Will the memory foot print of the jvm be so high in Linux? Do we have a patch for the same on Linux?
2 Answers
It will be quite usual for 64-bit applications to require more memory than 32-bit ones, (bigger variables, pointers, etc.). This, and the different JVM implementation between the two systems, could very well be the reason.
I personally don't find this to be strange at all, so I would not consider it an issue, unless the memory usage started going up like crazy os some similar performance problem arose.
On a 64bit environment, all pointers take up twice the space. long integers might too, but i think they're already 64bit on both cases.
How much that affects you depends on your specific case, any object reference is a pointer. If your objects are mostly links to other objects, they will be blown up.
There are 32-bit JVM builds for linux. The bad news is that once you outgrow 32-bit, you go from 2-3GB to needing 4-6GB just to be on par.