装逼爱好者 - swap
type: channel
link: https://www.zbuse.com/tag/swap/
items: Linux内存爆浆(内存不足)系统日志实例

Linux内存爆浆(内存不足)系统日志实例
type: item
date: 2013-09-13T09:03:23+00:00
description: 关于一些刚入门Linux不久又在玩VPS的同学，有时候自己内存爆掉了搞不清东南西北然后到处求救抱怨甚至开喷的情形，今天刚好有空就在dmesg里面抓了一段日志上来做例子。以下是日志内容active_anon:113958 inactive_anon:114006 isolated_anon:32 active_file:6 inactive_file:0 isolated_file:0 unevictable:0 dirty:0 writeback:0 unstable:0 free:1990 slab_reclaimable:2356 slab_unreclaimable:11207 mapped:116 shmem:87 pagetables:7163 bounce:0 Node 0 DMA free:4020kB min:52kB low:64kB high:76kB active_anon:4336kB inactive_anon:4500kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:13856kB mlocked:0kB dirty:0kB writeback:0kB mapped:16kB shmem:0kB slab_reclaimable:60kB slab_unreclaimable:468kB kernel_stack:144kB pagetables:36kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 994 994 994 Node 0 DMA32 free:3940kB min:4004kB low:5004kB high:6004kB active_anon:451496kB inactive_anon:451524kB active_file:36kB inactive_file:0kB unevictable:0kB isolated(anon):128kB isolated(file):0kB present:1018080kB mlocked:0kB dirty:0kB writeback:0kB mapped:448kB shmem:348kB slab_reclaimable:9364kB slab_unreclaimable:44360kB kernel_stack:1416kB pagetables:28616kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:256 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 0 DMA: 7*4kB 3*8kB 4*16kB 0*32kB 1*64kB 0*128kB 1*256kB 1*512kB 1*1024kB 1*2048kB 0*4096kB = 4020kB Node 0 DMA32: 981*4kB 2*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3940kB 432 total pagecache pages 290 pages in swap cache Swap cache stats: add 471821, delete 471531, find 1381770/1427029 Free swap = 0kB Total swap = 524280kB 262143 pages RAM 7859 pages reserved 28661 pages shared 243982 pages non-shared Out of memory: kill process 793 (mysqld_safe) score 91618 or a child Killed process 1047 (mysqld) vsz:1890740kB, anon-rss:26400kB, file-rss:4kB nginx invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0 nginx cpuset=/ mems_allowed=0 Pid: 947, comm: nginx Not tainted 2.6.32-71.29.1.el6.x86…