I hope someone can guide me in the right direction.
I recently updated some software on a server, and a few days later, this software crashed because no memory could be allocated. Initially, I thought there was a bug in the new release until I checked other Oracle Linux 7 servers (without the updated software) and observed the following:
[root@server yabbath]# free -mh
total used free shared buff/cache available
Mem: 62G 2.2G 42G 24M 18G 59G
Swap: 63G 0B 63G
[root@server2 yabbath]# free -mh
total used free shared buff/cache available
Mem: 62G 11G 4.1G 34M 47G 50G
Swap: 31G 0B 31G
Unfortunately, monitoring doesn't subtract the buff/cache value, so everything seemed fine. After implementing this, I got the following graph:
smem output is the following
smem -r
PID User Command Swap USS PSS RSS
1485 mongod /usr/bin/mongod -f /etc/mon 0 1155092 1155941 1160916
20146 root /usr/sbin/nsrexecd 0 38884 38987 41232
1365 zabbix /usr/sbin/zabbix_agent2 -c 0 30956 31471 35648
1835 zabbix /usr/sbin/zabbix-agent2-plu 0 21796 21836 23304
1366 root /usr/bin/python2 -Es /usr/s 0 13060 14959 22176
682 root /usr/lib/systemd/systemd-jo 0 4988 14089 34972
1046 polkitd /usr/lib/polkit-1/polkitd - 0 8184 9462 14724
10225 root python /bin/smem -r 0 7592 8479 11488
1363 redis /usr/local/bin/redis-server 0 7132 7848 10776
1371 root /usr/sbin/rsyslogd -n 0 1876 7605 23312
1369 redis /usr/local/bin/redis-sentin 0 5992 6705 9624
1105 root /usr/sbin/NetworkManager -- 0 5164 6689 13908
1 root /usr/lib/systemd/systemd -- 0 4852 5658 10416
1040 root /usr/bin/VGAuthService -s 0 3596 4198 9340
717 root /usr/lib/systemd/systemd-ud 0 3240 3998 8468
Can someone tell me how to get information about which process is using how much of this buff/cache memory?
Thanks in advance and regards,
yabberth
Edit:
This is just on of many servers. I also have machines where the buff/cache memory is using 47GB of a total of 64GB.