|
|
Subscribe / Log in / New account

Program launch seems to be a key factor

Program launch seems to be a key factor

Posted Mar 13, 2020 2:19 UTC (Fri) by gus3 (guest, #61103)
Parent article: Dentry negativity

As a user (or even several users) go about the day's work, they launch programs like command shells, web browsers, integrated office suites, and site-specific options such as NEdit or Vivaldi. The positive-negative dentry ratio probably reaches a stable value as the OS stays up. Individual users' files that get opened would impact that ratio very little, even if a regular user has a chroot program that crashes and re-starts every 30 seconds.

So why not specify the dentry cache as a ratio of positive-to-negative? The dentry cache can be split 2:1 or 3:1 or 50:1, giving positive dentries N positions for every 1 negative dentry position. Calculate the dentry cache size, then split the cache and move forward, with effectively two caches. As lookups get called, the caches get refreshed, both successes and failures. Eventually, the stale entries in each cache become invalidated and ejected, while the survivors continue to speed up performance.

On a basic desktop system, a 3- or 4-to-1 ratio might suffice for performance. On a particular server like FreeDB, the ratio would probably be very different. But that seems to me to be a basic, yet powerful sysctl tuning knob.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds