Enabling or disabling defrag

You can modify the defrag utility to meet Vertica configuration requirements, or to optimize your system performance by workload.

You can modify the defrag utility to meet Vertica configuration requirements, or to optimize your system performance by workload.

On all Red Hat/CentOS systems, you must disable the defrag utility to meet Vertica configuration requirements.

For SUSE 15.1, Vertica recommends that you enable defrag for optimized performance.

Vertica recommends defrag settings to optimize performance by workload. The following table contains recommendations for systems that primarily run concurrent queries (such as short-running dashboard queries), or sequential SELECT or load (COPY) queries:

Operating System Concurrent Sequential
Red Hat/CentOS Disable Disable
SUSE 15.1 Enable Enable

See Enabling or disabling transparent hugepages for additional settings that optimize your system performance by workload.

Disabling defrag on Red Hat/CentOS and SUSE 15.1

  1. Determine if defrag is enabled by running the following command:

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

    The setting returned in brackets is your current setting. If you are not using madvise or never as your defrag setting, then you must disable defrag.

  2. Edit /etc/rc.local, and add the following script:

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

    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/transparent_hugepage/defrag
    
  3. If you are using Red Hat or CentOS, run the following command as root or sudo:

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

Enabling defrag on Red Hat/CentOS and SUSE 15.1

  1. Determine if defrag is enabled by running the following command:

    cat /sys/kernel/mm/transparent_hugepage/defrag
    [never] madvise never
    

    The setting returned in brackets is your current setting. If you are not using madvise or always as your defrag setting, then you must enable defrag.

  2. Edit /etc/rc.local, and add the following script:

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

    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 always > /sys/kernel/mm/transparent_hugepage/defrag
    
  3. If you are using Red Hat or CentOS, run the following command as root or sudo:

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