I'm trying to predict the heap memory requirements change for the case when I run my Java application unchanged in a JVM configured to use more than 32GB of memory.
I expect that there will be significant memory overhead for the same amount of "useful" objects I keep in memory just after reconfiguring the Xmx parameter from 32GB to 64GB.
I've tried to simulate and estimate the difference by applying the -XX:-UserCompressedOps
on my local machine running with small heap (8GB) but could not come to the conclusion yet.
According to runtime calculations my objects take same amount of memory in both cases. The used heap with switched off optimization tend to be a bit more but in no way twice more as I could expect reading some explanations.
In my use case I simply keep a large amount of relatively big POJO objects 100-1K each in heap for the entire life time of the program.
Is there a rule of thumb for how the memory requirements grow just by crossing the 32GB limit (when 32bit optimizations do not apply any more)?