Mac client causing latency every ~10 seconds

Hi there, I’ve been experiencing latency while having the WhatPulse app open since I started to play some games on my Mac. I didn’t realise right away that the WhatPulse app was causing this issue, but it seems that it does.

The problem is that around every 10 seconds, my latency dramatically increases for 2-3 seconds. My normal latency sits around 5-20 ms, whereas the peaks I’m experiencing can go up to 100-1000 ms.

I tested this by pinging google.com from the terminal, see the following results where the WhatPulse app is open:

PING google.com (172.217.17.110): 56 data bytes
64 bytes from 172.217.17.110: icmp_seq=0 ttl=55 time=4.949 ms
64 bytes from 172.217.17.110: icmp_seq=1 ttl=55 time=7.396 ms
64 bytes from 172.217.17.110: icmp_seq=2 ttl=55 time=34.988 ms
64 bytes from 172.217.17.110: icmp_seq=3 ttl=55 time=5.804 ms
64 bytes from 172.217.17.110: icmp_seq=4 ttl=55 time=5.934 ms
64 bytes from 172.217.17.110: icmp_seq=5 ttl=55 time=139.463 ms
64 bytes from 172.217.17.110: icmp_seq=6 ttl=55 time=82.145 ms
64 bytes from 172.217.17.110: icmp_seq=7 ttl=55 time=98.898 ms
64 bytes from 172.217.17.110: icmp_seq=8 ttl=55 time=79.834 ms
64 bytes from 172.217.17.110: icmp_seq=9 ttl=55 time=10.671 ms
64 bytes from 172.217.17.110: icmp_seq=10 ttl=55 time=9.985 ms
64 bytes from 172.217.17.110: icmp_seq=11 ttl=55 time=8.413 ms
64 bytes from 172.217.17.110: icmp_seq=12 ttl=55 time=9.366 ms
64 bytes from 172.217.17.110: icmp_seq=13 ttl=55 time=8.470 ms
64 bytes from 172.217.17.110: icmp_seq=14 ttl=55 time=12.764 ms
64 bytes from 172.217.17.110: icmp_seq=15 ttl=55 time=5.178 ms
64 bytes from 172.217.17.110: icmp_seq=16 ttl=55 time=5.918 ms
64 bytes from 172.217.17.110: icmp_seq=17 ttl=55 time=5.834 ms
64 bytes from 172.217.17.110: icmp_seq=18 ttl=55 time=5.933 ms
64 bytes from 172.217.17.110: icmp_seq=19 ttl=55 time=108.638 ms
64 bytes from 172.217.17.110: icmp_seq=20 ttl=55 time=48.023 ms
64 bytes from 172.217.17.110: icmp_seq=21 ttl=55 time=46.886 ms
64 bytes from 172.217.17.110: icmp_seq=22 ttl=55 time=54.200 ms
64 bytes from 172.217.17.110: icmp_seq=23 ttl=55 time=5.924 ms
64 bytes from 172.217.17.110: icmp_seq=24 ttl=55 time=27.674 ms
64 bytes from 172.217.17.110: icmp_seq=25 ttl=55 time=27.901 ms

And the following results where the WhatPulse app is closed:

