Kernel Runtime Configuration: Difference between revisions
Line 108: | Line 108: | ||
====net.ipv4.tcp_sack==== | ====net.ipv4.tcp_sack==== | ||
Enables/disables select acknowledgements (SACK). | |||
====net.ipv4.tcp_no_metrics_save==== | ====net.ipv4.tcp_no_metrics_save==== | ||
=vm= | =vm= |
Revision as of 18:59, 8 June 2017
External
- sysctl tweaks https://wiki.mikejung.biz/Sysctl_tweaks
Internal
fs
kernel
kernel.hostname
kernel.pid_max
Represents the maximum number of processes allowed on the system.
net
core
net.core.rmem_default
The default setting in bytes of the socket receive buffer, for all protocol. It may be overwritten by more specific per-protocol values, such as net.ipv4.tcp_rmem. This value may be set by the application using SO_RCVBUF socket option, up to net.core.rmem_max bytes. This value can be changed without reboot.
net.core.rmem_max
The maximum socket receive buffer size. Application can change the size of the receive buffer using SO_RCVBUF up to this limit. This value can be changed without reboot.
net.core.wmem_default
The default setting in bytes of the socket send buffer. It may be overwritten by more specific per-protocol values, such as net.ipv4.tcp_wmem. This may be set by the application using SO_SNDBUF socket option, up to net.core.wmem_max bytes. This value can be changed without reboot.
net.core.wmem_max
The maximum socket receive buffer size. The socket buffer size may be set by using the SO_SNDBUF socket option. This value can be changed without reboot.
net.core.netdev_max_backlog
'net.core.netdev_max_backlog' determines the maximum number of packets, queued on the INPUT side, when the interface receives packets faster than kernel can process them.
ipv4
net.ipv4.tcp_rmem
'net.ipv4.tcp_rmem' is a vector of 3 integers: [min, default, max]. These parameters are used by TCP to adjust receive buffer sizes. TCP dynamically adjusts the size of the receive buffer from the defaults specified by the attribute, in the range of these values, depending on memory available in the system.
"min" is the minimum size of the receive buffer used by each TCP socket. The default value is the system page size. This value is used to ensure that in memory pressure mode, allocations below this size will still succeed. This is not used to limit the size of the receive buffer declared using SO_RCVBUF on a socket.
"default" is the default size of the receive buffer for a TCP socket. This value overwrites the initial default buffer size from the generic net.core.rmem_default defined for all protocols. If larger receive buffer sizes are desired, this value should be increased, and it will affect all sockets. To enable large TCP windows, net.ipv4.tcp_window_scaling must be enabled.
"max" is the maximum size of the receive buffer used by each TCP socket. The default value is calculated using the formula:
max(87380, min(4MB, tcp_mem[1]*PAGE_SIZE/128))
This value does NOT override the global net.core.rmem_max. This is not used to limit the size of the receive buffer declared using SO_RCVBUF on a socket.
Example:
net.ipv4.tcp_rmem=4096 12582912 16777216
net.ipv4.tcp_wmem
'net.ipv4.tcp_wmen' is a vector of 3 integers: [min, default, max]. These parameters are used by TCP to adjust send buffer sizes. TCP dynamically adjusts the size of the send buffer from the default values listed below, in the range of these values, depending on memory available.
"min" represents the minimum size of the send buffer used by each TCP socket. The default value is the system page size. This value is used to ensure that in memory pressure mode, allocations below this size will still succeed. This is not used to bound the size of the send buffer declared using SO_SNDBUF on a socket.
"default" represents the default size of the send buffer for a TCP socket. This value overwrites the initial default buffer size from the generic global net.core.wmem_default defined for all protocols. If larger send buffer sizes are desired, this value should be increased, and it will affect all sockets. To allow for large TCP windows, net.ipv4.tcp_window_scaling must be set to a non-zero value.
"max" represents the maximum size of the send buffer used by each TCP socket. This value does not override net.core.wmem_max. This is not used to limit the size of the send buffer declared using SO_SNDBUF on a socket. The default value is calculated using the formula:
max(65536, min(4MB, tcp_mem[1]*PAGE_SIZE/128))
Example:
net.ipv4.tcp_wmem=4096 12582912 16777216
net.ipv4.tcp_window_scaling
1 enables TCP window scaling, which will allow the kernel to dynamically increase the TCP window.
net.ipv4.tcp_timestamps
TCP timestamp feature allows round trip time measurement, by adding 8 bytes to TCP header. TCP timestamps may be turned off to reduce performance spikes related to timestamp generation. 1 indicates that timestamps are on, 0 indicates they are off.
net.ipv4.tcp_timestamps=0
net.ipv4.tcp_sack
Enables/disables select acknowledgements (SACK).