There are zillions of questions like this but none has an answer that works for me. Perhaps my system is just misconfigured.
My problem is that after some uptime (a few days), the RAM on my desktop machine (Ubuntu 16.04 LTS) is completely filled and the GUI starts lagging and becomes unresponsive / unusable.
Output of free
:
total used free shared buff/cache available
Mem: 16326212 5633804 395072 10026328 10297336 184458
Swap: 0 0 0
What does not help is this:
sync; sudo sh -c 'echo 3 >/proc/sys/vm/drop_caches'
=> virtually no change in above numbers
swapoff -a
=> no change (swap is disabled anyway)
A striking difference to all outputs of free
being posted in related questions is that most of my memory is taken up by shared
.
However, ipcs -m | awk '{sum+=$5} END{print sum}'
yields a number around 213 MB only.
Possibly related: I have several paths mapped to a RAM disk (from /etc/fstab
):
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0
tmpfs /var/log/apt tmpfs defaults,noatime 0 0
but there doesn't seem to be any problem there:
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.6G 22M 1.6G 2% /run
tmpfs 1.6G 132K 1.6G 1% /run/user/1000
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
tmpfs 7.8G 12M 7.8G 1% /var/tmp
tmpfs 7.8G 1.7M 7.8G 1% /var/log
tmpfs 7.8G 143M 7.7G 2% /dev/shm
tmpfs 7.8G 8.0K 7.8G 1% /var/log/apt
tmpfs 7.8G 878M 7.0G 12% /tmp
...
except perhaps
udev 7.8G 7.8G 0 100% /dev
Any other ideas?