PING google.com (172.217.17.110): 56 data bytes
64 bytes from 172.217.17.110: icmp_seq=0 ttl=55 time=5.063 ms
64 bytes from 172.217.17.110: icmp_seq=1 ttl=55 time=5.998 ms
64 bytes from 172.217.17.110: icmp_seq=2 ttl=55 time=5.618 ms
64 bytes from 172.217.17.110: icmp_seq=3 ttl=55 time=5.897 ms
64 bytes from 172.217.17.110: icmp_seq=4 ttl=55 time=5.776 ms
64 bytes from 172.217.17.110: icmp_seq=5 ttl=55 time=5.870 ms
64 bytes from 172.217.17.110: icmp_seq=6 ttl=55 time=5.907 ms
64 bytes from 172.217.17.110: icmp_seq=7 ttl=55 time=5.693 ms
64 bytes from 172.217.17.110: icmp_seq=8 ttl=55 time=6.612 ms
64 bytes from 172.217.17.110: icmp_seq=9 ttl=55 time=6.792 ms
64 bytes from 172.217.17.110: icmp_seq=10 ttl=55 time=6.391 ms
64 bytes from 172.217.17.110: icmp_seq=11 ttl=55 time=7.467 ms
64 bytes from 172.217.17.110: icmp_seq=12 ttl=55 time=5.867 ms
64 bytes from 172.217.17.110: icmp_seq=13 ttl=55 time=31.760 ms
64 bytes from 172.217.17.110: icmp_seq=14 ttl=55 time=5.937 ms
64 bytes from 172.217.17.110: icmp_seq=15 ttl=55 time=6.130 ms
64 bytes from 172.217.17.110: icmp_seq=16 ttl=55 time=16.467 ms
64 bytes from 172.217.17.110: icmp_seq=17 ttl=55 time=5.180 ms
64 bytes from 172.217.17.110: icmp_seq=18 ttl=55 time=5.125 ms
64 bytes from 172.217.17.110: icmp_seq=19 ttl=55 time=6.183 ms
64 bytes from 172.217.17.110: icmp_seq=20 ttl=55 time=5.954 ms
64 bytes from 172.217.17.110: icmp_seq=21 ttl=55 time=20.923 ms
64 bytes from 172.217.17.110: icmp_seq=22 ttl=55 time=5.174 ms
64 bytes from 172.217.17.110: icmp_seq=23 ttl=55 time=6.191 ms
64 bytes from 172.217.17.110: icmp_seq=24 ttl=55 time=7.447 ms
64 bytes from 172.217.17.110: icmp_seq=25 ttl=55 time=5.580 ms

The ping intervals are around 1 ping every second.

The latency on the data i just listed is actually still fairly low, I would sometimes even get latency from 300ms-1000ms. I’ve run several tests in the past week and I’m confident that the WhatPulse app is causing the latency spikes.
Is there any reason why my latency shoots up every ~10 seconds?

I am running macOS Sierra 10.12.2 on a 15-inch MacBook Pro Late 2016.
I am using WhatPulse client 2.7.1 (which is currently the latest).

There is no task or something similar running every 10 seconds to explain your situation. However, it’s very unlikely that the client is directly involved, as the network monitor is not in the path of the network traffic, it just gets a copy from the OS.

Curious though, what happens if you disable network monitoring?

Thanks for the reply.

The problem still exists after I disable network monitoring.

I’ve tried reinstalling WhatPulse but that didn’t help either.
From an inconsistent latency, whenever I quit WhatPulse my latency becomes consistent. And I’m positive that I’m not seeing ghosts.

Could I provide you with any logs or anything to analyse?

I have also tested this on 4 different networks: at work, at home, from iPhone 4G hotspot and another home.

All these networks provide me with the same results :frowning:

I can confirm that I experience the same issues on my iMac. I will try tonight on MBP too to see whether closing the WhatPulse client will remove the latency spikes.

64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.957 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=1.096 ms
64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=1.327 ms
64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=1.136 ms
64 bytes from 192.168.1.1: icmp_seq=7 ttl=64 time=131.008 ms
64 bytes from 192.168.1.1: icmp_seq=8 ttl=64 time=486.855 ms
64 bytes from 192.168.1.1: icmp_seq=9 ttl=64 time=958.341 ms
64 bytes from 192.168.1.1: icmp_seq=10 ttl=64 time=92.668 ms
64 bytes from 192.168.1.1: icmp_seq=11 ttl=64 time=1.996 ms
64 bytes from 192.168.1.1: icmp_seq=12 ttl=64 time=1.191 ms
64 bytes from 192.168.1.1: icmp_seq=13 ttl=64 time=1.705 ms
64 bytes from 192.168.1.1: icmp_seq=14 ttl=64 time=0.980 ms
64 bytes from 192.168.1.1: icmp_seq=15 ttl=64 time=0.993 ms

Shutting down WhatPulse also eliminated the ping spikes on my MBP. I think it is safe to say that something in the Mac client causes intermittent ping spikes. It even got so far that teleconferencing did not work properly due to the sound getting grabled up every 10 seconds or so. After shutting down WhatPulse, no issues.

I had the newest client on both iMac and MBP, it was in online mode on iMac, offline mode on MBP. Network monitoring was off on both machines.

I can confirm that I’m experiencing this as well.

10.12 / Running – 2.7.2b3

With WhatPulse Running — 2.7.2 b3

