Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Buffers and caches in 2.6 kernel

    Hi all,

    free -m
                 total       used       free     shared    buffers     cached
    Mem:          2014       1769        244          0         12        110
    I'm trying to find a consistent explanation of what precisely the buffers and caches are used to hold. I've done a lot of reading online, and come across different answers (I suspect some of the documentation was old, and related to the 2.4 (or even 2.2) kernels).

    My understanding is that the virtual filesystem implements 4 caches:

    * page caching
    * inode caching
    * directory caching (d-cache)
    * buffer caching

    Actually, I've also read that these caches are implemented as one big cache at a lower level. But it's still useful to think of them as separate.

    Inode and directory caching I'm ok with, but I'm a bit unclear on the difference between the buffer cache and page cache.

    I'm also unclear how these 4 caches correspond to the 'cached' and 'buffers' columns in the output of 'free'. I would guess (from their relative size) that 'buffers' contains the inode/directrory caches, and 'cached' the page/buffer caches

    Can anyone clarify please, or point me in the direction of some up to date documentation?

  2. #2
    Linux User
    Join Date
    Nov 2009
    Though I can't reply clearly to your question, I'll just give you 2 links which you you may have come across already :

    linux memory usage

    How to use the "free" command, by The Linux Information Project (LINFO)

    And if you want to pull your hair off your head :

    cat /proc/meminfo

    I have in the past do much searching on this question, I did not find a clear way to understand the output. I have concluded that it's the second line, "buffer/cache", which you have not posted, that is really important. There should not be much free memory in this line.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts