windows 7 TCP ack frequency.
Hi, i observed windows 7 TCP stack (in my PC) always sends TCP ACK message to server(sender) after receiving two segments(1460 byte X 2) even though receiver window size 17520 byte. i feel if we can wait more segments to receive and send ACK can improve data speed. can anyone help me to understand how windows 7 TCP stack behaves. regards DTDT
July 18th, 2012 5:02am

Hi, Based on my knowledge, this may be related to the flow control. Window size is sliding, therefore, please check the current window size both of the sender and the receiver. More information, please refer to Transmission Control Protocol. Hope this helps. Jeremy Wu TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 5:19am

hi, This issue happens only with certain brands of PCs. If all PCs use windows 7 operating system , Can TCP implementation differ from PC vendor to vendor. regards, DTDT
July 19th, 2012 8:19am

Hi, When troubleshooting, i observed this issue happens only with specific brand of computers. if all PCs use windows 7 operating system,can TCP implementation defer from PC vendor to Vendor. regards, DTDT
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 8:22am

Hi, Based on my knowledge, the Windows 7 modifies the Windows size dynamically as the new feature, so we won't suggest you to change the Windows size for this. If the issue happens only with specific brand of computers, please try modifying the parameters on the NIC cards to see if there is any changes: 1. In the run box, input "devmgmt.msc" to open the device manager. 2. Find the NIC card under the "network adapters". 3. Right-click the NIC card to choose properties. 4. Then, click the Advanced Tab. 5. Disable the Property as below: Large Send Offload(ipv4)Large Send Offloadv2 (ipv4)Large Send Offloadv2(ipv6)Receive Side ScalingTCP/UDP Checksum Offload (ipv4)TCP/UDP Checksum Offload (ipv6) Please disable these property on the problematic Pc's NIC cards, then reboot the machine after that. Then please check if there is any changes. Thanks. Best Regards, Annie Gu
July 24th, 2012 6:16am

hi Anne, i feel above issue due to TCP receive window and not related to ACK frequency. Do you have any idea on how windows 7 decide receive window size. DTDT
Free Windows Admin Tool Kit Click here and download it now
July 26th, 2012 3:15am

Hi, Thanks for the reply. Based on my experience, since windows Vista and windows 7, TCP receive auto-tuning is introduced in order to improve the TCP performance. With autotuning enabled, TCP will automatically enable the TCP window scaling option and select the scaling factor according to the auto-tuning level. Below table shows the mapping between the auto-tuning level and scaling factor. disabled = scale factor 0 highlyrestricted = scale factor 2 restricted = scale factor 4 normal = scale factor 8 experimental = scale factor 14 When the receive window auto-tuning feature is enabled, however, older routers, older firewalls, and older operating systems that are incompatible with the receive window auto-tuning feature as these older devices do not comply with the RFC 1323 standard. TCP heuristics or auto-tuning diagnostics feature determines whether a faulty device is in the path from your computer. furthermore with heuristics turned on, the window scaling factor for the outbound connection may vary based on the connection state. WSD will actively monitor the connection state whereby it can work out the appropriate scaling factor for the connection. Generally it will create a profile for each connection with specific destination and port, then record the state of each connection toward the same destination, for example, if the previous connection that has window scaling option presented ends up with being reset by the remote peer, WSD will log the result and make the TCP stack disable the window scaling option when another attempt to the same destination is made subsequently and then reacts according to the result. The symptom in the trace is one example of above behavior as the TCP connection to the same designation was reset in the past. you can also recreate the same symptom by following way: 1. On windows 7, telnet remote server port 445 or access the remote UNC path. You will notice the initial scaling factor is set to 8 (just clarify the default behavior a bit, with heuristics turned on and auto-receive level set to normal, WSD will first try out outbound connection with default scaling factor 8. If WSD detects the scaling factor is too aggressive for the destination later on, it will reduce the factor to 2. Certainly HTTP by default is not subject to above behavior). 2. Restart the server service on the remote server and it will essentially reset the connection established and you can find the TCP reset in the sniff trace. 3. On windows 7, try to connect to the remote server over port 445 again. you will find the TCP window scaling factor is disabled as WSD tries to make an attempt without scaling option and see if it makes a difference. Actually WSD will take into various combinations of scenarios like bandwidth/remote peer state/local connection state etc. to work out the best scaling option value. it is hard for me to provide more details of the algorithm as it is a proprietary implementation in windows as of now. But the effect of turning on TCP heuristics is you may see different scaling factor applied even for the same destination indeed. turning off heuristics will ensure windows always uses the default scaling factor for the connection regardless of the destination state. Windows will handle HTTP connection on Vista or Windows 7 in different way from other types of connection, HTTP connection is not subject to TCP receive window auto tuning and windows will use the highly restricted window scaling factor i.e. 2 for the HTTP connection as long as application calls WinINET or WinHTTP API. We can turn off this behavior by editing TCPautotuning registry. Test: With above considered, please follow below ways to make the windows 7 client use the window scaling factor 8 for every TCP connection: 1. Run command, netsh int tcp show global and verify Receive Window Auto-Tuning level is set to normal 2. Edit registry to turn off window scaling heuristics Value path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters Value type: DWORD Value name: EnableWsd Value data: 0 3. Turn on the auto-tuning featuring for HTTP connection. Value path: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp Value type: DWORD Value name: TcpAutotuning Value data: 1 4. Reboot the machine to take effect. 5. It is expected TCP window scaling factor is set to 8 for every TCP connection after making above changes. After that, please let me know the result. Thanks. Annie
July 26th, 2012 5:42am

