High Linux Memory, triggering oom-killer problem solving

Source: Internet
Author: User
High Linux Memory, triggering oom-killer problem solving 1. first confirm that the system version is 32-bit # uname-aLinuxalarm2.6.9-67.ELsmp #1SMPWedNov713: 58: 04EST2007i686i686i3862. let's take a look at the 32-bit Linux memory manager... high Linux Memory, triggering oom-killer problem solving 1. first confirm that the system version is 32-bit # uname-a Linux alarm 2.6.9-67. ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i00002. let's take a look at the 32-bit Linux Memory management structure # DMA: 0x00000000-0x00999999 (0-16 MB) # LowMem: 0x01000000-0x037999999 (16-896 MB)-size: 880 MB # HighMem: 0x038000000- <硬件特定> The kernel uses low memory to track all memory allocations. in this case, a 16 GB memory system consumes more low memory than a 4 GB memory system. when low memory is used up, even if the system still has the remaining memory, oom-killer is triggered. In the 2.6 kernel, the process that occupies the highest memory is killed. Therefore, sshd and other processes are killed, causing the system to log on. 3. how to View lowMem-bash-3.00 # free-lm total used free shared buffers cachedMem: 2026 1973 874 52 0 36 1303Low: 823 1151 1150 51 High: 1-/+ buffers/cache: 633 1392 Swap: 3067 142 2924 4. therefore, we need to protect LowMem. the lower_zone_protection is introduced in the 2.6 kernel, which will make the kernel willing to protect low memory and give priority to high memory allocation when allocating memory. -Bash-3.00 # cat/proc/sys/vm/lower_zone_protection 0-bash-3.00 # echo 400>/proc/sys/vm/lower_zone_protection another problem is the 24 GB memory system, the idle memory is less than 50M1. verify that the system version is 64-bit # uname-a Linux gxgd-nms-app 2.6.18-194. el5xen #1 SMP Tue Mar 16 22:01:26 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux2. view the memory of each process in ps, which occupies about 4 GB, and most of the memory is occupied by Page Cache. The Linux kernel policy is to use the data in the memory cache file system to maximize IO speed. although the Page Cache is automatically released when a process requires a larger memory, however, it is not ruled out that the released memory is not timely or that the memory fragments do not meet the memory requirements of the process. Therefore, we need a method to limit the upper limit of PageCache. Linux provides the min_free_kbytes parameter to determine the threshold value for the system to recycle memory and control the system's idle memory. The higher the value, the earlier the kernel starts to recycle memory, and the higher the idle memory. [Root @ zyite-app01 root] # cat/proc/sys/vm/min_free_kbytes 163840 echo 963840>/proc/sys/vm/min_free_kbytes other optional temporary solutions: disable oom-killercat/proc/sys/vm/oom-killecho "0">/proc/sys/vm/oom-killvi/etc/sysctl. confvm. oom-kill = 02. clear cache (optional) echo 1>/proc/sys/vm/drop_caches
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.