We've been having some Linux memory usage problems on some of our servers. free, top, ps, and vmstat are all showing 261M free out of 1G (~25%). However, adding up the amount of memory shown per process in top shows that we should be using very little memory. The cache has only about 48M and 0K in the buffer so that makes the total memory available 309M, still considerably less than we should have. I have included a screen shot of our top output at http://www.workxpress.com/sites/default/files/top.png (sorted by memory). This is my first post on serverfault so I couldn't include the image in my post :-P
After trying several Google searches, I am no where further than I was. The majority of the results told me the same thing, the memory is being used for cache and buffers (which I already knew). But top and free clearly don't show that. Any help is greatly appreciated.
Thanks,
JamesArmes
Update:
I am including our /proc/meminfo from a more recent occurrence of this issue:
MemTotal: 1028636 kB MemFree: 30056 kB Buffers: 0 kB Cached: 28732 kB SwapCached: 154684 kB Active: 265328 kB Inactive: 19416 kB SwapTotal: 2097144 kB SwapFree: 1758196 kB Dirty: 36 kB Writeback: 0 kB AnonPages: 240260 kB Mapped: 11996 kB Slab: 23008 kB SReclaimable: 11976 kB SUnreclaim: 11032 kB PageTables: 5636 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 2611460 kB Committed_AS: 1099080 kB VmallocTotal: 34359738367 kB VmallocUsed: 7204 kB VmallocChunk: 34359731091 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB
Below is our /etc/sysctl.conf (with all of the commented lines removed):
kernel.printk = 4 4 1 7 kernel.maps_protect = 1 fs.inotify.max_user_watches = 524288 vm.mmap_min_addr = 65536 net.ipv4.conf.default.rp_filter=1 net.ipv4.conf.all.rp_filter=1
I hope this helps.