[rhelv6-list] Setting overcommit_memory=2 kills system
Michael Coffman
michael.coffman at avagotech.com
Thu May 17 20:09:53 UTC 2012
On Thu, May 17, 2012 at 1:58 PM, Michael Coffman <
michael.coffman at avagotech.com> wrote:
>
>
> On Thu, May 17, 2012 at 1:26 PM, VINIT ADYA (BLOOMBERG/ 731 LEXIN) <
> vadya at bloomberg.net> wrote:
>
>> Can you post /proc/meminfo.
>>
>
>
Here is meminfo with overcommit_memory=0 and overcommit_ration=50 (defaults)
MemTotal: 2052176 kB
MemFree: 1658912 kB
Buffers: 23036 kB
Cached: 261572 kB
SwapCached: 0 kB
Active: 94208 kB
Inactive: 205604 kB
Active(anon): 20732 kB
Inactive(anon): 4 kB
Active(file): 73476 kB
Inactive(file): 205600 kB
Unevictable: 6216 kB
Mlocked: 6216 kB
SwapTotal: 2052088 kB
SwapFree: 2052088 kB
Dirty: 408 kB
Writeback: 0 kB
AnonPages: 21456 kB
Mapped: 15476 kB
Shmem: 224 kB
Slab: 43392 kB
SReclaimable: 17856 kB
SUnreclaim: 25536 kB
KernelStack: 1048 kB
PageTables: 3292 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 3078176 kB
Committed_AS: 137197242528 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 13156 kB
VmallocChunk: 34359715924 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 6148 kB
DirectMap2M: 2088960 kB
> This is after the system has been rebooted with overcommit turned off.
> Not sure if that matters:
>
> [root at joker ~]# cat /proc/meminfo
> MemTotal: 2052176 kB
> MemFree: 1657152 kB
> Buffers: 20160 kB
> Cached: 254396 kB
> SwapCached: 0 kB
> Active: 126156 kB
> Inactive: 174860 kB
> Active(anon): 31988 kB
> Inactive(anon): 8 kB
> Active(file): 94168 kB
> Inactive(file): 174852 kB
> Unevictable: 6216 kB
> Mlocked: 6216 kB
> SwapTotal: 2052088 kB
> SwapFree: 2052088 kB
> Dirty: 188 kB
> Writeback: 0 kB
> AnonPages: 32588 kB
> Mapped: 16740 kB
> Shmem: 228 kB
> Slab: 43436 kB
> SReclaimable: 17768 kB
> SUnreclaim: 25668 kB
> KernelStack: 1080 kB
> PageTables: 3680 kB
> NFS_Unstable: 0 kB
> Bounce: 0 kB
> WritebackTmp: 0 kB
> CommitLimit: 4063220 kB
> Committed_AS: 125088 kB
> VmallocTotal: 34359738367 kB
> VmallocUsed: 13156 kB
> VmallocChunk: 34359715916 kB
> HardwareCorrupted: 0 kB
> AnonHugePages: 0 kB
> HugePages_Total: 0
> HugePages_Free: 0
> HugePages_Rsvd: 0
> HugePages_Surp: 0
> Hugepagesize: 2048 kB
> DirectMap4k: 6148 kB
> DirectMap2M: 2088960 kB
>
>
>> ----- Original Message -----
>> From: michael.coffman at avagotech.com
>> To: centos at centos.org, rhelv6-list at redhat.com
>> At: 5/17 15:12:12
>>
>> Hello,
>>
>> 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.
>>
>> # -- RHEL6
>> # uname -a
>> 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
>>
>> #lsb_release -a
>> 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
>> Distributor ID: RedHatEnterpriseWorkstation
>> Description: Red Hat Enterprise Linux Workstation release 6.2
>> (Santiago)
>> Release: 6.2
>> Codename: Santiago
>>
>> # free
>> total used free shared buffers cached
>> Mem: 2052176 234828 1817348 0 15352 112852
>> -/+ buffers/cache: 106624 1945552
>> Swap: 2052088 0 2052088
>>
>> # sysctl -a |grep commit
>> vm.overcommit_memory = 0
>> vm.overcommit_ratio = 50
>> vm.nr_overcommit_hugepages = 0
>> # sysctl -w vm.overcommit_memory=2
>> vm.overcommit_memory = 2
>> # ls
>> -bash: fork: Cannot allocate memory
>> #
>>
>> #--- CENTOS6 --------------------------
>> # uname
>> -a
>> 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
>>
>> # lsb_release -a
>> 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
>> Distributor ID: CentOS
>> Description: CentOS release 6.2 (Final)
>> Release: 6.2
>> Codename: Final
>>
>> # free
>> total used free shared buffers cached
>> Mem: 2052176 378668 1673508 0 19472 252576
>> -/+ buffers/cache: 106620 1945556
>> Swap: 2052088 0 2052088
>>
>> # sysctl -a |grep commit
>> vm.overcommit_memory = 0
>> vm.overcommit_ratio = 50
>> vm.nr_overcommit_hugepages = 0
>> # sysctl -w vm.overcommit_memory=2
>> vm.overcommit_memory = 2
>> [root at joker ~]# ls
>> -bash: fork: Cannot allocate memory
>>
>> 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.
>>
>> Searches for issues with setting overcommit_memory=2 haven't turned up
>> anything useful..
>>
>>
>> Thanks.
>> --
>> -MichaelC
>>
>
>
>
> --
> -MichaelC
>
--
-MichaelC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhelv6-list/attachments/20120517/e6df26e9/attachment.htm>
More information about the rhelv6-list
mailing list