Skip to content

Commit

Permalink
dist: sysctl: increase vm.vfs_cache_pressure
Browse files Browse the repository at this point in the history
Our usage of inodes is dual:

 - the Index.db and Data.db components are pinned in memory as
   the files are open
 - all other components are read once and never looked at again

As such, tune the kernel to prefer evicting dcache/inodes to
memory pages. The default is 100, so the value of 2000 increases
it by a factor of 20.

Ref #14506

Closes #14509
  • Loading branch information
avikivity authored and xemul committed Jul 10, 2023
1 parent 0cabf4e commit 2de168e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dist/common/sysctl.d/99-scylla-vm.conf
Expand Up @@ -6,3 +6,10 @@
# swap anonymous memory any more, which puts the server at the risk
# of OOM).
vm.swappiness = 1

# Give a high preference to evicting inodes/dcache over swapping.
# Our use of inodes is to either pin them (keeping open Data.db
# and Index.db components) or to use them once and never touch them
# again until deletion (all other components). Therefore evicting
# them early is preferable to keeping them around.
vm.vfs_cache_pressure = 2000

0 comments on commit 2de168e

Please sign in to comment.