Skip to content

Commit

Permalink
tmpfiles.d: Add thp-shrinker config to reduce memory usage (#108)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Jung <[email protected]>
  • Loading branch information
ptr1337 authored Oct 27, 2024
1 parent 6b32afb commit e3d1c83
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions usr/lib/tmpfiles.d/thp-shrinker.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# THP Shrinker has been added in the 6.12 Kernel
# Default Value is 511
# THP=always policy vastly overprovisions THPs in sparsely accessed memory areas, resulting in excessive memory pressure and premature OOM killing
# 409 means that any THP that has more than 409 out of 512 (80%) zero filled filled pages will be split.
# This reduces the memory usage, when THP=always used and the memory usage goes down to around the same usage as when madivise is used, while still providing equal performance improvement
w! /sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_none - - - - 409

0 comments on commit e3d1c83

Please sign in to comment.