6

I would like to know the exact meaning and significance of Linux's Disk caching Mechanisms. In one of the articles I have read, page cache and dentry cache are two forms of them.

Could somebody explain to me these concepts?

4
  • how is this not a duplicate of your previous question ? Dec 7, 2010 at 12:51
  • @xenoterracide : Actually i was thinking like posting it on the same Qs, but thought will post it separate Qs as it can be discussed in detail. Dec 7, 2010 at 13:05
  • The first one talked about superblocks, dentries, etc. This one talks about page caches and dentry caches. Assuming those are different, this does seem to be a distinct question; I don't actually know anything about them though Dec 7, 2010 at 15:10
  • I suppose they are... though close... I should stop inquiring when I'm dead tired :P Dec 8, 2010 at 2:06

1 Answer 1

10

Page cache, sometimes referred to as disk cache, is a transparent RAM buffer for access to and from on-disk files. In general any memory not allocated to running applications is used for page cache space. /proc/meminfo contains information about, among other things, page cache. Executing cat /proc/meminfo | grep -iE "^(cached|dirty)" will display the size of the page cache and the volume of data marked "dirty", meaning file data that has been marked for writing to disk.

Dentry cache serves to improve performance access to the file system by storing entries representing the directory levels which comprise the representation of a path. Also contained in the dentry cache is an inode representing the object. Dentry cache resides opposite, or along side depending on perspective, the inode cache. The inode cache is comprised of two lists containing used and unused inodes respectively as well as a hash table of inodes in use. Every entry in the dentry cache contains an entry in the inode cache.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .