Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
how is this not a duplicate of your previous question ? –  xenoterracide Dec 7 '10 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. –  Sen Dec 7 '10 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 –  Michael Mrozek Dec 7 '10 at 15:10
    
I suppose they are... though close... I should stop inquiring when I'm dead tired :P –  xenoterracide Dec 8 '10 at 2:06

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.