Closed ventureoo closed 12 months ago
I guess the settings could be a little more customized
w- /sys/kernel/mm/transparent_hugepage/enabled - - - - - madvise w- /sys/kernel/mm/transparent_hugepage/khugepaged/defrag - - - - - - 1 w- /sys/kernel/mm/transparent_hugepage/defrag - - - - - defer+madvise
@ventureoo
Failed to write file "/sys/kernel/mm/transparent_hugepage/defrag": Invalid argument
@ventureoo
Failed to write file "/sys/kernel/mm/transparent_hugepage/defrag": Invalid argument
https://github.com/CachyOS/CachyOS-Settings/pull/31/commits/b26ae7bed801909980498de3ccade8fdd19d4810
Should fix it
Kernel docs imply that setting defrag to 'madvise' would perform the stalling behavior seen in 'always', wouldn't 'defer' be more advantageous than 'defer+madvise' for interactivity?
Update: Team Fortress 2 does not seem to allocate any hugepages at all if /transparent_hugepage/enabled is set to 'madvise' instead of 'always', this appears to be a global issue with TCMalloc: https://github.com/google/tcmalloc/issues/85
Update: Team Fortress 2 does not seem to allocate any hugepages at all if /transparent_hugepage/enabled is set to 'madvise' instead of 'always', this appears to be a global issue with TCMalloc: https://github.com/google/tcmalloc/issues/85
Thanks for notice. I'll remove madvise for transparent_hugepage/enabled
in that case.
@ptr1337 I've signed the last commit. Are there any objections to this PR?
This should improve the performance of applications that use the tcmalloc memory allocator, which is used by Chromium/Electron and Valve's native games, among others. Ref: https://github.com/google/tcmalloc/blob/master/docs/tuning.md#system-level-optimizations