3 ms·
My desktop has ~2MB of basenames on it. Memory isn’t free, and there’s more to an inode than a filename, but it seems odd that this data that’s the size of a c
by gorgoiler 5y ago
My desktop has ~2MB of basenames on it. Memory isn’t free, and there’s more to an inode than a filename, but it seems odd that this data that’s the size of a cat photo doesn’t get special treatment over other vm cache data.
- thanatos519 5y agoThat's tunable, and apparently the default is reasonable: https://sysctl-explorer.net/vm/vfs_cache_pressure/ https://sysctl-explorer.net/vm/vfs_cache_pressure/ My workstation has 64GB of RAM and only ~7M directory entries so I have 'vm.vfs_cache_pressure = 1' in /etc/sysctl.conf and cache everything with a full directory traversal via find. The first time it takes 52s; subsequent times take 5s. It has never given me memory problems.
- spicybright 5y agoI'm assuming the cache isn't kept on disk tho, right? As in 52s the first time since boot, 5+ for subsequent runs (incorporating time for changed files/directories)