System information

Tuning the Network 189
/proc/sys/net/ipv4/tcp_sack
Select acknowledgments (SACKS).
Use sysctl to read or write variables of the /proc file system. sysctl is prefer-
able to cat (for reading) and echo (for writing), because it also reads settings
from /etc/sysctl.conf and, thus, those settings survive reboots reliably. With
sysctl you can read all variables and their values easily; as root use the following
command to list TCP related settings:
sysctl -a | grep tcp
NOTE: Side-Effects of Tuning Network Variables
Tuning network variables can affect other system resources such as CPU or
memory use.
16.2 Detecting Network Bottlenecks
and Analyzing Network Traffic
Before starting with network tuning, it is important to isolate network bottlenecks and
network traffic patterns. There are some tools that can help you with detecting those
bottlenecks.
The following tools can help analyzing your network traffic: netstat, tcpdump,
and wireshark. Wireshark is a network traffic analyzer.
16.3 Netfilter
The Linux firewall and masquerading features are provided by the Netfilter kernel
modules. This is a highly configurable rule based framework. If a rule matches a
packet, Netfilter accepts or denies it or takes special action (“target”) as defined by
rules such as address translation.
There are quite some properties, Netfilter is able to take into account. Thus, the more
rules are defined, the longer packet processing may last. Also advanced connection
tracking could be rather expensive and, thus, slowing down overall networking.