Enabling or disabling defrag
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.
Note
The steps to disable defrag on Red Hat 6/CentOS 6 systems differ from those used to disable defrag on Red Hat 7/CentOS 7 and Red Hat 8/CentOS 8.For SUSE 15.1, Vertica recommends that you enable defrag for optimized performance.
Recommended settings by workload for red hat 8/CentOS 8 and SUSE 15.1
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 8.0/CentOS 8.0 | 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 6/CentOS 6 systems
-
Determine if defrag is enabled by running the following command:
cat /sys/kernel/mm/redhat_transparent_hugepage/defrag [always] madvise never
The setting returned in brackets is your current setting. If you are not using
madvise
ornever
as your defrag setting, then you must disable defrag. -
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/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/redhat_transparent_hugepage/defrag
Disabling defrag on red hat 7/CentOS 7, red hat 8/CentOS 8, and SUSE 15.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
ornever
as your defrag setting, then you must disable defrag. -
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
-
If you are using Red Hat 7.0/CentOS 7.0 or Red Hat 8.0/CentOS 8.0, run the following command as root or sudo:
$ chmod +x /etc/rc.d/rc.local
Enabling defrag on red hat 7/8, CentOS 7/8, and SUSE 15.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
oralways
as your defrag setting, then you must enable defrag. -
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
-
If you are using Red Hat 7.0/CentOS 7.0 or Red Hat 8.0/CentOS 8.0, run the following command as root or sudo:
$ chmod +x /etc/rc.d/rc.local