Enabling or Disabling Transparent Hugepages

You can modify transparent hugepages so that the configuration meets Vertica requirements.

Disable Transparent Hugepages on Red Hat 6/CentOS 6 Systems

Important: If you are using Red Hat 7/CentOS 7, you must enable, rather than disable transparent hugepages. See: Enable Transparent Hugepages on Red Hat 7/CentOS 7 Systems.

Determine if transparent hugepages is enabled. To do so, run the following command.

cat /sys/kernel/mm/redhat_transparent_hugepage/enabled
[always] madvise never

The setting returned in brackets is your current setting.

If you are not using madvise or never as your transparent hugepage setting, then you can disable transparent hugepages in one of two ways:

For systems that do not support /etc/rc.local, use the equivalent startup script that is run after the destination runlevel has been reached. For example SuSE uses /etc/init.d/after.local.

Regardless of which approach you choose, you must reboot your system for the setting to take effect, or run the following echo line to proceed with the install without rebooting:

echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled

Enable Transparent Hugepages on Red Hat 7/CentOS 7 Systems

Determine if transparent hugepages is enabled. To do so, run the following command.

cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never

The setting returned in brackets is your current setting.

For systems that do not support /etc/rc.local, use the equivalent startup script that is run after the destination runlevel has been reached. For example SuSE uses /etc/init.d/after.local.

You can enable transparent hugepages by editing /etc/rc.local and adding the following script:

if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
    echo always > /sys/kernel/mm/transparent_hugepage/enabled
fi

You must reboot your system for the setting to take effect, or, as root, run the following echo line to proceed with the install without rebooting:

# echo always > /sys/kernel/mm/transparent_hugepage/enabled

If you are using Red Hat 7.0 or CentOS 7.0 or higher, run the following command as root or sudo:

$ chmod +x /etc/rc.d/rc.local

Disable Transparent Hugepages on Other Systems

Note: SuSE did not offer transparent hugepage support in its initial 11.0 release. However, subsequent SuSE service packs do include support for transparent hugepages.

To determine if transparent hugepages is enabled, run the following command.

cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never

The setting returned in brackets is your current setting. Depending on your platform OS, the madvise setting may not be displayed.

You can disable transparent hugepages one of two ways:

For systems that do not support /etc/rc.local, use the equivalent startup script that is run after the destination runlevel has been reached. For example SuSE uses /etc/init.d/after.local.

Regardless of which approach you choose, you must reboot your system for the setting to take effect, or run the following two echo lines to proceed with the install without rebooting:

echo never > /sys/kernel/mm/transparent_hugepage/enabled