Java 32-bit VM is not starting on 64-bit RHEL due to a "Could not reserve enough space for object heap" message

Solution Verified - Updated -

Issue

We are facing the error below when starting java processes:

java -server -Xms512m -Xmx2048m -XX:MaxPermSize=512m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

We are using 32 bit java on a 64 bit operating system. The same error is not seen when using the 64 bit version of Java. Here are some details about our environment:

# sysctl -a | grep overcommit
vm.overcommit_ratio = 90
vm.overcommit_memory = 1

Memory info:

# free -m
             total       used       free     shared    buffers     cached
Mem:        193157      80260     112897          0        770       3874
-/+ buffers/cache:      75615     117542
Swap:       102399          0     102399

Why is it failing to allocate 2GB of heap when there are still about 110GB of free RAM on the system?

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.