System information
188 System Analysis and Tuning Guide
The special files in the /proc file system can modify the size and behavior of kernel
socket buffers; for general information about the /proc file system, see Section2.6,
“The /proc File System” (page35). Find networking related files in:
/proc/sys/net/core
/proc/sys/net/ipv4
/proc/sys/net/ipv6
General net variables are explained in the kernel documentation (linux/Docu
mentation/sysctl/net.txt). Special ipv4 variables are explained in lin
ux/Documentation/networking/ip-sysctl.txt and linux/Docu
mentation/networking/ipvs-sysctl.txt.
In the /proc file system, for example, it is possible to either set the Maximum Sock-
et Receive Buffer and Maximum Socket Send Buffer for all protocols, or both these
options for the TCP protocol only (in ipv4) and thus overriding the setting for all
protocols (in core).
/proc/sys/net/ipv4/tcp_moderate_rcvbuf
If /proc/sys/net/ipv4/tcp_moderate_rcvbuf is set to 1, autotuning
is active and buffer size is adjusted dynamically.
/proc/sys/net/ipv4/tcp_rmem
The three values setting the minimum, initial, and maximum size of the Memo-
ry Receive Buffer per connection. They define the actual memory usage, not just
TCP window size.
/proc/sys/net/ipv4/tcp_wmem
The same as tcp_rmem, but just for Memory Send Buffer per connection.
/proc/sys/net/core/rmem_max
Set to limit the maximum receive buffer size that applications can request.
/proc/sys/net/core/wmem_max
Set to limit the maximum send buffer size that applications can request.
Via /proc it is possible to disable TCP features that you do not need (all TCP fea-
tures are switched on by default). For example, check the following files:
/proc/sys/net/ipv4/tcp_timestamps
TCP timestamps are defined in RFC1323.
/proc/sys/net/ipv4/tcp_window_scaling
TCP window scaling is also defined in RFC1323.