Zack'sKernel News
Zack'sKernel News
Chronicler Zack Brown reports on speeding up the dentry cache.
Speeding Up the Dentry Cache
Linus Torvalds wrote an experimental patch intended to speed up filesystem operations, specifically the directory entry (dentry) cache. However, he didn't really like his own patch – even though it worked. He hoped one of the kernel developers might do it better.
The dentry cache is a lookup table that sits in RAM and is used by the rest of the kernel to identify exactly where a desired file or directory is located on disk. Whenever you open, read, or edit a file, or anything like that, you use the dentry cache.
Typically, you really want that dentry cache lookup to be as fast as possible. You don't want to sit around waiting for your file to open. Especially if "you" are not a person but a process such as a database or whatnot, operating on tons and tons of files all at once, any delay can start to mount up.
[...]
Buy this article as PDF
(incl. VAT)