需要调整负载机的注册表,然后重启负载机:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
需要调整的值: MaxUserPort:最大动态端口数(Default = 5000, Max = 65534) TcpTimedWaitDelay:TCP等待延迟时间(30) TcpNumConnections:TCP最大连接数(Default = 16,777,214) MaxFreeTcbs:最大TCP控制块(1000-2000) MaxHashTableSize:最大TCB Hash table数量(64-65536) 解析中值为10进制,下方脚本已全转换为16进制:
“MaxUserPort”=dword:fffe
“TcpTimedWaitDelay”=dword:1e
“TcpNumConnections”=dword:fffffe
“MaxFreeTcbs”=dword:7D0
“MaxHashTableSize”=dword:10000 =====================================================
另外,修改Jmeter配置,然后重启Jmeter
在Jmeter的bin目录下,user.properties文件中添加如下配置:
httpclient4.retrycount=1
hc.parameters.file=hc.parameters同样bin目录下,在hc.parameters文件中添加如下配置:
http.connection.stalecheck$Boolean=true