Enabling or Disabling Transparent Hugepages

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

  • For Red Hat 7/CentOS 7 and Amazon Linux 2.0, you must enable transparent hugepages. The installer reports this issue with the identifier: S0312.
  • For all other systems, you must disable transparent hugepages or set them to madvise. The installer reports this issue with the identifier: S0310.

Disable Transparent Hugepages on Red Hat 6/CentOS 6 Systems

If you are using Red Hat 7/CentOS 7 or Amazon Linux 2.0, you must enable, rather than disable transparent hugepages. See: Enable Transparent Hugepages on Red Hat 7/CentOS 7 and Amazon Linux 2.0.

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:

  • Edit your boot loader (for example /etc/grub.conf). Typically, you add the following to the end of the kernel line. However, consult the documentation for your system before editing your boot loader configuration.
    transparent_hugepage=never
  • Edit /etc/rc.local and add the following script.
    if test -f /sys/kernel/mm/redhat_transparent_hugepage/enabled; then
       echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
    fi

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 and Amazon Linux 2.0

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

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:

  • Edit your boot loader (for example /etc/grub.conf). Typically, you add the following to the end of the kernel line. However, consult the documentation for your system before editing your bootloader configuration.

    transparent_hugepage=never
  • Edit /etc/rc.local (on systems that support rc.local) and add the following script.

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

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