第 30 章 减少 TCP 性能高峰
生成 TCP 时间戳可能会导致 TCP 性能高峰。sysctl
命令控制 TCP 相关条目的值,设置在 /proc/sys/net/ipv4/tcp_timestamps
中找到的时间戳内核参数。
先决条件
- 管理员特权。
30.1. 关闭 TCP 时间戳
关闭 TCP 时间戳可能会降低 TCP 性能高峰。
流程
关闭 TCP 时间戳:
# sysctl -w net.ipv4.tcp_timestamps=0 net.ipv4.tcp_timestamps = 0
输出显示
net.ip4.tcp_timestamps
选项的值是0。
也就是说,TCP 时间戳被禁用。