Mit macOS Sierra erleben Sie jede zweite Sekunde eine hohe WLAN-Latenz

10

Auf meinem Macbook Pro, auf dem das neueste macOS Sierra ausgeführt wird, tritt jede zweite Sekunde eine hohe WLAN-Latenz auf.

Ich dachte, mein alter Router könnte der Schuldige sein, also kaufte ich einen neuen. Der neue Router machte die Sache jedoch nur noch schlimmer und ging von Latenzproblemen bis zu einem Paketverlust von etwa 20%. Wenn Sie diese Lösung anhand einer anderen Super-User-Frage versuchen, wird der Paketverlust zumindest wieder auf 0 gesenkt, das Latenzproblem bleibt jedoch bestehen.

  • Das Pingen des gleichen Routers von einem anderen Computer über ein kabelgebundenes Netzwerk führt zu einem konstanten 2-ms-Ping.
  • Das Pingen von meinem Telefon über WLAN führt zu einem konstanten 4-ms-Ping (altes Android-Telefon).
  • Wenn Sie bei der Arbeit dieselben Tests in meinem Netzwerk ausführen, erhalten Sie genau dieselben Ergebnisse. Ich habe das WLAN meines Macbook Pro als Problem herausgegriffen.

Hier ist ein Diagramm von speedtest.net. Jedes Mal, wenn ich diesen Test über WLAN durchführe, erhalte ich ungefähr das gleiche Ergebnis: ein Rückgang der Download-Geschwindigkeit um ~ 5 Sekunden.

Geschwindigkeitsdiagramm herunterladen

Wenn ich meinen Router von meinem MBP aus mit 192.168.1.1 anpinge (mit der Standardeinstellung 1 Hz), erhalte ich das folgende Muster:

64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=86.944 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=121.099 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=1.664 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=31.493 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=66.042 ms
64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=99.786 ms
64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=2.459 ms
64 bytes from 192.168.1.1: icmp_seq=7 ttl=64 time=2.183 ms
64 bytes from 192.168.1.1: icmp_seq=8 ttl=64 time=1.867 ms
64 bytes from 192.168.1.1: icmp_seq=9 ttl=64 time=2.662 ms
64 bytes from 192.168.1.1: icmp_seq=10 ttl=64 time=2.065 ms
64 bytes from 192.168.1.1: icmp_seq=11 ttl=64 time=0.877 ms
64 bytes from 192.168.1.1: icmp_seq=12 ttl=64 time=63.238 ms
64 bytes from 192.168.1.1: icmp_seq=13 ttl=64 time=101.419 ms
64 bytes from 192.168.1.1: icmp_seq=14 ttl=64 time=3.704 ms
64 bytes from 192.168.1.1: icmp_seq=15 ttl=64 time=36.746 ms
64 bytes from 192.168.1.1: icmp_seq=16 ttl=64 time=51.972 ms
64 bytes from 192.168.1.1: icmp_seq=17 ttl=64 time=86.453 ms
64 bytes from 192.168.1.1: icmp_seq=18 ttl=64 time=125.786 ms
64 bytes from 192.168.1.1: icmp_seq=19 ttl=64 time=1.113 ms
64 bytes from 192.168.1.1: icmp_seq=20 ttl=64 time=1.973 ms
64 bytes from 192.168.1.1: icmp_seq=21 ttl=64 time=2.575 ms
64 bytes from 192.168.1.1: icmp_seq=22 ttl=64 time=1.957 ms
64 bytes from 192.168.1.1: icmp_seq=23 ttl=64 time=2.209 ms
64 bytes from 192.168.1.1: icmp_seq=24 ttl=64 time=2.815 ms
64 bytes from 192.168.1.1: icmp_seq=25 ttl=64 time=1.924 ms
64 bytes from 192.168.1.1: icmp_seq=26 ttl=64 time=150.076 ms
64 bytes from 192.168.1.1: icmp_seq=27 ttl=64 time=53.943 ms
64 bytes from 192.168.1.1: icmp_seq=28 ttl=64 time=84.633 ms
64 bytes from 192.168.1.1: icmp_seq=29 ttl=64 time=109.776 ms

Das Pingen bei 10 Hz führt zu einem ähnlichen Muster mit Paketverlust:

64 bytes from 192.168.1.1: icmp_seq=11 ttl=64 time=1.078 ms
64 bytes from 192.168.1.1: icmp_seq=12 ttl=64 time=1.347 ms
64 bytes from 192.168.1.1: icmp_seq=13 ttl=64 time=1.041 ms
64 bytes from 192.168.1.1: icmp_seq=14 ttl=64 time=1.031 ms
64 bytes from 192.168.1.1: icmp_seq=15 ttl=64 time=1.098 ms
64 bytes from 192.168.1.1: icmp_seq=16 ttl=64 time=1.098 ms
64 bytes from 192.168.1.1: icmp_seq=17 ttl=64 time=0.944 ms
64 bytes from 192.168.1.1: icmp_seq=18 ttl=64 time=3.185 ms
64 bytes from 192.168.1.1: icmp_seq=19 ttl=64 time=8.736 ms
64 bytes from 192.168.1.1: icmp_seq=20 ttl=64 time=6.846 ms
64 bytes from 192.168.1.1: icmp_seq=21 ttl=64 time=1.009 ms
64 bytes from 192.168.1.1: icmp_seq=22 ttl=64 time=0.900 ms
64 bytes from 192.168.1.1: icmp_seq=23 ttl=64 time=0.985 ms
64 bytes from 192.168.1.1: icmp_seq=24 ttl=64 time=0.898 ms
64 bytes from 192.168.1.1: icmp_seq=25 ttl=64 time=0.919 ms
64 bytes from 192.168.1.1: icmp_seq=26 ttl=64 time=3.679 ms
64 bytes from 192.168.1.1: icmp_seq=27 ttl=64 time=1.468 ms
64 bytes from 192.168.1.1: icmp_seq=28 ttl=64 time=6.889 ms
64 bytes from 192.168.1.1: icmp_seq=29 ttl=64 time=0.953 ms
64 bytes from 192.168.1.1: icmp_seq=30 ttl=64 time=1.076 ms
64 bytes from 192.168.1.1: icmp_seq=31 ttl=64 time=0.984 ms
64 bytes from 192.168.1.1: icmp_seq=32 ttl=64 time=0.946 ms
64 bytes from 192.168.1.1: icmp_seq=33 ttl=64 time=0.872 ms
64 bytes from 192.168.1.1: icmp_seq=34 ttl=64 time=0.844 ms
Request timeout for icmp_seq 35
64 bytes from 192.168.1.1: icmp_seq=35 ttl=64 time=169.385 ms
64 bytes from 192.168.1.1: icmp_seq=36 ttl=64 time=68.897 ms
64 bytes from 192.168.1.1: icmp_seq=37 ttl=64 time=203.066 ms
64 bytes from 192.168.1.1: icmp_seq=38 ttl=64 time=98.576 ms
64 bytes from 192.168.1.1: icmp_seq=39 ttl=64 time=0.891 ms
64 bytes from 192.168.1.1: icmp_seq=40 ttl=64 time=122.991 ms
64 bytes from 192.168.1.1: icmp_seq=41 ttl=64 time=18.420 ms
64 bytes from 192.168.1.1: icmp_seq=42 ttl=64 time=90.086 ms
64 bytes from 192.168.1.1: icmp_seq=43 ttl=64 time=1.029 ms
64 bytes from 192.168.1.1: icmp_seq=44 ttl=64 time=65.268 ms
64 bytes from 192.168.1.1: icmp_seq=45 ttl=64 time=92.355 ms
64 bytes from 192.168.1.1: icmp_seq=46 ttl=64 time=0.922 ms
64 bytes from 192.168.1.1: icmp_seq=47 ttl=64 time=66.303 ms
64 bytes from 192.168.1.1: icmp_seq=49 ttl=64 time=38.938 ms
Request timeout for icmp_seq 50
64 bytes from 192.168.1.1: icmp_seq=50 ttl=64 time=129.508 ms
64 bytes from 192.168.1.1: icmp_seq=51 ttl=64 time=24.909 ms
64 bytes from 192.168.1.1: icmp_seq=52 ttl=64 time=86.077 ms
64 bytes from 192.168.1.1: icmp_seq=53 ttl=64 time=0.967 ms
64 bytes from 192.168.1.1: icmp_seq=54 ttl=64 time=198.241 ms
64 bytes from 192.168.1.1: icmp_seq=55 ttl=64 time=93.977 ms
64 bytes from 192.168.1.1: icmp_seq=56 ttl=64 time=0.886 ms
64 bytes from 192.168.1.1: icmp_seq=57 ttl=64 time=70.865 ms
64 bytes from 192.168.1.1: icmp_seq=58 ttl=64 time=0.809 ms
64 bytes from 192.168.1.1: icmp_seq=59 ttl=64 time=41.784 ms
Request timeout for icmp_seq 61
64 bytes from 192.168.1.1: icmp_seq=62 ttl=64 time=90.258 ms
64 bytes from 192.168.1.1: icmp_seq=63 ttl=64 time=1.207 ms
64 bytes from 192.168.1.1: icmp_seq=64 ttl=64 time=56.740 ms
64 bytes from 192.168.1.1: icmp_seq=65 ttl=64 time=85.553 ms
64 bytes from 192.168.1.1: icmp_seq=66 ttl=64 time=0.877 ms
64 bytes from 192.168.1.1: icmp_seq=67 ttl=64 time=62.510 ms
64 bytes from 192.168.1.1: icmp_seq=68 ttl=64 time=1.423 ms
64 bytes from 192.168.1.1: icmp_seq=69 ttl=64 time=32.156 ms
Request timeout for icmp_seq 70
64 bytes from 192.168.1.1: icmp_seq=70 ttl=64 time=116.203 ms
64 bytes from 192.168.1.1: icmp_seq=71 ttl=64 time=12.917 ms
64 bytes from 192.168.1.1: icmp_seq=72 ttl=64 time=86.092 ms
64 bytes from 192.168.1.1: icmp_seq=73 ttl=64 time=0.886 ms
64 bytes from 192.168.1.1: icmp_seq=74 ttl=64 time=59.710 ms
64 bytes from 192.168.1.1: icmp_seq=75 ttl=64 time=90.512 ms
64 bytes from 192.168.1.1: icmp_seq=76 ttl=64 time=4.074 ms
64 bytes from 192.168.1.1: icmp_seq=77 ttl=64 time=111.984 ms
64 bytes from 192.168.1.1: icmp_seq=78 ttl=64 time=8.640 ms
64 bytes from 192.168.1.1: icmp_seq=79 ttl=64 time=152.531 ms
64 bytes from 192.168.1.1: icmp_seq=80 ttl=64 time=47.904 ms
64 bytes from 192.168.1.1: icmp_seq=81 ttl=64 time=0.907 ms
64 bytes from 192.168.1.1: icmp_seq=82 ttl=64 time=75.134 ms
64 bytes from 192.168.1.1: icmp_seq=83 ttl=64 time=1.012 ms
64 bytes from 192.168.1.1: icmp_seq=84 ttl=64 time=42.029 ms
64 bytes from 192.168.1.1: icmp_seq=85 ttl=64 time=116.824 ms
64 bytes from 192.168.1.1: icmp_seq=86 ttl=64 time=14.382 ms
64 bytes from 192.168.1.1: icmp_seq=87 ttl=64 time=49.502 ms
64 bytes from 192.168.1.1: icmp_seq=88 ttl=64 time=121.049 ms
64 bytes from 192.168.1.1: icmp_seq=89 ttl=64 time=21.011 ms
64 bytes from 192.168.1.1: icmp_seq=90 ttl=64 time=95.133 ms
64 bytes from 192.168.1.1: icmp_seq=91 ttl=64 time=1.043 ms
64 bytes from 192.168.1.1: icmp_seq=92 ttl=64 time=67.754 ms
64 bytes from 192.168.1.1: icmp_seq=93 ttl=64 time=0.876 ms
64 bytes from 192.168.1.1: icmp_seq=94 ttl=64 time=39.027 ms
64 bytes from 192.168.1.1: icmp_seq=95 ttl=64 time=110.931 ms
64 bytes from 192.168.1.1: icmp_seq=96 ttl=64 time=7.023 ms
64 bytes from 192.168.1.1: icmp_seq=97 ttl=64 time=36.249 ms
64 bytes from 192.168.1.1: icmp_seq=98 ttl=64 time=116.108 ms
64 bytes from 192.168.1.1: icmp_seq=99 ttl=64 time=11.732 ms
64 bytes from 192.168.1.1: icmp_seq=100 ttl=64 time=82.880 ms
64 bytes from 192.168.1.1: icmp_seq=101 ttl=64 time=0.956 ms
64 bytes from 192.168.1.1: icmp_seq=102 ttl=64 time=58.007 ms
64 bytes from 192.168.1.1: icmp_seq=103 ttl=64 time=126.818 ms
64 bytes from 192.168.1.1: icmp_seq=104 ttl=64 time=22.750 ms
64 bytes from 192.168.1.1: icmp_seq=105 ttl=64 time=99.126 ms
64 bytes from 192.168.1.1: icmp_seq=106 ttl=64 time=131.419 ms
64 bytes from 192.168.1.1: icmp_seq=107 ttl=64 time=28.596 ms
64 bytes from 192.168.1.1: icmp_seq=108 ttl=64 time=110.326 ms
64 bytes from 192.168.1.1: icmp_seq=109 ttl=64 time=5.859 ms
64 bytes from 192.168.1.1: icmp_seq=110 ttl=64 time=70.852 ms
64 bytes from 192.168.1.1: icmp_seq=111 ttl=64 time=0.855 ms
64 bytes from 192.168.1.1: icmp_seq=112 ttl=64 time=41.162 ms
64 bytes from 192.168.1.1: icmp_seq=113 ttl=64 time=114.014 ms
64 bytes from 192.168.1.1: icmp_seq=114 ttl=64 time=9.519 ms
Request timeout for icmp_seq 116
64 bytes from 192.168.1.1: icmp_seq=116 ttl=64 time=121.307 ms
64 bytes from 192.168.1.1: icmp_seq=117 ttl=64 time=16.106 ms
64 bytes from 192.168.1.1: icmp_seq=118 ttl=64 time=1.082 ms
64 bytes from 192.168.1.1: icmp_seq=119 ttl=64 time=1.086 ms
64 bytes from 192.168.1.1: icmp_seq=120 ttl=64 time=1.386 ms
64 bytes from 192.168.1.1: icmp_seq=121 ttl=64 time=1.002 ms
64 bytes from 192.168.1.1: icmp_seq=122 ttl=64 time=5.472 ms
64 bytes from 192.168.1.1: icmp_seq=123 ttl=64 time=1.060 ms
64 bytes from 192.168.1.1: icmp_seq=124 ttl=64 time=1.526 ms
64 bytes from 192.168.1.1: icmp_seq=125 ttl=64 time=0.998 ms
64 bytes from 192.168.1.1: icmp_seq=126 ttl=64 time=1.182 ms
64 bytes from 192.168.1.1: icmp_seq=127 ttl=64 time=0.942 ms
64 bytes from 192.168.1.1: icmp_seq=128 ttl=64 time=3.221 ms
64 bytes from 192.168.1.1: icmp_seq=129 ttl=64 time=16.895 ms
64 bytes from 192.168.1.1: icmp_seq=130 ttl=64 time=1.251 ms
64 bytes from 192.168.1.1: icmp_seq=131 ttl=64 time=3.832 ms
64 bytes from 192.168.1.1: icmp_seq=132 ttl=64 time=5.403 ms
64 bytes from 192.168.1.1: icmp_seq=133 ttl=64 time=1.194 ms
64 bytes from 192.168.1.1: icmp_seq=134 ttl=64 time=1.287 ms
64 bytes from 192.168.1.1: icmp_seq=135 ttl=64 time=2.274 ms
64 bytes from 192.168.1.1: icmp_seq=136 ttl=64 time=0.863 ms
64 bytes from 192.168.1.1: icmp_seq=138 ttl=64 time=1.200 ms

In Worten: ~ 5 Sekunden normale Pings, dann ~ 5 Sekunden schwerwiegende Latenzprobleme oder sogar Zeitüberschreitungen, wenn die Ping-Frequenz hoch genug ist.

Ich habe versucht herauszufinden, ob eine kürzlich durchgeführte App-Installation dies verursacht, daher habe ich die meisten Apps bereits deaktiviert (Dropbox, Little Snitch). Mir gehen jetzt allerdings die Optionen aus. Ich habe gerade Wireshark ausgeführt, während ich pingte, und sehe außer diesen Pings überhaupt keine Netzwerkaktivität.

Ich bin mir nicht sicher, was ich sonst noch versuchen kann, um dies herauszufinden.

Robbert
quelle
Sind diese Standard-Pings einmal pro Sekunde? Wenn Ihr einziger Datenverkehr einmal pro Sekunde Pings sind, kann 802.11 Power Save (zwischen Pings) aktiviert werden, was die Latenz beeinträchtigt. Dies ist jedoch nur ein Messfehler, da echte TCP- oder UDP-Flows nicht nur ein Paket pro Sekunde sind, sodass Power Save nicht aktiviert wird. Prüfen Sie, ob sudo ping -i 0.1 192.168.1.1(zehn Pings pro Sekunde) unterschiedliche Ergebnisse haben. Dadurch sendet Ihr Client einen Ping pro typischem Beacon-Intervall (Zehntelsekunde), wodurch verhindert wird, dass Power Save aktiviert wird.
Spiff
Danke Spiff, aber WiFi-Energieeinsparung ist nicht das Problem. Ich habe genau die gleichen Probleme beim Online-Streaming von Videos über WLAN, sowohl zu Hause als auch bei der Arbeit. Sobald ich das Netzwerkkabel eingesteckt habe, ist alles in Ordnung. Mein Android-Handy kann in beiden WiFi-Netzwerken perfekt in HD streamen.
Robbert
Ohne weitere Beweise würde ich immer noch darauf wetten, dass die Energieeinsparung durch Wi-Fi der Grund für die oben dokumentierte Variation der Ping-Zeit ist. Video-Streaming über das Internet ist eine ganz andere Anwendung als winzige lokale Pings pro Sekunde und sollte selbst behoben werden.
Spiff
1
@spiff Ich verstehe, woher du kommst. Ich habe meine Antwort mit ähnlichen Ergebnissen aus dem vorgeschlagenen 10-Hz-Ping aktualisiert. Der einzige Unterschied besteht jetzt darin, dass ich aufgrund der erhöhten Frequenz Pakete verliere.
Robbert
Welches Protokoll verwenden Sie für Ihr Video-Streaming? Die meisten modernen Streaming-Videos, auch Einweg-Live-Videos, werden so lange gepuffert, dass gelegentliche 100-150-ms-Stalls, wie Sie sie dokumentiert haben, den Puffer nicht erschöpfen sollten.
Spiff

Antworten:

4

Ich beantworte die gleiche Frage in vielen Foren.

Die Antwort lautet: macOS-Ping-Spikes beim WLAN-Scannen. Versuchen Sie, den Ping auszuführen, und klicken Sie oben auf das WLAN-Symbol - Sie werden es selbst sehen.

Etwas auf Ihrem Computer löst also WiFi-Scans aus. Wahrscheinlich handelt es sich um ein Browser-Plugin, das versucht, Sie zu lokalisieren. Schließen Sie alle Browser und prüfen Sie, ob eine Verbesserung vorliegt.

Cyberax
quelle
4

Ich habe dieses Problem hier für mich gelöst: /apple//a/348574/317354

TL; DR:

  • Der Schuldige sind Ortungsdienste und WLAN-Scannen
  • Überprüfen Sie die von Ihnen aktivierten Ortungsdienste
  • Halten Sie die OptionTastaturtaste gedrückt, klicken Sie auf das WLAN-Symbol in der oberen Symbolleiste und klicken Sie aufEnable Wi-Fi Logging
  • Im Terminal ausführen: ping 8.8.8.8 -i 0.1
  • In Terminal ausführen : tail -f /var/log/wifi.log, in einem neuen Fenster. Beobachten Sie nebeneinander, warten Sie auf Störungen.
  • Überprüfen Sie das Protokoll, wenn der Fehler festgestellt wurde, und beenden Sie das Programm.
ph4r05
quelle
0

Ich habe einfach den Wi-Fi-Prozess abgebrochen (der automatisch wieder auftauchte) und alles wurde wieder normal. Wahrscheinlich eine kurzfristige Lösung, aber schnell und einfach.

Kanen
quelle