I know Linux likes to eat my RAM, and that's great, but it doesn't quite account for what I'm seeing on a VPS (KVM) running CentOS 6.5. In fact, I'm missing at least 200MB on a 1GB VM. Where could it be?
total used free shared buffers cached
Mem: 996 907 89 0 76 379
-/+ buffers/cache: 451 545
Swap: 1023 5 1018
free -m suggests that, without buffers/cache, the system uses 451 MB of memory. However, there's no way the running programs (mostly nginx/php-fpm/mysqld/sshd) add up to that much RAM.
ps_mem reports that 90MB is currently in use by programs, and here's what smem says:
Area Used Cache Noncache
firmware/hardware 0 0 0
kernel image 0 0 0
kernel dynamic memory 820912 775204 45708
userspace memory 96300 27988 68312
free memory 103168 103168 0
----------------------------------------------------------
1020380 906360 114020
Is there anything outside of the visible running processes that could be eating my RAM? Or is free -m incorrectly reporting memory usage? Any tips on reclaiming this memory (without rebooting)?
Results of cat /proc/meminfo
: http://paste.ubuntu.com/6949236/
EDIT: Turns out to be a large slab cache, see: https://stackoverflow.com/questions/5463800/linux-memory-reporting-discrepancy. I was confused by it being much larger than I'm used to, and the fact that tools like free -m
, htop
and the like report this as used memory rather than cache/buffers.