Changing the Current Status of Transparent HugePages
This procedure shows how to change the current status 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 current status of THP, you need to write the preferred settings to
/sys/kernel/mm/transparent_hugepage/enabled
. The following example
shows you how to set the status to always
.
Note:
Virtual file systems such as sysfs
provide a file system interface to
items that aren't necessarily stored as files on disk. The sysfs
files
therefore don't always interact with file commands in the same way that regular physical
files on disk would. In the example procedure, the echo
command used
doesn't overwrite /sys/kernel/mm/transparent_hugepage/enabled
, as it
would if used with a regular file, but instead changes the selected option.