I am running centos 6.4 with 2.6.32-358.6.2.el6.x86_64 which is actually running as a xen vm with
ram 2 GB
On this i have set
cat /proc/sys/vm/overcommit_memory 2
But when i try to start my java application its showing
java.io.IOException: Cannot run program "/bin/bash": java.io.IOException: error=12, Cannot allocate memory Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
But actually this machine has 1.5 gb free memory.
when i set
echo 0 > /proc/sys/vm/overcommit_memory
Everything is working fine,
i thought over committing memory allow me to use more virtual ram(swap+real ram),but why its failing even with more free real ram.