PING google.com (172.217.4.110): 56 data bytes
64 bytes from 172.217.4.110: icmp_seq=0 ttl=54 time=23.685 ms
64 bytes from 172.217.4.110: icmp_seq=1 ttl=54 time=102.990 ms
64 bytes from 172.217.4.110: icmp_seq=2 ttl=54 time=230.333 ms
64 bytes from 172.217.4.110: icmp_seq=3 ttl=54 time=33.852 ms
64 bytes from 172.217.4.110: icmp_seq=4 ttl=54 time=239.661 ms
64 bytes from 172.217.4.110: icmp_seq=5 ttl=54 time=52.320 ms
64 bytes from 172.217.4.110: icmp_seq=6 ttl=54 time=150.356 ms
64 bytes from 172.217.4.110: icmp_seq=7 ttl=54 time=19.473 ms
64 bytes from 172.217.4.110: icmp_seq=8 ttl=54 time=89.919 ms
64 bytes from 172.217.4.110: icmp_seq=9 ttl=54 time=31.264 ms
64 bytes from 172.217.4.110: icmp_seq=10 ttl=54 time=28.537 ms
64 bytes from 172.217.4.110: icmp_seq=11 ttl=54 time=27.305 ms
64 bytes from 172.217.4.110: icmp_seq=12 ttl=54 time=25.276 ms
64 bytes from 172.217.4.110: icmp_seq=13 ttl=54 time=46.063 ms
64 bytes from 172.217.4.110: icmp_seq=14 ttl=54 time=66.647 ms
64 bytes from 172.217.4.110: icmp_seq=15 ttl=54 time=26.532 ms
64 bytes from 172.217.4.110: icmp_seq=16 ttl=54 time=138.774 ms
64 bytes from 172.217.4.110: icmp_seq=17 ttl=54 time=82.761 ms
64 bytes from 172.217.4.110: icmp_seq=18 ttl=54 time=30.963 ms
64 bytes from 172.217.4.110: icmp_seq=19 ttl=54 time=123.962 ms
64 bytes from 172.217.4.110: icmp_seq=20 ttl=54 time=31.002 ms
64 bytes from 172.217.4.110: icmp_seq=21 ttl=54 time=22.128 ms
64 bytes from 172.217.4.110: icmp_seq=22 ttl=54 time=29.702 ms
64 bytes from 172.217.4.110: icmp_seq=23 ttl=54 time=26.745 ms
64 bytes from 172.217.4.110: icmp_seq=24 ttl=54 time=42.205 ms
64 bytes from 172.217.4.110: icmp_seq=25 ttl=54 time=71.099 ms

Without

PING google.com (216.58.192.206): 56 data bytes
64 bytes from 216.58.192.206: icmp_seq=0 ttl=54 time=28.403 ms
64 bytes from 216.58.192.206: icmp_seq=1 ttl=54 time=26.400 ms
64 bytes from 216.58.192.206: icmp_seq=2 ttl=54 time=25.274 ms
64 bytes from 216.58.192.206: icmp_seq=3 ttl=54 time=25.657 ms
64 bytes from 216.58.192.206: icmp_seq=4 ttl=54 time=25.252 ms
64 bytes from 216.58.192.206: icmp_seq=5 ttl=54 time=30.857 ms
64 bytes from 216.58.192.206: icmp_seq=6 ttl=54 time=27.151 ms
64 bytes from 216.58.192.206: icmp_seq=7 ttl=54 time=24.145 ms
64 bytes from 216.58.192.206: icmp_seq=8 ttl=54 time=26.818 ms
64 bytes from 216.58.192.206: icmp_seq=9 ttl=54 time=19.055 ms
64 bytes from 216.58.192.206: icmp_seq=10 ttl=54 time=22.818 ms
64 bytes from 216.58.192.206: icmp_seq=11 ttl=54 time=42.977 ms
64 bytes from 216.58.192.206: icmp_seq=12 ttl=54 time=28.670 ms
64 bytes from 216.58.192.206: icmp_seq=13 ttl=54 time=26.975 ms
64 bytes from 216.58.192.206: icmp_seq=14 ttl=54 time=27.466 ms
64 bytes from 216.58.192.206: icmp_seq=15 ttl=54 time=26.108 ms
64 bytes from 216.58.192.206: icmp_seq=16 ttl=54 time=25.894 ms
64 bytes from 216.58.192.206: icmp_seq=17 ttl=54 time=23.857 ms
64 bytes from 216.58.192.206: icmp_seq=18 ttl=54 time=23.675 ms
64 bytes from 216.58.192.206: icmp_seq=19 ttl=54 time=21.291 ms
64 bytes from 216.58.192.206: icmp_seq=20 ttl=54 time=28.883 ms
64 bytes from 216.58.192.206: icmp_seq=21 ttl=54 time=22.361 ms
64 bytes from 216.58.192.206: icmp_seq=22 ttl=54 time=19.223 ms
64 bytes from 216.58.192.206: icmp_seq=23 ttl=54 time=25.730 ms
64 bytes from 216.58.192.206: icmp_seq=24 ttl=54 time=30.577 ms
64 bytes from 216.58.192.206: icmp_seq=25 ttl=54 time=22.939 ms

With
PING google.com (216.58.192.206): 56 data bytes
64 bytes from 216.58.192.206: icmp_seq=0 ttl=54 time=26.708 ms
64 bytes from 216.58.192.206: icmp_seq=1 ttl=54 time=33.177 ms
64 bytes from 216.58.192.206: icmp_seq=2 ttl=54 time=51.930 ms
64 bytes from 216.58.192.206: icmp_seq=3 ttl=54 time=60.008 ms
64 bytes from 216.58.192.206: icmp_seq=4 ttl=54 time=30.250 ms
64 bytes from 216.58.192.206: icmp_seq=5 ttl=54 time=153.776 ms
64 bytes from 216.58.192.206: icmp_seq=6 ttl=54 time=75.705 ms
64 bytes from 216.58.192.206: icmp_seq=7 ttl=54 time=35.733 ms
64 bytes from 216.58.192.206: icmp_seq=8 ttl=54 time=23.680 ms
64 bytes from 216.58.192.206: icmp_seq=9 ttl=54 time=32.155 ms
64 bytes from 216.58.192.206: icmp_seq=10 ttl=54 time=31.282 ms
64 bytes from 216.58.192.206: icmp_seq=11 ttl=54 time=31.018 ms
64 bytes from 216.58.192.206: icmp_seq=12 ttl=54 time=23.199 ms
64 bytes from 216.58.192.206: icmp_seq=13 ttl=54 time=24.875 ms
64 bytes from 216.58.192.206: icmp_seq=14 ttl=54 time=35.211 ms
64 bytes from 216.58.192.206: icmp_seq=15 ttl=54 time=53.467 ms
64 bytes from 216.58.192.206: icmp_seq=16 ttl=54 time=92.321 ms
64 bytes from 216.58.192.206: icmp_seq=17 ttl=54 time=42.661 ms
64 bytes from 216.58.192.206: icmp_seq=18 ttl=54 time=136.433 ms
64 bytes from 216.58.192.206: icmp_seq=19 ttl=54 time=62.276 ms
64 bytes from 216.58.192.206: icmp_seq=20 ttl=54 time=29.070 ms
64 bytes from 216.58.192.206: icmp_seq=21 ttl=54 time=130.905 ms
64 bytes from 216.58.192.206: icmp_seq=22 ttl=54 time=26.577 ms

I’m experiencing the same problem. There’s a definite change in the behavior of the application 4 times a minute, which can be observed at the system call level at least.

I’ve attached the output of:

sudo opensnoop -ve 2>&1 | grep whatpulse

It suggests that there’s some sort of looping over network interfaces happening, which on my machine takes roughly 4 seconds each time. Here’s a small snippet:

2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /Library/Preferences/SystemConfiguration/preferences.plist
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /Library/Preferences/SystemConfiguration/preferences.plist
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings
2017 Mar 2 10:29:43 501 758 whatpulse 33 0 /System/Library/Frameworks/SystemConfiguration.framework/Resources/English.lproj/NetworkInterface.strings

(Note: this is happening with “Enable network statistics” disabled.)

It appears that MacOS 10.12.2 has a bug where it creates latency when you look at certain network information. Looking for a way around it…

As mentioned before, if you disable network measuring it will not occur.

@smitmartijn Thanks a lot for looking at this issue.

When I untick the ‘Enable network statistics’ checkbox in the settings view, save and restart, the latency spikes still happen.

EDIT: Is there any other way I can disable network measuring?

Same here!

This issue isn’t isolated to 12.2.2 as it’s happening on 12.2 as well.