Kernel Configuration Reference¶
This section contains a reference of Nebula Graph system configuration settings.
It limits the size of core dumps. The recommended setting is unlimited, i.e.
ulimit -c unlimited.
It limits a user by number of opened files (file descriptors). The recommended setting is greater than 100,000. For example,
ulimit -n 130000.
It controls the relative weight given to swapping out of runtime memory, as opposed to dropping memory pages from the system page cache. The lower the value, the less swapping is used and the more memory pages are kept in physical memory. The recommended setting is 0. Note that 0 does not mean that there is no swapping out.
It is used to force the Linux VM to keep a minimum number of kilobytes free. If the system physical memory is large, it is recommended to increase this value (for example, if your physical memory 128GB, set it to 5GB). Otherwise, when there is not enough memory, the system cannot apply for large continuous physical memory.
It contains the maximum number of vma (virtual memory area) a process may have. The default value is 65530. If the memory application fails when the memory consumption is large, you can increase it appropriately.
This value contains a flag that enables memory overcommitment. It is recommended to set it to the default value 0 or 1. Do not set it to 2.
These values contain the the aggressiveness of the dirty page cache that controls the system. For write-intensive scenarios, you can make adjustments based on your needs (throughput priority or delay priority). It is recommended to use the system default.
Transparent Huge Page¶
Transparent Huge Pages (THP) must be disabled for better delay performance. The options are
/sys/kernel/mm/transparent_hugepage/defrag. For example:
echo never > /sys/kernel/mm/transparent_hugepage/enabled echo never > /sys/kernel/mm/transparent_hugepage/defrag swapoff -a && swapon -a
If set to the default value 1, it will time out the congestion window after an idle period. It is recommended to set to 0, especially for long fat links (high latency and large bandwidth).
This option, together with the backlog parameter called by the listen system, specifies the upper limit on how many connections the kernel will accept. For scenarios where a large number of burst connections are established, it is recommended to set it above 1024 (the default value is 128).
Maximum number of remembered connection requests. The setting rule is the same as
It determines the maximum number of packets. It is suggested raising this value to over 10,000 for high-throughput scenarios, especially 10G network adapters. The default value is 1,000.
Parameters to enable the TCP keep alive feature. For applications that use a 4-layer transparent load balancer, if the idle connection is unexpectedly disconnected, you can decrease
They represent the minimum, default and maximum size of the TCP socket receive buffer. For long fat links, it is recommended to increase the default value to bandwidth * RTT.
For SSD devices, it is recommended to set
/sys/block/DEV_NAME/queue/scheduler to noop or none.
It is recommended to set it to core and set
kernel.core_uses_pid to 1.
Parameter Usage Guide¶
sysctl conf_namechecks the current parameter value
sysctl -w conf_name=valuemodifies the parameter value and takes effect immediately
sysctl -ploads parameter values from relevant configuration files
Introduction to ulimit¶
ulimit provides control over the resources available to the shell and to processes started by it, on systems that allow such control. Please note that:
- Changes made by the
ulimitcommand are only valid for the current session (and child processes).
ulimitcannot adjust the (soft) threshold of a resource to be greater than the current hard value.
- Ordinary users cannot adjust the hard threshold (even using
sudo) through this command.
- To modify on the system level, or adjust the hard threshold, you need to edit the
/etc/security/limits.conffile. But this method needs to log in again to take effect.
prlimit tries to retrieve and/or modify the limits to a specified process. Together with the
sudo command, the hard threshold can be modified. For example,
prlimit --nofile = 130000 --pid = $$ can adjust the maximum number of open files allowed by the current process to 14000 and take effect immediately. Please note that this command is only available in RedHat 7u or later OS versions.