I have an application which will use 300 million size of hash maps. For that I initialized the JVM with initial and maximum heap size of 16 GB i.e. (java -Xms16384M -Xmx16384M) but I am getting java OutOfMemoryError. my machine is having 32 GB RAM with RedHat Linux operating system installed. I observed that JVM is using only 25% of RAM from "top" command in Linux i.e 8GB even though i set it for 16GB it is using only 8GB.
I want to know that if JVM is limiting the RAM?
How to configure JVM to use complete min and max heap size given?
-ms16g -mx16gbut that should do the same thing. Can you try a small test program which shows you are getting OOME before you have run out of memory?