Ubuntu – Mem vs cache in system monitor



In the above menu, what does the difference between Mem and cache? Are they both use memory from my RAM? Which program use cache?

Best Answer

  • cache is where linux uses some of your RAM to keep a cache of data recently read from the disk.

    It's a good thing. cache is as good as free RAM. No, it's better. free is wasted memory, it's RAM sitting there with zeroes or some other useless crap in it. cache is where you keep data recently read from the disk, where there would otherwise be useless garbage, in case the system wants to read that part of the disk again any time soon.

    Whenever a process wants more memory, cache is given to it as readily as free. free is the money you spent on RAM being utterly useless, cache is Linux making some use of it (so long as nothing else wants it).

    More info here: http://www.linuxatemyram.com/