Cached memory never gets released
Quoted 9 lines · Ross Biro
You may want to examine
/proc/meminfo,/proc/slabinfo, and the output of sysrq-m.
mm/vmscan.c(kswapd) is responsible for freeing most memory. The routine you are probably most interested in isshrink_cache.I would check to make sure that the pages in the icache are backed by
a mapping and if so, that they are clean. If either of those two
conditions are not met, then the page cannot be thrown away.
We're locating sysrq-m, I haven't used that before. /proc/meminfo doesn't give any new insight. /proc/slabinfo the only thing that jumped out at me was this:
BOX with 16M cachedbuffer_head 448 600 96 15 15 1
BOX with 61M cachedbuffer_head 1377 4160 96 104 104 1
The inode_cache lines didn't seem to differ much:inode_cache 838 856 480 107 107 1
vsinode_cache 313 784 480 97 98 1
The first was the 16M cached and the second was the 61M cached.
In both cases the root filesystem is mounted read-only. So I would think it can't be a question of dirty pages. In one case the root filesystem is nfs, and in the other it is a block device with an ext2 filesystem on it.
Thanks--
Dave