Hello,<br><br>In general I am in the habit of turning off memory overcommit because I believe it's a bad thing in a multi-user environment. This was never a problem on rhel5 systems, but on rhel6, I am having issues. When I try to set overcommit_memory=2, my system locks up. It basically behaves as if the memory is all used up... I see the same behavior on centos6 or rhel6. Following is some output from each platform.<br>
<br># -- RHEL6<br># uname -a<br>Linux joker 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux<br><br>#lsb_release -a<br>LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch<br>
Distributor ID: RedHatEnterpriseWorkstation<br>Description: Red Hat Enterprise Linux Workstation release 6.2 (Santiago)<br>Release: 6.2<br>Codename: Santiago<br><br># free<br> total used free shared buffers cached<br>
Mem: 2052176 234828 1817348 0 15352 112852<br>-/+ buffers/cache: 106624 1945552<br>Swap: 2052088 0 2052088<br><br># sysctl -a |grep commit<br>vm.overcommit_memory = 0 <br>
vm.overcommit_ratio = 50<br>vm.nr_overcommit_hugepages = 0 <br># sysctl -w vm.overcommit_memory=2<br>vm.overcommit_memory = 2 <br># ls<br>-bash: fork: Cannot allocate memory<br># <br><br>#--- CENTOS6 --------------------------<br>
# uname -a <br>Linux joker 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux<br><br># lsb_release -a<br>LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch<br>
Distributor ID: CentOS<br>Description: CentOS release 6.2 (Final)<br>Release: 6.2<br>Codename: Final<br><br># free<br> total used free shared buffers cached<br>Mem: 2052176 378668 1673508 0 19472 252576<br>
-/+ buffers/cache: 106620 1945556<br>Swap: 2052088 0 2052088<br><br># sysctl -a |grep commit<br>
vm.overcommit_memory = 0 <br>
vm.overcommit_ratio = 50<br>
vm.nr_overcommit_hugepages = 0 <br># sysctl -w vm.overcommit_memory=2<br>vm.overcommit_memory = 2<br>[root@joker ~]# ls<br>-bash: fork: Cannot allocate memory<br><br>One last point. If I set the overcommit values in /etc/sysctl.conf and then reboot, the values get set correctly on boot and everything seems fine. In addition I can then change the value of overcommit_memory to 0 and back to 2 with out any ill affects.<br>
<br><span></span>Searches for issues with setting overcommit_memory=2 haven't turned up anything useful..<br><br><br clear="all">Thanks.<br>-- <br>-MichaelC<br>