How is it possible that 'free' reports X amount of memory is used, even though ps_mem reports only a fraction of X is being used?
Concrete example:
https://github.com/pixelb/ps_mem this reports
Private + Shared = RAM used Program
156.0 KiB + 17.5 KiB = 173.5 KiB earlyoom
120.0 KiB + 57.5 KiB = 177.5 KiB startx
256.0 KiB + 41.5 KiB = 297.5 KiB xinit
...
82.3 MiB + 18.7 MiB = 100.9 MiB Xorg
133.5 MiB + 1.7 MiB = 135.2 MiB bash (10)
3.1 GiB + 174.7 MiB = 3.3 GiB firefox (22)
---------------------------------
4.0 GiB
=================================
While free reports:
total used free shared buffers cache available
Mem: 15Gi 9Gi 4.0Gi 43Mi 79Mi 1.8Gi 5.6Gi
Swap: 4.0Gi 6.8Mi 4.0Gi
Total: 19Gi 9Gi 8.0Gi
Where are the extra 5 gigs of RAM going to? I'm aware of the whole "linux ate my ram" thing where memory is used for cache and is left available, but as far as I understand "used" means actually used. So what's the deal? Where's the ghost memory?