-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fossilize_db: Reduce cache thrashing on reads
As a background service, we don't want to dominate the cache, so hint the kernel that we no longer need the data in cache. Also hint the kernel in the database scanner loop that we're going to read the database sequentially, then discard the file from the page cache. This won't actually remove data from the cache, only promote it to be discarded first on cache pressure. This should be a no-op as long as enough RAM is available to the system. Otherwise, it should stop the kernel from swapping out anonymous data or warm cache entries owned by other applications. See-also: #84 See-also: #99 Signed-off-by: Kai Krakow <kai@kaishome.de>
- Loading branch information
Showing
1 changed file
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters