Ping on Mavericks on late 2013 MacBook Pro slow and variable compared to Windows

Discussion in 'MacBook Pro' started by cybergibbons, Nov 16, 2013.

  1. cybergibbons macrumors newbie

    Joined:
    Oct 23, 2013
    #1
    I had a couple of issues connecting to an SMB share last night so started using ping to test connectivity.

    At that point I noticed the ping was very slow and variable - my Windows laptop shows <1ms for all pings to the router.

    An example:
    64 bytes from 192.168.1.1: icml_seq=335 ttl=64 time=208.350 ms
    64 bytes from 192.168.1.1: icml_seq=336 ttl=64 time=129.768 ms
    64 bytes from 192.168.1.1: icml_seq=337 ttl=64 time=51.067 ms
    64 bytes from 192.168.1.1: icml_seq=338 ttl=64 time=278.491 ms
    64 bytes from 192.168.1.1: icml_seq=339 ttl=64 time=1.315 ms
    64 bytes from 192.168.1.1: icml_seq=340 ttl=64 time=120.040 ms
    64 bytes from 192.168.1.1: icml_seq=341 ttl=64 time=40.420 ms
    64 bytes from 192.168.1.1: icml_seq=342 ttl=64 time=267.817 ms
    64 bytes from 192.168.1.1: icml_seq=343 ttl=64 time=188.607 ms
    64 bytes from 192.168.1.1: icml_seq=344 ttl=64 time=109.445 ms
    64 bytes from 192.168.1.1: icml_seq=345 ttl=64 time=1.313 ms
    64 bytes from 192.168.1.1: icml_seq=346 ttl=64 time=1.905 ms
    64 bytes from 192.168.1.1: icml_seq=347 ttl=64 time=3.662 ms
    64 bytes from 192.168.1.1: icml_seq=348 ttl=64 time=100.708 ms
    64 bytes from 192.168.1.1: icml_seq=349 ttl=64 time=21.266 ms
    64 bytes from 192.168.1.1: icml_seq=350 ttl=64 time=1.674 ms
    64 bytes from 192.168.1.1: icml_seq=351 ttl=64 time=1.397 ms
    64 bytes from 192.168.1.1: icml_seq=352 ttl=64 time=89.599 ms
    64 bytes from 192.168.1.1: icml_seq=353 ttl=64 time=10.996 ms
    64 bytes from 192.168.1.1: icml_seq=354 ttl=64 time=341.583 ms
    64 bytes from 192.168.1.1: icml_seq=355 ttl=64 time=159.329 ms
    64 bytes from 192.168.1.1: icml_seq=356 ttl=64 time=81.145 ms
    64 bytes from 192.168.1.1: icml_seq=357 ttl=64 time=1.945 ms


    I have not seen any other symptoms - network speeds and things like ping test are fine. I see similar behaviour when pinging external sites though - much slower and variable.

    I have tried plugging into power (possibly power saving could cause this) and also restarting.

    Any ideas why this might be?
     
  2. Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #2
    I assume you are connected to the router (192.168.1.1) via wifi.

    So, first, test with another wifi channel.
     
  3. cybergibbons thread starter macrumors newbie

    Joined:
    Oct 23, 2013
    #3
    I have just found if you reduce the interval to 200ms or less, the pings are normal i..e

    ping -i .2 192.168.1.1

    Odd.

    Any ideas why?

    ----------

    As far as I know, 802.11ac only has a single channel available and no other device using the same wireless exhibits the issue.
     
  4. Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #4
    Actually ?
    Did you check your router's interface ? Don't you have the choice ?

    Does not mean anything unless the other device is the very same computer.
     
  5. cybergibbons, Nov 16, 2013
    Last edited: Nov 16, 2013

    cybergibbons thread starter macrumors newbie

    Joined:
    Oct 23, 2013
    #5
    I can't see any settings for 802.11ac.

    The issue also happens using 802.11g on several channels.

    There are no other 5GHz networks in the area, confirmed using inSSIDer and a spectrum analyser.

    Throughput is well over 100MBps using all devices as well, so the actual wireless speeds are fine.

    Why? If the channel supports ping times of 1ms on one wireless device, it is perfectly reasonable to expect another to not produce 200-300ms ping times.

    No other device using the same router has ping times greater than 2ms.

    It's also odd that it is solved by setting the ping interval to be very short, it strongly suggests it is not a wireless channel issue.
     
  6. sephirot macrumors newbie

    Joined:
    Oct 26, 2005
    Location:
    Switzerland
    #6
    I have the same behavior on my late rMBP. However, changing the interval time doesn't solve the problem here, it's just more distributed.

    Code:
    ping -i 0.2 192.168.0.1
    PING 192.168.0.1 (192.168.0.1): 56 data bytes
    64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=65.449 ms
    64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=1.613 ms
    64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=1.614 ms
    64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=7.060 ms
    64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=181.894 ms
    64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=1.608 ms
    64 bytes from 192.168.0.1: icmp_seq=6 ttl=64 time=1.620 ms
    64 bytes from 192.168.0.1: icmp_seq=7 ttl=64 time=2.040 ms
    64 bytes from 192.168.0.1: icmp_seq=8 ttl=64 time=1.826 ms
    64 bytes from 192.168.0.1: icmp_seq=9 ttl=64 time=5.758 ms
    64 bytes from 192.168.0.1: icmp_seq=10 ttl=64 time=1.526 ms
    64 bytes from 192.168.0.1: icmp_seq=11 ttl=64 time=3.440 ms
    64 bytes from 192.168.0.1: icmp_seq=12 ttl=64 time=6.191 ms
    64 bytes from 192.168.0.1: icmp_seq=13 ttl=64 time=1.623 ms
    64 bytes from 192.168.0.1: icmp_seq=14 ttl=64 time=1.627 ms
    64 bytes from 192.168.0.1: icmp_seq=15 ttl=64 time=1.621 ms
    64 bytes from 192.168.0.1: icmp_seq=16 ttl=64 time=1.877 ms
    64 bytes from 192.168.0.1: icmp_seq=17 ttl=64 time=1.888 ms
    64 bytes from 192.168.0.1: icmp_seq=18 ttl=64 time=1.619 ms
    64 bytes from 192.168.0.1: icmp_seq=19 ttl=64 time=1.538 ms
    64 bytes from 192.168.0.1: icmp_seq=20 ttl=64 time=1.266 ms
    64 bytes from 192.168.0.1: icmp_seq=21 ttl=64 time=1.831 ms
    64 bytes from 192.168.0.1: icmp_seq=22 ttl=64 time=1.663 ms
    64 bytes from 192.168.0.1: icmp_seq=23 ttl=64 time=3.635 ms
    64 bytes from 192.168.0.1: icmp_seq=24 ttl=64 time=1.787 ms
    64 bytes from 192.168.0.1: icmp_seq=25 ttl=64 time=2.144 ms
    64 bytes from 192.168.0.1: icmp_seq=26 ttl=64 time=5.727 ms
    64 bytes from 192.168.0.1: icmp_seq=27 ttl=64 time=1.450 ms
    64 bytes from 192.168.0.1: icmp_seq=28 ttl=64 time=1.651 ms
    64 bytes from 192.168.0.1: icmp_seq=29 ttl=64 time=4.399 ms
    64 bytes from 192.168.0.1: icmp_seq=30 ttl=64 time=1.660 ms
    64 bytes from 192.168.0.1: icmp_seq=31 ttl=64 time=3.315 ms
    64 bytes from 192.168.0.1: icmp_seq=32 ttl=64 time=3.291 ms
    64 bytes from 192.168.0.1: icmp_seq=33 ttl=64 time=1.628 ms
    64 bytes from 192.168.0.1: icmp_seq=34 ttl=64 time=1.634 ms
    64 bytes from 192.168.0.1: icmp_seq=35 ttl=64 time=1.801 ms
    64 bytes from 192.168.0.1: icmp_seq=36 ttl=64 time=1.632 ms
    64 bytes from 192.168.0.1: icmp_seq=37 ttl=64 time=4.214 ms
    64 bytes from 192.168.0.1: icmp_seq=38 ttl=64 time=1.532 ms
    64 bytes from 192.168.0.1: icmp_seq=39 ttl=64 time=4.098 ms
    64 bytes from 192.168.0.1: icmp_seq=40 ttl=64 time=10.129 ms
    64 bytes from 192.168.0.1: icmp_seq=41 ttl=64 time=113.674 ms
    64 bytes from 192.168.0.1: icmp_seq=42 ttl=64 time=2.159 ms
    64 bytes from 192.168.0.1: icmp_seq=43 ttl=64 time=1.561 ms
    64 bytes from 192.168.0.1: icmp_seq=44 ttl=64 time=2.116 ms
    The delay seems to be every few seconds, that's why it's spread out more with shorter ping times?

    Also, connecting via thunderbolt to ethernet to the modem results in normal 1ms ping times.
     
  7. alex0002 macrumors 6502

    Joined:
    Jun 19, 2013
    Location:
    New Zealand
    #7
    Odd indeed, because with Mountain Lion it won't even let me use short ping intervals like that.

    Code:
    $ ping -i .2 192.168.1.1
    ping: -i interval too short: Operation not permitted
    However with my late 2011 cMBP and a cheap TP-link 802.11n wireless router I get this.

    Code:
    $ ping -c 5 192.168.1.1
    PING 192.168.1.1 (192.168.1.1): 56 data bytes
    64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=4.933 ms
    64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=4.987 ms
    64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=6.709 ms
    64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=5.029 ms
    64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=4.968 ms
    
    --- 192.168.1.1 ping statistics ---
    5 packets transmitted, 5 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 4.933/5.325/6.709/0.693 ms
    
     
  8. cybergibbons thread starter macrumors newbie

    Joined:
    Oct 23, 2013
    #8
    Interesting.

    The first ping even with short intervals is slow - I wonder if it is doing something to save energy unless it detects a decent flow of traffic?
     
  9. sephirot, Nov 16, 2013
    Last edited: Nov 16, 2013

    sephirot macrumors newbie

    Joined:
    Oct 26, 2005
    Location:
    Switzerland
    #9
  10. cybergibbons thread starter macrumors newbie

    Joined:
    Oct 23, 2013
    #10
  11. osxyz macrumors newbie

    Joined:
    Nov 2, 2013
    #11
    Same here with my Retina 13 inch Core i5 / 8 / 256

    Tried two different routers, both with lags (avg ping ~40ms). Setting the interval to 0.2s, it's ok (1-2ms)
     
  12. Ccrew macrumors 68020

    Joined:
    Feb 28, 2011
    #12
    Keep in mind guys Ping is part of the ICMP protocol. Which essentially means that it's de-prioritized by a device be it computer or router if other traffic is on the link. ICMP is process switched rather than fast switched.

    Ping alone is not a robust diagnostic tool, you'd need a packet capture utility a la Wireshark or something similar.

    By shortening the interval you're just shortening the sample window, you're not proving or disproving a problem.
    http://iwl.com/white-papers/75-limitations-of-icmp-echo-for-network-measurement
     
  13. fyzle, Jan 30, 2014
    Last edited: Jan 30, 2014

    fyzle macrumors member

    Joined:
    Aug 1, 2004
    #13
    PingFixer

    Hi guys,

    I made this small app to resolve the variable ping issue. https://gum.co/PingFixer

    It basically does the workaround that is mentioned online, but it's packed up nicely and does some other things to make sure you're actually keeping the wifi card awake.

    Btw, even though it says Made for Mavericks, it also works on 10.8.

    Kevin
     

Share This Page