2.12. Reduce TCP Performance Spikes
Turn timestamps off to reduce performance spikes related to timestamp generation. The
sysctl
command controls the values of TCP related entries, setting the timestamps kernel parameter found at /proc/sys/net/ipv4/tcp_timestamps
.
- Turn timestamps off with the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ~]# sysctl -w net.ipv4.tcp_timestamps=0 net.ipv4.tcp_timestamps = 0
~]# sysctl -w net.ipv4.tcp_timestamps=0 net.ipv4.tcp_timestamps = 0
- Turn timestamps on with the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ~]# sysctl -w net.ipv4.tcp_timestamps=1 net.ipv4.tcp_timestamps = 1
~]# sysctl -w net.ipv4.tcp_timestamps=1 net.ipv4.tcp_timestamps = 1
- Print the current value with the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ~]# sysctl net.ipv4.tcp_timestamps net.ipv4.tcp_timestamps = 1
~]# sysctl net.ipv4.tcp_timestamps net.ipv4.tcp_timestamps = 1
The value1
indicates that timestamps are on, the value0
indicates they are off.