javajmeterheap-size

Why Java VM won't initialize 2GB when I have 16GB RAM? Other machine works just fine


I've a 64 bit Windows 7 machine with 16GB RAM.

When I try to edit "jmeter.bat" to allocate more than 1GB heap size (e.g., set HEAP=-Xms1g -Xmx2g) and double click it, it gives me error that during initialization of VM it could not reserve enough space for object heap.

Interesting thing is: I've another machine with the same configuration (64 bit Windows 7 machine with 16GB RAM) where I am initializing JMeter with 10GB of heap size and it works!

Can anyone please help me explaining why? How can I avoid this error?

Thanks in advance. --Ishti


Solution

  • Check that your java version is a 64 bit one.

    Run:

    java -version