Monday, November 10, 2014

Tweaking your load generator machine if you are using the Windows platform


I have done this for a while, recently, some guy came to me and ask the same questions they noticed, here is the story:
Sometimes, we need to pay attention if you noticed the performance result is adding 200ms latency comparing with previous results on windows platform, that may due to the following reason (AKA, Nagle algorithm):

http://en.wikipedia.org/wiki/Nagle%27s_algorithm

How to fix the problem, to enable the TCP no delay on Client side!!! (TCP_NODELAY):

http://www.justanswer.com/computer/3du1a-rid-200ms-delay-tcp-ip-ack-windows.html

Meanwhile, you also want to tweak/increase your dynamic tcp/udp port range to support more concurrency requests to avoid port exhaustion
https://docs.microsoft.com/en-us/windows/client-management/troubleshoot-tcpip-port-exhaust

Check ipv4 tcp dynamic ports value: 
PS C:\WINDOWS\system32> netsh int ipv4 show dynamicport tcp 

Set  ipv4 tcp dynamic ports value (need administrator rights):
PS C:\WINDOWS\system32> netsh int ipv4 set dynamicport tcp start=10000 num=20000

P.S. meanwhile, if you have TCP Ack delayed configured on the server side, you may consider to disable it by using the TCP_QUICKACK socket option , since this could cause another 200ms delay to send acks to clients.

No comments:

Post a Comment