Friday, November 10, 2017

linux - Cannot find the process using most of RAM


I have 8 GB RAM running on Ubuntu. I notice that a lot of memory is used even when I don't run any programs. I used the top command to view the processes, sorted by resident memory they use. It showed that about 5GB was being used while the sum of memory used by processes are about < 20% of 8GB, which is about 1-2 GB.


Is there any possibility that some process using a lot of RAM is invisible from any program like top?


enter image description here


Answer



You may use free -h to check the mount of the RAM used by cache and buffer.


Actually, it's a speed-up mechanism on Linux. If the RAM is free, it's useless. If we are able to use these free RAM to cache some data used frequently, it will speed up the whole system significantly. When some processes needs more RAM, these data will be swapped out from RAM.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...