Forum

Puzzling system delays  

Page 1 / 2
   RSS

1

Every couple of days my 2015 MacBook Pro running Mojave 10.14.4 goes into a state where it simply pauses for 2-3 seconds. I can be typing and nothing comes out, but then in a couple of seconds everything I typed spits out on screen. I can drag a window and nothing happens, and suddenly the window jumps where I moved it.

A reboot fixes the problem temporarily and it comes back in a day or two.

I tried quitting every open program one by one, then every menubar app. Then I turned off Bluetooth.  Then I turned off WiFi.  Problem persisted.

According to iStat Menus, there's no system load at all and no network traffic (in KB/s).

I reset the SMC and NVRAM for grins and giggles. The problem returned.

Right now it's only pausing maybe every 5 minutes.  Sometimes the pauses are every 30 seconds.

Any idea what this could be and how to diagnose?

Dear Allison, has the issue been resolved? If not, could you please run EtreCheck, generate a report and paste it here so that we can dig deeper. I am sure the report may even directly help you solve this, if it hasn't been solved already.

16 Answers
1

If it takes a day or two for the symptom to reappear I’d be thinking a memory leak & consequent requirement to perform page swaps. Look at both the amount of memory being used as reported by Activity Monitor (or iStat Menus) and also how many swap files are being used in /var/vm. 

Running Apple Diagnostics mode to check for obvious hardware faults might be worth a giggle too!

Thanks, @kiwigraham. The thing is that Activity Monitor/iStat Menus is reporting essentially no RAM at all being used. I checked after I quit all apps and all menubar apps and the highest memory user was Activity Monitor itself at 14%.

I'm not sure what you mean by Apple Diagnostics?

The one thing I can't really test because it's impractical is to unplug all h/w from my Mac. I'm running a 15" MacBook Pro connected to a CalDigit TS3+ dock with a mic and backup drive and a camera and chargers.  I can't run without all of those for days at a time till the problem crops up again. 

Oddly, THIS time, the problem seems to have gone away. I kept working in this highly annoying state and after an hour or so, it got back to normal. This is driving me bananas!

1

Old timers may know it as the Apple Hardware Test (AHT)

https://support.apple.com/en-au/HT202731

And yes, running in Safe Mode for several days is also not practical.

1

Ah cool, @kiwigraham. I've run it before but it was a _very_ long time ago. When I get a break I'll give that a try.

I forgot to mention that I did boot into Safe Mode once to let it clear out any crapola it could, but the problem returned.  

Someone suggested I reinstall the OS using the combo updater.  Not a step with a direct reason why but just to clear out any OS things that might have gotten boogered (sorry to use such a technical term).  It was also suggested that it could be a hardware driver. I do have a few weird ones, like my Epson scanner.

1

I may have found the culprit. I heard @DaveHamilton say pleasant things about Clean My Mac, so I had installed it via Setapp.  The software used to have a bad reputation but since Dave seemed to like it, I thought I'd give it a whirl.

The most recent time my Mac started pausing again, instead of just quitting everything, including Clean My Mac, I decided to uninstall it.

It's been 3 or 4 days and my system hasn't paused since.  Not long enough to declare victory but longer than I've gone in the past few weeks without a pause.  The timing of the initial installation was right around when this started happening.

I would declare victory, as CleanMyMac has many reports in discussions.apple.com causing system performance issues.  Along with some cases of it cleaning something it shouldn't.

1

That's interesting. I have Clean My Mac X installed on my 2012 MBPr, also via SetApp, and it doesn't seem to interfere with the generally smooth running state of the laptop. I wonder if there are particular options that trigger issues. If memory & CPU don't show as being hogged then I'd guess at the issue being I/O access. So maybe the trash management feature, or background malware scanning?

I'll now keep a more careful eye on whether I get unexpected periods of non-response.......

1

I figure I might as well use this as my place to document my notes on this, publicly. I am running CMMX on my Office iMac. In the interest of isolation-testing whether or not this is the root cause of my problem, I wanted to disable its background processes but still keep it installed (because Space Lens). I noticed two processes were running in the background: its MenuBar agent, and its "HealthMonitor". The former was disabled with a CMMX preference. All good. The HealthMonitor required me to go into Lingon to disable. All good.

While in Lingon and filtering on "Clean" I saw two other things, both living in /Library/PrivilegedHelperTools — one was "com.macpaw.CleanMyMac-setapp.Agent" — that's fine, the other was "com.macpaw.CleanMyMac3.Agent"... that seems old.

Lingon CleanFilter

So I took a peek inside /Library/PrivilegedHelperTools. Folks, I highly recommend this. I found many things from apps I no longer use (including a CMM2 agent that existed, but obviously isn't being used/launched). This is the very definition of cruft!

PrivilegedHelperTools Contents

I set about removing a lot of things here using, for example:

sudo rm com.macpaw.CleanMyMac.Agent

...first confirming via Lingon whether or not they were "active" (some were, many were not).

I've reached out to a few developers to get more clarity on exactly what this is, why some/many apps appear to have duplicates here, and how safe my advice to prune is, as well. I'll report back!

So, one would have thought that PrivilegedHelperTools would be one of the folders that CMMX should be helping to clean up?!?
Mine doesn't appear to be too badly afflicted with ancient cruft, but certainly a few items that don't have a parent app any more.

I've confirmed with several developers today that anything can be deleted from the PrivilegedHelperTools folder. Properly-written apps, which would include basically anyone that bothers to even use the PriviligedHelperTools folder, will repopulate this with their needed entries upon the next relaunch.

If you *are* going to remove something from here, though, the advice is to also remove the launchd entry, made easy with a tool like Lingon.

1

I had similar symptoms on a 2018 MBP only when I turned off an external LG display while it was still plugged in. It is a UD2759P display using a USB-C to DP cable from j5 create which is the only way to get full resolution on the LG. 

Not a single delay occurrence sine I started unplugging the display when I turned it off.

My cursor would even freeze when the delay kicked in and that is pretty darned low in the bowels so my assumption was that this was a driver-level conflict. Once the delay started it seemed to kick in at regular intervals, about 2 minutes I believe. I did try plugging in to different ports on the MBP but it did not matter.

I hope this helps.

1

Very interesting @MacMonkeyBoy.  I wonder if a full-fledged dock would help alleviate this problem?  Nothing against LG or j5 create, but I've got a 27" LG display via the CalDigit TS3+ dock and it does not cause the system delays we've all been chatting about.

It's now been around 2 weeks and I haven't once had a system delay since I fully removed Clean My Mac from my laptop. I'm certain that was the root cause.

@DaveHamilton I have to laugh at all the glop you found in that folder. I know you and I have debated the value of a clean install once a year, but when I look in that folder on my MacBook Pro, I only see apps I'm currently running.  It's great for you in terms of discovery of how things work, but it's great for me that I simply don't have years of cruft in my system. Sure makes diagnostics easier.

I will experiment by adding my Hyperdrive dock to the config and see if the delay returns. Today's OS update may have twiddled the bits enough that it won't happen again but we shall see. Inquiring minds want to know!

My PrivilegedHelperTools still has the com.microsoft.office.licensing.helper but I have been afraid to trash it because it was such a PITA trying to re-authenticate when I migrated to the new MBP.

Fair point, @podfeet. But... without a machine that inherits cruft, I don't learn how to deal with cruft. And the reality is: most people have machines that are filled with cruft because they don't/can't go through the process of wiping the drive annually. For what I do with MGG and my DaveTheNerd consulting business, this is valuable information to have (and share!).

1

With the 27" LG display powered off and plugged into the Hyperdrive (non-powered) hub I see the cursor freeze every three seconds. It lasts for less than 1/4 second. As soon as I power up the display the freeze is gone.

This is the hub. It has met all my road warrior needs except I carry an ethernet dongle just in case:

https://www.amazon.com/HyperDrive-Type-C-Adapter-50Gbps-MacBook/dp/B01MUAEI7J

 

OK, that's weird. I have essentially the same hub from HyperDrive, it's a dongle instead of fitting flush. I haven't ever watched the cursor for freezing while connected but display off. Dumb question, why would you have this connected but want the display off?

At night when I don't need the big screen and don't want the added glare when my sweetie is snoozing I just turn it off without bothering to disconnect the cable. BTW, there are dumb questions but that wasn't one of them 😉

1

I solved my delay — it was, most certainly, a Keychain problem.

I started by disabling iCloud Keychain (well, first I made a backup, of course), and the problem still existed. That was good news, because it confirmed that my issue was local to only this machine.

Then I mucked about and, in the end, wound up deleting all the “Internet password” and “Web form password” entries in both my “Local Items” and “login” keychains.

That resolved the delays. I re-enabled iCloud Keychain and all is/was well.

1

Quote: "Any idea what this could be and how to diagnose?"

I recommend a second admin user account be set up on all your Macs — login to this secondary account to analyze whether an issue is "system wide" or "user specific".

A second user account can also be the perfect helper to answer some basic questions that will help decide what steps to take next.

Is the issue reproducible in a new user account?
If yes, issue is system wide
If no, issue is user specific


Is it hardware or software related?

This is easy to split up, disconnect internal hardware such as newly installed RAM etc and detach all external hardware devices while troubleshooting to confirm these devices are not the cause. Removing hardware is consider to help you analyze the cause of an issue.


Ask yourself some probing questions:
When did this issue begin?
Did the issue become apparent after installing an update? (software)
Did the issue occur after installing RAM or any other internal or external hardware? (hardware)


Apple has a very good articles on how to probe for and isolate Mac OS related issues.
As a general rule (and to summarize), minimizing hardware and software configurations and a new user account (for isolation purposes) helps understand where an issue might be sourcing itself from.

https://support.apple.com/en-us/HT203161
Isolating issues in Mac OS X
By using the approach here, you can learn how to isolate an issue to its root cause, or at minimum to determine the sequence of events that causes the issue to occur.

You did perform some good steps, I want to highlight those with some comments:

  • Quote "I tried quitting every open program one by one, then every menubar app. Then I turned off Bluetooth.  Then I turned off WiFi."
    ——These steps are efforts in isolating the issue which are important but because the user account itself might be the source it is best to exclude the possibliity of the main user account being the trigger by analyzing whether a new user account reproduces the issue.
  • Quote: "A reboot fixes the problem temporarily and it comes back in a day or two."
    This is when I recommend a notepad and pen at your workstation. The moment the issue returns, jot down the date and time with a description of what action was performed on the computer. It might help as you analyze an especially intermittent issue. If you believe the console logs can be of some help, especially if you have suspicions, well those dates and times can really help to find messages in the logs to further narrow potentials down to something specific.
  • On console logs: The more dates and times you have for events the more samples you can take from the logs to udnerstand any patterns or repeating messages to really begin to correlate a pattern down to something much more specific. So here the rule is, don't let the issue annoy you (if possible) take it as a point of leverage so that you are better equipped (lots of dates and times) when you visit the console looking for hints.
  •  
This post was modified 7 months ago 7 times by Alex Santos
1

I appreciate the detailed instructions, @Alex-santos. You put a lot of time into that.  Unfortunately, the behavior was intermittent enough to make it completely impractical to test so methodically, especially on removing hardware from the mix or working from a second user account.  Days would go by with no problems at all, so how could I get valid results?

The bad news is that after more than 3 weeks with no interrupts (thinking removal of Clean My Mac fixed it), I've suddenly got interrupts again.  ARGH.

I've spent hours in the past on other problems trying to read console logs and all I get is a headache out of it. I don't know what I'm looking for in the sea of data & the logs are organized in a way that makes no sense to me.  I get what you're saying that if I look every time it pauses maybe I'd start to see a pattern, but there's just too much data.

😥

Hi Allison, I appreciate the comments and admittedly, the console is not what it use to be and as a result I don't spend a lot of time getting help from the console. Much of this ahs to do with the Apple unified log announced several years ago, Despite this I will try to help you further but I doubt I will be as effective as you and I might wish.

I will start with this statement you made "Days would go by with no problems at all, so how could I get valid results?". The only thing I can offer here is a physical notepad and a pencil at your desk. The moment the intermittent issue reproduces itself, write down the date, time and a brief description of the front facing app and what action you performed at the time.

Considering how difficult and seemingly innaccesible the console has become over the years your note taking efforts may be a futile excercise unless you can apply those notes by investigating the logs. Oh the conundrum …

If you are very desperate to put a dent into the issue (why does this feel so windows XP like) please consider a back up followed by a reinstall of Mac OS. At least you will know it is not the OS at that stage should the issue persist.

The only other thing I can offer you at this time is a casual 10-15 minute read, https://eclecticlight.co/2018/03/19/macos-unified-log-1-why-what-and-how/. I read it ahead of time before posting it for you and I confess that there is nothing I can extrapolate to immediately help you. The article is a brief history of how the Apple unified logging system came about, some of the resulting frustrations and a remedy of free applications that may or may not be useful at weening out relevant data from the unified log, depending on what I believe might be the user's expert level).

If I can help any further I most certainly will. You might want to consider joining the macadmin slack channel, https://macadmins.herokuapp.com. It's a wonderful community of bright people, a plentitude of channels ranging from all kinds of Mac topics. Who knows, you might find someone there who is comfortable with Apple's unified log, providing you a more meaningfully and practical approach to an end than I was able to.

EDIT:
Another article highlighting the frustrations of the unified log.

Why can’t I find anything useful in Sierra’s logs?

Do search "logs" on the eclectic light site for more articles.

Cheers!
—Alex

1

And after I wrote that I got the idea to keep the console running real time in the background where I could see _immediately_ what spit out right when the lags occur.  It was really hard to catch but I _may_ have found it. More often than not I saw some sort of message about Bluetooth.  I forget whether this ever happens away from my desk, but at my desk, I'm using a Magic keyboard and trackpad.  

I was having lags every few minutes, so I plugged the two devices in via USB, and then turned off Bluetooth and I haven't had a lag since.  Not declaring victory by ANY means, but I'm trying to use @alex-santos's advice!

0

Interesting. I've been having unexplained lags on my Office iMac... I'll go to type an email and things pause, just as @podfeet described. Or I'll go to enter a password and Safari will hang. But it's happening in lots of apps, and when it happens the CPU usage of the front-most app spikes.

But since it's happening in lots of apps I've started thinking it's gotta be a system problem. I think I have CMMX installed on that Mac (if I do, it's been that way for far longer than I've had this problem). if so, I'll try removing it. I'm also thinking it's time to run DaisyDisk to see if I've got some mondo log file running again. 

That IS interesting. Note that quitting CMMX didn’t fix the problem, only uninstalling fixed it. I didn’t often see a commensurate CPU or memory or network spike when it happened but it was in all apps and the Finder.

Yeah, I'm definitely seeing it in enough apps that I am (nearly) certain it's not one app. It's either the system, or something running in the background. CMMX definitely has a background agent that watches for uninstalled things (like Hazel or AppCleaner, etc), so that certainly could be it.

It _was_ happening on my laptop, and CMMX has never been on here, but I think that might have been different, because it seems to have stopped. There was another change I made (long story) that I think fixed that.

I'll mess with CMMX on my iMac tomorrow and circle back to see if that fixes it. It will be readily apparent, as the issue seems to happen multiple times per hour.

Page 1 / 2
Share: