These general Operating System settings are automatically made by the installer if they do not meet Vertica requirements. You can prevent the installer from automatically making these configuration changes by using the --no-system-configuration
parameter for the install_vertica
script.
This is the multi-page printable view of this section. Click here to print.
General operating system configuration - automatically configured by the installer
- 1: Sysctl
- 2: Nice limits configuration
- 3: min_free_kbytes setting
- 4: User max open files limit
- 5: System max open files limit
- 6: Pam limits
- 7: pid_max setting
- 8: User address space limits
- 9: User file size limit
- 10: User process limit
- 11: Maximum memory maps configuration
1 - Sysctl
During installation, Vertica attempts to automatically change various OS level settings. The installer may not change values on your system if they exceed the threshold required by the installer. You can prevent the installer from automatically making these configuration changes by using the --no-system-configuration
parameter for the install_vertica
script.
To permanently edit certain settings and prevent them from reverting on reboot, use sysctl.
The sysctl settings relevant to the installation of Vertica include:
Permanently changing settings with sysctl:
-
As the root user, open the /etc/sysctl.conf file:
# vi /etc/sysctl.conf
-
Enter a parameter and value:
parameter = value
For example, to set the parameter and value for
fs.file-max
to meet Vertica requirements, enter:fs.file-max = 65536
-
Save your changes, and close the /etc/sysctl.conf file.
-
As the root user, reload the config file:
# sysctl -p
Identifying settings added by the installer
You can see whether the installer has added a setting by opening the /etc/sysctl.conf file:
# vi /etc/sysctl.conf
If the installer has added a setting, the following line appears:
# The following 1 line added by Vertica tools. 2015-02-23 13:20:29
parameter = value
2 - Nice limits configuration
The Vertica system user (dbadmin by default) must be able to raise and lower the priority of Vertica processes. To do this, the nice option in the /etc/security/limits.conf
file must include an entry for the dbadmin user. The installer reports this issue with the identifier: S0010.
The installer automatically configures the correct setting if the default value does not meet system requirements. If an issue occurs when setting this value, or you use the --no-system-configuration
argument to the installer and the current setting is incorrect, then the installer reports this as an issue.
Note
Vertica never raises priority above the default level of 0. However, Vertica does lower the priority of certain Vertica threads and needs to able to raise the priority of these threads back up to the default level. This setting allows Vertica to raise the priorities back to the default level.All systems
To set the Nice Limit configuration for the dbadmin user, edit /etc/security/limits.conf
and add the following line. Replace dbadmin with the name of your system user.
dbadmin - nice 0
3 - min_free_kbytes setting
This topic details how to update the min_free_kbytes setting so that it is within the range supported by Vertica. The installer reports this issue with the identifier: S0050 if the setting is too low, or S0051 if the setting is too high.
The vm.min_free_kbytes setting configures the page reclaim thresholds. When this number is increased the system starts reclaiming memory earlier, when its lowered it starts reclaiming memory later. The default min_free_kbytes is calculated at boot time based on the number of pages of physical RAM available on the system.
The setting must be whichever value is the greatest from the following options:
-
The default value configured by the system
-
4096
-
The result of running the commands:
$ memtot=`grep MemTotal /proc/meminfo | awk '{printf "%.0f",$2}'` $ echo "scale=0;sqrt ($memtot*16)" | bc
The installer automatically configures the correct setting if the default value does not meet system requirements. If an issue occurs when setting this value, or you use the --no-system-configuration
argument to the installer and the current setting is incorrect, then the installer reports this as an issue.
All systems
To manually set min_free_kbytes:
-
Determine the current/default setting with the following command:
$ sysctl vm.min_free_kbytes
-
If the result of the previous command is
No such file or directory
or the default value is less than 4096, then run these commands to determine the correct value:$ memtot=`grep MemTotal /proc/meminfo | awk '{printf "%.0f",$2}'` $ echo "scale=0;sqrt ($memtot*16)" | bc
-
Edit or add the current value of
vm.min_free_kbytes
in/etc/sysctl.conf
with the value from the output of the previous command.# The min_free_kbytes setting vm.min_free_kbytes=16132
-
Run
sysctl -p
to apply the changes insysctl.conf
immediately.Note
These steps must be repeated for each node in the cluster.
4 - User max open files limit
This topic details how to change the user max open-files limit setting to meet Vertica requirements. The installer reports this issue with the identifier S0060.
The installer automatically configures the correct setting if the default value does not meet system requirements. If an issue occurs when setting this value, or you use the --no-system-configuration
argument to the installer and the current setting is incorrect, then the installer reports this as an issue.
Vertica requires that the dbadmin user not be limited when opening files. The open file limit per user is calculated as follows:
user max open files = greater of { ≥ 65536 | ≤ RAM-MBs }
As a dbadmin user, you can determine the open file limit by running ulimit -n
. For example:
$ ulimit -n
65536
To manually set the limit, edit /etc/security/limits.conf
and edit/add the nofile
setting for the user who is configured as the database administrator—by default, dbadmin
. For example:
dbadmin - nofile 65536
The setting must be no less than 65536 MB, but not greater than the system value of fs.nr_open
. For example, the default value of fs.nr_open
value on Red Hat Enterprise Linux 9 is 1048576 MB.
Note
The system also has a limit on open files.5 - System max open files limit
This topic details how to modify the limit for the number of open files on your system so that it meets Vertica requirements. The installer reports this issue with the identifier: S0120.
Vertica opens many files. Some platforms have global limits on the number of open files. The open file limit must be set sufficiently high so as not to interfere with database operations.
The recommended value is at least the amount of memory in MB, but not less than 65536.
The installer automatically configures the correct setting if the default value does not meet system requirements. If an issue occurs when setting this value, or you use the --no-system-configuration
argument to the installer and the current setting is incorrect, then the installer reports this as an issue.
All systems
To manually set the open file limit:
-
Run
/sbin/sysctl fs.file-max
to determine the current limit. -
If the limit is not 65536 or the amount of system memory in MB (whichever is higher), then edit or add
fs.file-max=
max number of files
to/etc/sysctl.conf
.# Controls the maximum number of open files fs.file-max=65536
-
Run
sysctl -p
to apply the changes insysctl.conf
immediately.
Note
These steps will need to be replicated for each node in the cluster.6 - Pam limits
This topic details how to enable the "su" pam_limits.so module required by Vertica. The installer reports issues with the setting with the identifier: S0070.
On some systems the pam module called pam_limits.so
is not set in the file /etc/pam.d/su
. When it is not set, it prevents the conveying of limits (such as open file descriptors) to any command started with su -
.
In particular, the Vertica init script would fail to start Vertica because it calls the Administration Tools to start a database with the su -
command. This problem was first noticed on Debian systems, but the configuration could be missing on other Linux distributions. See the pam_limits man page for more details.
The installer automatically configures the correct setting if the default value does not meet system requirements. If an issue occurs when setting this value, or you use the --no-system-configuration
argument to the installer and the current setting is incorrect, then the installer reports this as an issue.
All systems
To manually configure this setting, append the following line to the /etc/pam.d/su
file:
session required pam_limits.so
See the pam_limits man page for more details: man pam_limits
.
7 - pid_max setting
This topic explains how to change pid_max
to a supported value. The value of pid_max
should be
pid_max = num-user-proc + 2**15 = num-user-proc + 32768
where num-user-proc
is the size of memory in megabytes.
The minimum value for pid_max
is 524288.
If your pid_max
value is too low, the installer reports this problem and indicates the minimum value.
The installer automatically configures the correct setting if the default value does not meet system requirements. If an issue occurs when setting this value, or you use the --no-system-configuration
argument to the installer and the current setting is incorrect, then the installer reports this as an issue.
All systems
To change the pid_max
value:
# sysctl -w kernel.pid_max=524288
8 - User address space limits
This topic details how to modify the Linux address space limit for the dbadmin user so that it meets Vertica requirements. The address space setting controls the maximum number of threads and processes for each user. If this setting does not meet the requirements then the installer reports this issue with the identifier: S0090.
The installer automatically configures the correct setting if the default value does not meet system requirements. If an issue occurs when setting this value, or you use the --no-system-configuration
argument to the installer and the current setting is incorrect, then the installer reports this as an issue.
The address space available to the dbadmin user must not be reduced via user limits and must be set to unlimited.
All systems
To manually set the address space limit:
-
Run
ulimit -v
as the dbadmin user to determine the current limit. -
If the limit is not unlimited, then add the following line to
/etc/security/limits.conf
. Replace dbadmin with your database admin user
dbadmin - as unlimited
9 - User file size limit
This topic details how to modify the file size limit for files on your system so that it meets Vertica requirements. The installer reports this issue with the identifier: S0100.
The installer automatically configures the correct setting if the default value does not meet system requirements. If an issue occurs when setting this value, or you use the --no-system-configuration
argument to the installer and the current setting is incorrect, then the installer reports this as an issue.
The file size limit for the dbadmin user must not be reduced via user limits and must be set to unlimited.
All systems
To manually set the file size limit:
-
Run
ulimit -f
as the dbadmin user to determine the current limit. -
If the limit is not unlimited, then edit/add the following line to
/etc/security/limits.conf
. Replace dbadmin with your database admin user.
dbadmin - fsize unlimited
10 - User process limit
This topic details how to change the user process limit so that it meets Vertica requirements.The installer reports this issue with the identifier: S0110.
The installer automatically configures the correct setting if the default value does not meet system requirements. If an issue occurs when setting this value, or you use the --no-system-configuration
argument to the installer and the current setting is incorrect, then the installer reports this as an issue.
The user process limit must be high enough to allow for the many threads opened by Vertica. The recommended limit is the amount of RAM in MB and must be at least 1024.
All systems
To manually set the user process limit:
-
Run
ulimit -u
as the dbadmin user to determine the current limit. -
If the limit is not the amount of memory in MB on the server, then edit/add the following line to
/etc/security/limits.conf
. Replace 4096 with the amount of system memory, in MB, on the server.
dbadmin - nproc 4096
11 - Maximum memory maps configuration
This topic details how to modify the limit for the number memory maps a process can have on your system so that it meets Vertica requirements. The installer reports this issue with the identifier: S0130.
The installer automatically configures the correct setting if the default value does not meet system requirements. If an issue occurs when setting this value, or you use the --no-system-configuration
argument to the installer and the current setting is incorrect, then the installer reports this as an issue.
Vertica uses a lot of memory while processing and can approach the default limit for memory maps per process.
The recommended value is at least the amount of memory on the system in KB / 16, but not less than 65536.
All systems
To manually set the memory map limit:
-
Run
/sbin/sysctl vm.max_map_count
to determine the current limit. -
If the limit is not 65536 or the amount of system memory in KB / 16 (whichever is higher), then edit/add the following line to
/etc/sysctl.conf
. Replace 65536 with the value for your system.# The following 1 line added by Vertica tools. 2014-03-07 13:20:31 vm.max_map_count=65536
-
Run
sysctl -p
to apply the changes insysctl.conf
immediately.