Changing the defrag Setting of Transparent HugePages
This procedure shows how to change the defragmentation setting of THP by setting a
value in the sysfs
virtual file system.
For more information about using the sysfs
virtual file system, see
Oracle Linux 8: Managing Kernels and System Boot
To change the THP defrag setting you need to write the new setting to
/sys/kernel/mm/transparent_hugepage/defrag
Note:
The bestdefrag
setting varies from system to system. Reclaiming
pages and memory compaction can increase the number of THP pages available.
However, the process also uses CPU time. Therefore, you need to find the correct
balance for a specific system.
The following example shows you how to set the defrag
setting to
madvise
.