networking - Doing uploads from my windows 7 machine causes high ping time

07
2014-04
  • user1088084

    Without a program doing uploads, my 64-bit Windows 7 laptop does great - 40 ms ping time, 5 MB download rate.

    If anything starts uploading (Dropbox, for instance), ping times suddenly increase over 2000 ms! Download rate, once a connection is eventually established, doesn't seem to be too affected.

    I turned off Windows Firewall, no change. Why is this problem occurring? Is there anything I can do to prevent major latency increases while I upload files?

    Thanks!

  • Answers
  • MDT Guy

    This should be expected, since you're using the network adaptor to upload files. Your system's network response time will be delayed, especially if you're uploading.

  • Kevin Panko

    This sounds like the symptoms of Bufferbloat.

    Basically, what happens is that somewhere on your network link, there is a large buffer which is holding your outgoing packets. When a ping packet is sent out, it ends up in this buffer and has to wait a long time before all the packets in front of it can be sent first. The actual network speed is not affected by this, meaning that the rate of packets going through the buffer is the same as normal.

    Imagine this like a thin pipe with a fat bulge in the middle. As small amounts of water flow through, no effect is noticed. Only when a large amount of water is flowing, will the bulge fill with water. The rate of water going in and coming out is the same, but water spends more time inside the pipe than normal.

    The cure for this is to find out where the problem lies, and reduce the size of this buffer to limit the amount of packets that slow down the ping traffic. This may be easier said than done. If the problem is in your router, then you could try using CeroWRT and adjust the buffer sizes. If the problem is in your ISP, you can adjust your router to send data slightly slower than your available bandwidth, which prevents the buffer from ever being filled.

    More advice can be found on this question: How to mitigate BufferBloat on an ADSL connection?

    Check your connection with The ICSI Netalyzr (Java required). It will let you know what is going on with your network connection.


  • Related Question

    networking - Long delay when pinging Windows 7 machine by name vs by ip
  • mindless.panda

    This question regards machines accessing/pinging one another on my local network by name vs ip and delays associated with doing it by name. All machines are Windows 7 Ultimate 64bit.

    Below is output from three scenarios:

    1. Ping machine2 by name. The key issue is there is close to a 6 second delay from hitting enter on the command line before results start being returned.

    C:\Users\machine1>ping machine2

    Pinging machine2 [fe80::95f5:38e3:fc8a:4a70%11] with 32 bytes of data:
    Reply from fe80::95f5:38e3:fc8a:4a70%11: time=1ms
    Reply from fe80::95f5:38e3:fc8a:4a70%11: time=1ms
    Reply from fe80::95f5:38e3:fc8a:4a70%11: time=1ms
    Reply from fe80::95f5:38e3:fc8a:4a70%11: time=1ms
    
    Ping statistics for fe80::95f5:38e3:fc8a:4a70%11:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 1ms, Maximum = 1ms, Average = 1ms
    
    1. Ping machine2 by ip. There is no delay from hitting enter to recieving results

    C:\Users\machine1>ping 192.168.1.101

    Pinging 192.168.1.101 with 32 bytes of data:
    Reply from 192.168.1.101: bytes=32 time=1ms TTL=128
    Reply from 192.168.1.101: bytes=32 time=1ms TTL=128
    Reply from 192.168.1.101: bytes=32 time=1ms TTL=128
    Reply from 192.168.1.101: bytes=32 time=1ms TTL=128
    
    Ping statistics for 192.168.1.101:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 1ms, Maximum = 1ms, Average = 1ms
    
    1. Force ping to use IPv4 and ping by machine name. Still same delay occurs.

    C:\Users\machine1>ping machine2 -4

    Pinging machine2 [192.168.1.101] with 32 bytes of data:
    Reply from 192.168.1.101: bytes=32 time=58ms TTL=128
    Reply from 192.168.1.101: bytes=32 time=86ms TTL=128
    Reply from 192.168.1.101: bytes=32 time=1ms TTL=128
    Reply from 192.168.1.101: bytes=32 time=19ms TTL=128
    
    Ping statistics for 192.168.1.101:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 1ms, Maximum = 86ms, Average = 41ms
    

    The main time this becomes an issue is using programs where I just wanted to quickly type a machine name on the network to connect to, e.g. Remote Desktop, and having to wait 6 seconds each time, or alternatively look up its IP first, which isn't great when the IP changes. I'm not interested in static IP's either.

    At this point I think this has to do more with machine name resolution than anything else, but don't know where to go from here. Any help would be appreciated.


  • Related Answers
  • Majenko

    The timeout will be in the DNS resolution. It may be because you have more than one DNS server specified and one of them is not responding.

    In a command prompt window type:

    C:\> ipconfig /all | find "DNS Servers"
    

    and note down the IP addresses of the DNS servers.

    Then use the nslookup tool to probe them:

    C:\> nslookup
    Default Server: Blah
    Address: 192.168.1.1
    
    >
    

    Then select each DNS server in turn:

    > server 192.168.1.1
    Default Server: [192.168.1.1]
    Address: 192.168.1.1
    

    and do a lookup using it:

    > machine2
    Server: [192.168.1.1]
    Address: 192.168.1.1
    
    Name: machine2.mydomain.com
    Address: 192.168.1.101
    

    Repeat that server and machine2 commands for each IP address in your list. One of them should fail with:

    Request to [192.168.1.1] timed-out
    

    Then it's just a case of finding out a) why that DNS server is not working, and b) if you should even be using it at all.

  • grawity

    Windows uses several different methods to resolve machine names:

    • DNS
    • NBNS, NetBIOS name service (used by all Windows version)
    • LLMNR (introduced in Windows 7; only IPv6)
    • mDNS (if Bonjour is installed; comes with iTunes and probably Safari)

    It could be that your DNS server is not responding to the queries, or that the other machines have NBNS and/or LLMNR disabled or firewalled. (I don't know the exact order, but DNS always seems to be tried first.)

    Install Wireshark and watch all packets related to name resolution. Set the display filter to dns or nbns or udp.port=5355.

  • Shadur

    I actually ran into this problem recently on a linux system.

    The cause turned out to be that once return packets start coming, certain versions of ping by default attempt to do a reverse DNS lookup of the IP address the response is coming from:

    shadur@caleburn: ~/ > ping google.com
    PING google.com (74.125.136.113) 56(84) bytes of data.
    64 bytes from ea-in-f113.1e100.net (74.125.136.113): icmp_seq=1 ttl=49 time=12.7 ms
    64 bytes from ea-in-f113.1e100.net (74.125.136.113): icmp_seq=2 ttl=49 time=7.75 ms
    64 bytes from ea-in-f113.1e100.net (74.125.136.113): icmp_seq=3 ttl=49 time=7.85 ms
    

    If your setup doesn't have reverse DNS configured for the 1.168.192.in-addr.arpa (or at least an entry for 192.168.1.1 in your hosts file, it's going to time out trying to reach a DNS server to complete the lookup, and it can't start printing the response packets until the lookup gets resolved (either by a correct DNS response in which case it prints the returned name, or by a timeout in which case it just prints the IP address).

    Adding the name/IP address combo to your hosts file should fix the issue.

    (EDIT: In windows the file you're looking for is at C:\Windows\System32\drivers\etc\hosts by default.)