What Does Cached Memory Mean when Viewing htop?

28,628

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.

Share:
28,628

Related videos on Youtube

zachd1_618
Author by

zachd1_618

Updated on September 18, 2022

Comments

  • zachd1_618
    zachd1_618 over 1 year

    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

  • Clément
    Clément about 8 years
    Did you mean "disk heavy programs?"
  • TafT
    TafT over 7 years
    I think it should be "So having lots of RAM will increase performance of Ubuntu in general if you are using RAM or Disk-Read heavy programs."
  • Sta_Doc
    Sta_Doc about 2 years
    So can we safely say that when we observe lots of cache memory usage in htop result, it means the system is temporarily storing disk-read output for us? Is there other source of information that will be saved in cache memory other than disk-read output?