分类: 系统运维
2008-03-04 17:02:23
引用: |
1. /proc/sys/net/core/rmem_max — 最大的TCP数据接收缓冲 2. /proc/sys/net/core/wmem_max — 最大的TCP数据发送缓冲 3. /proc/sys/net/ipv4/tcp_timestamps — 时间戳在(请参考RFC 1323)TCP的包头增加12个字节 4. /proc/sys/net/ipv4/tcp_sack — 有选择的应答 5. /proc/sys/net/ipv4/tcp_window_scaling — 支持更大的TCP窗口. 如果TCP窗口最大超过65535(64K), 必须设置该数值为1 6. rmem_default — 默认的接收窗口大小 7. rmem_max — 接收窗口的最大大小 8. wmem_default — 默认的发送窗口大小 9. wmem_max — 发送窗口的最大大小 |
代码: |
sudo gedit /etc/rc.local |
代码: |
echo 256960 > /proc/sys/net/core/rmem_default echo 256960 > /proc/sys/net/core/rmem_max echo 256960 > /proc/sys/net/core/wmem_default echo 256960 > /proc/sys/net/core/wmem_max echo 0 > /proc/sys/net/ipv4/tcp_timestamps echo 1 > /proc/sys/net/ipv4/tcp_sack echo 1 > /proc/sys/net/ipv4/tcp_window_scaling |
代码: |
sudo gedit /etc/sysctl.conf |
代码: |
net.core.rmem_default = 256960 net.core.rmem_max = 256960 net.core.wmem_default = 256960 net.core.wmem_max = 256960 net.ipv4.tcp_timestamps = 0 net.ipv4.tcp_sack =1 net.ipv4.tcp_window_scaling = 1 |
chinaunix网友2008-10-03 18:12:52
vm.swappiness = 0 net.core.rmem_default = 524288 net.core.rmem_max = 524288 net.core.wmem_default = 524288 net.core.wmem_max = 524288 net.ipv4.tcp_wmem = 4096 87380 524288 net.ipv4.tcp_rmem = 4096 87380 524288 net.ipv4.tcp_mem = 524288 524288 524288 net.ipv4.tcp_rfc1337 = 1 net.ipv4.ip_no_pmtu_disc = 0 net.ipv4.tcp_sack = 1 net.ipv4.tcp_fack = 1 net.ipv4.tcp_window_scaling = 1 net.ipv4.tcp_timestamps = 1 net.ipv4.tcp_ecn = 0 net.ipv4.route.flush = 1