When free memory shrinks and no process explains it, the kernel itself may be holding it in its slab caches. slabtop lists those, which is a good thing to know about when a server looks strangely full.
slabtop shows kernel slab cache information, with the biggest caches at the top and a header with slab layer statistics. The simplest use is once, sorted by cache size:
sudo slabtop -o -s c
-o prints the output once and exits. -s picks the sort key, and c sorts by cache size. Other keys include a for active objects, l for the number of slabs, s for object size and n for name. The default is o, the number of objects. Add –human to get sizes scaled from B up to Pi instead of KiB. For a live view leave out -o and use -d to set the refresh time in seconds (the default is 3), and press q to quit. -d can’t be combined with -o.
It reads /proc/slabinfo, so if you see a permission error, run it with sudo.
Two caveats from the man page. The CACHE SIZE column is not accurate: it gives an upper limit on the memory used by a cache. And the header tracks how many bytes of slabs are in use, which the page says is not a measure of physical memory. For that, the Slab field in /proc/meminfo is the one to read.
I’d use slabtop to find a name worth searching for, like a cache that keeps growing, and then check the Slab line in /proc/meminfo before drawing any conclusion.
Further reading: slabtop(1) manual page