Disabling transparent hugepages

Disable transparent hugepages to avoid java heap space errors when you run statements.

About this task

Disabling transparent hugepages can also improve performance.

Procedure

  1. For each node in your cluster, run the following command:
    echo never > /sys/kernel/mm/transparent_hugepage/enabled
    This command disables hugepages only temporarily.
  2. Add the following command to the /etc/rc.local file to run the command automatically when you reboot.
    if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
        echo never > /sys/kernel/mm/transparent_hugepage/enabled
    fi
  3. Make sure that /etc/rc.local is executed on startup.