Htop RAM – What Does Cached Memory Mean in Htop


While viewing the reports of htop, I would like to know what the orange/brown 'cached memory' bars actually indicate. Really I'm looking for a more practical explanation of what I'm looking at, rather that pure CS terms. Though I'd like to have both.

When I see a large amount of memory being (having already been?) cached, will that have any effect on system performance? What would normally cause the cached memory to increase so much while the used memory (green) stays pretty low?

Here is a screen capture of an example htop report.
enter image description here

Best Answer

cached memory is used so that the HDD doesn't have to be read each time you open a file or a folder. So when you cache something it saves a disk read, that saves time and that's why Ubuntu caches as much as possible.

Having free memory isn't really good since it's not used, having cached memory will make access times shorter and improves performance. so the cached memory can be viewed as free memory since it's not actually used by any program it's just there to be as a backup of what could be used.

Cached memory + free memory is the same as the available memory, since the cached memory will be cleared if a program needs the space. So having lots of RAM will increase the performance of Ubuntu in general, especially if you are using programs with heavy RAM usage.

Related Question