性别 男 UID 1 积分 36465 主题 1880 帖子 29240 精华 109 阅读权限 255 好友 1543 日志 267 微博 83 相册 7 在线时间 19472 小时 注册时间 2003-7-25 最后登录 2012-5-23 现金 5140 元
性别 男 主题 1880 精华 109 好友 1543 金币1470 个 威望1009 点
本文简化了speedguide.net上的优化指南,highnfar亲测有效。献给澳宝网友。
window 7/vista 集成了一些新特性,可以通过调整tcp/ip参数来优化网络速度,包括使用命令行和修改注册表两个步骤。读者也可以使用本文附带的全自动优化程序优化,解压附件中文件后,右击图标选择“以管理员身份运行”(run as administrator)即可。
SG_Vista_TcpIp_patch.zip
(1.36 KB, 下载次数: 24)
一、使用命令行调整参数。
进入 Start > All Programs > Accessories > 右击 Command Prompt (命令行)并选择 "Run as Administrator".
1. 检查tcp/ip状态
在命令行中输入
netsh int tcp show global
即可显示当前的tcp/ip参数状态,如下图所示,其中有两项最重要的参数是"Auto-Tuning Level"和"Congestion Control Provider".
2. 设置TCP参数
2(a). Disable Windows Scaling heuristics
在命令行中输入
netsh int tcp set heuristics disabled
2(b). TCP Auto-Tuning
在命令行中输入
netsh int tcp set global autotuninglevel=normal
如果遇到NAT router 或者 SPI firewall问题,此项可以尝试设置成disable。
2(c). Compound TCP - 增加吞吐率
在命令行中输入
netsh int tcp set global congestionprovider=ctcp
2(d). ECN Capability
在命令行中输入
netsh int tcp set global ecncapability=enable
2(e). RSS - Receive-side Scaling
在命令行中输入
netsh int tcp set global rss=enabled
2(f). TCP Chimney Offload
在命令行中输入
netsh int tcp set global chimney=enabled
2(g). Direct Cache Access (DCA)
在命令行中输入
netsh int tcp set global dca=enabled
3. 编辑注册表
在开始菜单中,点击运行(run),然后输入regedit,回车。以下调整值如果在相应位置找不到,可以右击并新建。
3(a). MTU (Maximum Transmission Unit) - the maximum packet size.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{...}\
MTU=1500 (DWORD)
{....}指你当前使用的网络适配器,通常以一长串字符表示,点击后可以在参数中看到你的ip地址。
3(b). TCP 1323 Options
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
Tcp1323Opts=1 (DWORD)
3(c). NetDMA (TCPA)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
EnableTCPA=1 (DWORD)
3(d). Checksum Offloading (DisableTaskOffload)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
DisableTaskOffload=0 (DWORD)
3(e). DefaultTTL
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
DefaultTTL=64 (DWORD)
3(f). TcpMaxDataRetransmissions
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
TCPMaxDataRetransmissions=7 (DWORD)
3(g). SynAttackProtect
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
SynAttackProtect=1 (DWORD)
3(h). Network Throttling Index
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile
NetworkThrottlingIndex=ffffffff (DWORD)
3(g). Set DNS and Hosts Priority
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider
LocalPriority=4 (DWORD, recommended: 4, default: 499) - local names cache
HostsPriority=5 (DWORD, recommended: 5, default: 500) - the HOSTS file
DnsPriority=6 (DWORD, recommended: 6, default: 2000) - DNS
NetbtPriority=7 (DWORD, recommended: 7, default: 2001) - NetBT name resolution, including WINS
3(h). TcpTimedWaitDelay (port allocation)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
MaxUserPort=65534 (DWORD)
TcpTimedWaitDelay=30 (DWORD)
3(i). Network Memory Allocation
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
LargeSystemCache=1 (DWORD)
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
Size=3 (DWORD)
踩过的脚印