Hi Annie, even through you have mentioned . i can see windows 7 client uses receive window size 64K with scaling factor 4. this results higher download speed. could you please help me to understand this. "Windows will handle HTTP connection on Vista or Windows 7 in different way from other types of connection, HTTP connection is not subject to TCP receive window auto tuning and windows will use the highly restricted window scaling factor i.e. 2 for the HTTP connection as long as application calls WinINET or WinHTTP API." DT
Free Windows Admin Tool Kit Click here and download it now
July 26th, 2012 11:56am

Hi, i tried what u request. i could not find window scaling factor set to 8. i tried 1. my PC LAN connection 2. through mobile broadband connection. in both cases window scaling factor not always 8. please find bellow output TCP Global Parameters ---------------------------------------------- Receive-Side Scaling State : enabled Chimney Offload State : automatic NetDMA State : disabled Direct Cache Acess (DCA) : disabled Receive Window Auto-Tuning Level : normal Add-On Congestion Control Provider : none ECN Capability : disabled RFC 1323 Timestamps : disabled DT
July 26th, 2012 12:54pm

hi, Thanks for the valuable information. There is no impact on data speed even if i modify above mentioned settings. regards, DTDT
Free Windows Admin Tool Kit Click here and download it now
July 27th, 2012 3:04am

Hi, Thanks for your reply. Based on my knowlege, the auto-tuning is different in Windows 7 and was modified dynamically. However, we don't make sure if disabling the auto-tuning can help to resolve the "ack" issue as you said. Please refer to the article below about this new feature in Windows 7: http://support.microsoft.com/kb/947239 http://support.microsoft.com/kb/983528 To turn off the default auto tuning behavior, (in elevated command prompt) type: netsh int tcp set global autotuninglevel=disabled After that, it will turn back to the behaviour in Windows XP. Please try this to see if it can improve the performance. Besides, as I understand, the purpose of the ticket is to improve the performance for Windows 7. However, it is that the performance will be improved after you see more segment with one ack in the tcp network traffic? I cannot make sure this behaviour can help to improve the perf in Windows 7. Previously, I suggest to disable the offload ones in the NIC card is to improve the performance on Windows 7. If that is not helpful, could you please let me know the real impact you have for this ticket? such as slow transmission between two Windows 7 or the other symptoms. Thanks. Best Regards, Annie
July 27th, 2012 6:08am

hi Annie, thanks for the reply. let me explain my test scenario. my purpose is the check HTTP single session download speed from a server located in the internet. test PC directly connected gateway router and internet side link capacity is about STM-1. when i check download speed from windows 7 PC ,i could achieve nearly 10Mbps speed from three type of computer brands and one type always limit around 2Mbps. this test carried out with several PCs and and not only a single PC. when i troubleshoot this issue, i can see victim PC always sends one ACK after receiving two segments whereas other PCs behavior is dynamic. they send ACK, say after four segment,five segment etc resulting high speed data transfer. i just want to know how operating system decides ACK message send time. 1. is it depend on bandwidth X delay product. 2. in bandwidth X delay product, how operating system decide bandwidth of the link. i feel if operating system let server to send more segments (till maximum receive window) and send ACK will improve ultimate download speed. Thaks DTDT
Free Windows Admin Tool Kit Click here and download it now
July 27th, 2012 11:31am

HI, Sorry for the late response due to I was out of office. With above considered, please follow below ways mentioned: Run command, input netsh int tcp reset and verify Receive Window Auto-Tuning level is set to normal(regardless of what youve done on your laptop). Download the hotfix from http://support.microsoft.com/default.aspx?scid=kb;EN-US;983528 and install it on your laptop.You may have to restart your computer after you apply this hotfix. If you follow the steps above and it dosent work, please try to follow the steps manually below: Run command, input netsh int tcp show global and verify Receive Window Auto-Tuning level is set to normalEdit registry to turn off window scaling heuristics Value path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters Value type: DWORD Value name: EnableWsd Value data: 0 Turn on the auto-tuning featuring for HTTP connection. Value path: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp Value type: DWORD Value name: TcpAutotuning Value data: 1 Reboot the machine to take effect.It is expected TCP window scaling factor is set to 8 for every TCP connection after making above changes. Note that in order to optimize TCP throughput, the TCP receive window for a connection should be set to a value that reflects both the BDP of the connection's transmission path and the application retrieve rate. Thanks. Best Regards, Annie gu
August 3rd, 2012 5:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics