0

Only 28G is being used by buff/cache.

$free -h
              total        used        free      shared  buff/cache   available
Mem:           188G         87G         72G         17M         28G         72G
Swap:          3.9G          0B        3.9G

This memory isn't being used by processes:

$ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | head
         0.00 Mb COMMAND
       753.30 Mb /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock
       440.66 Mb /usr/lib/polkit-1/polkitd --no-debug
       297.09 Mb /usr/sbin/NetworkManager --no-daemon
       297.00 Mb /usr/bin/python -Es /usr/sbin/tuned -l -P
       216.72 Mb /usr/sbin/ModemManager
       153.12 Mb /usr/sbin/rsyslogd -n
       144.51 Mb /usr/libexec/dconf-service
        87.64 Mb /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
        72.33 Mb /sbin/audispd

87G used - 28G cache = 59G unaccounted for?

Update:

According to Gilles, slab allocation is not visible when performing free. After analyzing slabtop and computing the memory allocated for "Slab" in /proc/meminfo, I've come up with the following totals for memory allocated to the slab:

Slab: 46.8651GB

The rest can probably be found throughout /proc/meminfo. Free seems to roll inode and dentry cache into the "used" category, if I understand this correctly.

  • Have you any tmpfs (df) filesystems mounted, or any shared memory segments (ipcs -ma) consuming memory ? – steve Oct 20 '15 at 18:47
  • There isn't anything that jumps out at me from the results. I don't have a ramdisk configured: pastebin.com/e6b49wuK – Zhro Oct 20 '15 at 18:51
  • Kernel stuff, maybe, for example inode cache (which unlike content cache isn't accounted for in “buff/cache” in the free output). Run slabtop as root. – Gilles Oct 20 '15 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.