I have a laptop running ubuntu 16.04 with 4gb ram. I've been using it for about a month now and recently I noticed that the system slows down a lot even with only 3-4 apps running. This is the output of free -m
with a terminal and gedit open.
total used free shared buff/cache available
Mem: 3872 797 842 1971 2232 848
Swap: 4015 141 3874
You can see that the available memory is less than cached memory. Shouldn't cached memory be included in available memory? The problem is, when I open some other application, the cached memory size increases instead of giving space to the new app! Here's the output of 'free -m' after opening firefox, document viewer and vscode.
total used free shared buff/cache available
Mem: 3872 1391 145 1923 2335 299
Swap: 4015 250 3765
sudo sync; echo 3>'/proc/sys/vm/drop_cache'
doesn't help much.
total used free shared buff/cache available
Mem: 3872 1368 239 1923 2265 324
Swap: 4015 256 3759
It turns out I can't even open 5 applications on Ubuntu simultaneously. It seems like the 2265mb memory has just leaked out. It's more than half of my physical ram! What can I do about it?