You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have a permament cache section within the cache. I.e. one could mark certain blocks to never be evicted from the cache. Writeback of dirty blocks could be handled as the non-permanent blocks the only difference would be that these blocks are never removed from the cache.
The configuration of this would probably be the most difficult part.
The use case I have in mind for this would be to put inode blocks from the filesystem into the permanent cache. The Linux kernel will cache inodes in memory but there is no control on whether it remains there. Having them in the cache will prevent the kernel from going out to the backing device and seek for them. It will speed up searching and listing of files etc.
The text was updated successfully, but these errors were encountered:
A simpler solution is to set /proc/sys/vm/vfs_cache_pressure to 1 (default is 100), which will keep the inode blocks in RAM, in preference to any data blocks.
Also any inode blocks that don't fit in RAM are most likely in the read cache of the dm-writeboost device : inode's are typically 256 bytes so if you set the dm-writeboost read cache threshold to 8 (meaning 32kb or less), any set of 128 or less consecutive inodes (inodes from any folders with 128 or less files) will end up in the dm-writeboost SSD device anyway.
Yes, use write-around mode and set read_cache_threshold to a small number to indirectly achieve this goal is a good idea. A user is actually doing this to cache metadata only and he said it actually does some works.
It would be nice to have a permament cache section within the cache. I.e. one could mark certain blocks to never be evicted from the cache. Writeback of dirty blocks could be handled as the non-permanent blocks the only difference would be that these blocks are never removed from the cache.
The configuration of this would probably be the most difficult part.
The use case I have in mind for this would be to put inode blocks from the filesystem into the permanent cache. The Linux kernel will cache inodes in memory but there is no control on whether it remains there. Having them in the cache will prevent the kernel from going out to the backing device and seek for them. It will speed up searching and listing of files etc.
The text was updated successfully, but these errors were encountered: