Google Chrome might just be thrashing performance on your Mac. And I'm going to explain why, how, and most importantly — what you can do about it. Because… this is a breaking controversy, with some people ready throw Chrome in a burning trash fire and others saying there's no proof, and even talking about it is reckless and shameful.
I think talking about it in a fair and upfront, and as reasonable a way as possible is how we get to the truth.
Keystoned
Loren Brichter on Twitter:
So it turns out that Google Chrome was making everything on my computer slow *even when it wasn’t running*, because it installs something called Keystone which is basically malware.
— Loren Brichter (@lorenb) December 12, 2020
I made a website because this shouldn’t happen:https://t.co/Twwxir5pwF
Now, if you don't know Loren, he's a legit 9000 IQ, maybe 11000 IQ genius type who helped build the graphics pipeline for the original iPhone — the one that gave Steve Jobs the rock-solid 60 frames per second he demanded way back in 2007. Then Loren made Tweetie (which was bought by Twitter and turned into the first official Twitter app), invented pull-to-refresh, and then created the game Letterpress.
Now, it isn't that Google's background updater, Keystone, hides itself from Activity Monitor; it's that it only shows up when it's actively updating Chrome. But, according to Loren's theory, when that process goes wrong, it goes wrong before Keystone shows up in Activity Monitor, which makes it effectively hidden even as it's causing the problem.
Also, that this is nothing new, that Wired called Keystone 'evil' way back in 2009 already, when it kicked off with Google Earth. That's more than 10 years ago. And other websites have reported on problems with it since then.
I don't know if Google was doing something nefarious with Keystone, or a third party figured out how to (which Wired warned about). But either way, I'm not inclined to give Google-the-organization the benefit of the doubt (despite the many good people who work on Chrome) since it's been a decade+ and this still hasn't been "fixed". There is no reason for auto-update software to need to do what Chrome/Keystone was doing. It also has a long history of crashing Macs.
From Loren's website, and this part really resonated with me, and I'll tell you why in a sec:
I noticed my brand new 16" MacBook Pro started acting sluggishly doing even trivial things like scrolling. Activity Monitor showed nothing from Google using the CPU, but WindowServer was taking ~80%, which is abnormally high (it should use <10% normally).
Doing all the normal things (quitting apps, logging out other users, restarting, zapping PRAM, etc) did nothing, then I remembered I had installed Chrome a while back to test a website.
I deleted Chrome, and noticed Keystone while deleting some of Chrome's other preferences and caches. I deleted everything from Google I could find, restarted the computer, and it was like night-and-day. Everything was instantly and noticeably faster, and WindowServer CPU was well under 10% again.
WindowServer pain
See, all year, I've been incredibly frustrated, maddened even, by similar problems and had similarly tried everything I could think of.
It was especially bad when I was up all night trying to finish my embargoed video reviews for the iPhones, Apple Watch, Macs, and everything else released this year. Literally, up all night, watching Final Cut Pro performance plummet, wasting hours, precious hours, rebooting, uninstalling plugins, just everything imaginable. And I just blamed macOS Catalina for it because Catalina seemed to be one of those painful transitional updates that everyone blamed for everything. So, I tweeted out my complaints about it, about whether PDK, the plugin manager daemon was causing it, whether WindowServer itself had gone rogue or gone bad. I even took the rare-step for me and bugged a few friends at Big Fruit. And never got any satisfying answers or solutions.
Not until this.
Now, I use Safari almost all the time because I get way, way, way better performance and battery life with Safari than I do with Chrome, I think mostly due to how they use hardware and software system resources and handle tabs. I'll get to other browsers in a minute too.
But because Google, a primarily web-based ad company, has very different priorities than Apple, a primarily native-based device company, and because Chrome rode the utter destruction of Internet Explorer into browser dominance, time-constrained developers and short-sighted product managers have just begun to treat Chrome as the web, ironically the same way they used to treat Internet Explorer, so some websites and web apps, including Google's, work better or only work at all in Chrome. And even though Google's Blink and Chromium renders forked from Apple's WebKit, the different directions they've taken since mean Safari often gets the short end of the very pointy support stick.
The Chrome team was kind enough to respond, even on a Saturday night:
1/ Hi Loren - Keystone is indeed the Chrome updater for Mac. It does not hide itself from Activity Monitor and it only runs (at low priority) when it has tasks to perform.
— Mark Chang (@mchang) December 13, 2020
We aren't aware of any open issues that would cause high CPU usage from Keystone, but please file a bug at http://crbug.com with steps to reproduce it, and we'll try and fix it as quickly as possible.
Keystone will show up in Activity Monitor when it spins up to do its periodic checks and updates, but the issue seems to be it's causing WindowServer to thrash without or before it shows up, or perhaps as it's trying to show up?
And because Keystone hasn't shown up yet, but WindowServer is thrashing, it is completely non-obvious that Keystone may be the cause. Like dark matter, you can only measure its effect on the rest of the system. And yes, sure, post hoc ergo propter hoc logical fallacy understood, removing it seems to fix the problem.
Dark Matter
Now, yes, just launching Activity Monitor will cause WindowServer to spike because you can't observe something without affecting it, but in this case, you're launching it because you're already observing the performance issues, not just for the hell of it. And if removing Keystone seems to stop those performance issues, then you're verifying the existence of that dark matter. So no, no prize for pointing that part out.
And sure, there could be other explanations, like maybe knocking out Keystone also knocks out something else that was causing this, or some issue between macOS and Keystone, or whatever.
But just putting on my consumer hat for a moment — I don't care. That's not my problem. That's for the 9000 IQs to figure out. I'm the parent here. I don't want or need to know the details. I just need it fixed so I can work without feeling the need to throw a multi-thousand dollar machine out the window.
There's also a school of thought here that Chrome just shouldn't be updating this way regardless. That, yes, Google wants to make the Chrome update process essentially invisible but that plenty of apps handle updates every day, from the Mac App Store to Spark to more traditional, transparent methods that don't leave any doubt about this kind of thing. And that when any company, not just Google, but Zoom, even Apple, makes the box too opaque, bad things tend to grow in it. Including performance and security issues.
I imagine now that it's getting a ton of attention, awareness will escalate. And it'd be great if the macOS or Chrome team or whoever can figure this out because, anecdotally at least, people who've been hella frustrated sure think they've found the solution to those frustrations and it's at least temporarily removing Chrome, or at least cutting off Keystone at the knees.
Neither of which are obvious to do and the latter of which might be dangerous from a security point of view.
What you can do
Loren suggests these steps, which I'm following for now and unless and until Chrome fixes the issue or it's reasonably proven not to be a Chrome issue:
- Go to your /Applications folder and drag Chrome to the Trash.
- In the Finder click the Go menu (at the top of the screen), then click "Go to Folder...".
- Type in /Library and hit enter.
- Check the following folders: LaunchAgents, Application Support, Caches, Preferences.
- Delete all the Google folders, and anything else that starts with com.google... and com.google.keystone...
- Go to "Go to Folder..." again.
- Type in ~/Library and hit enter. (Note the "~")
- Check the following folders: LaunchAgents, Application Support, Caches, Preferences.
- Delete all the Google folders, and anything else that starts with com.google... and com.google.keystone...
- Empty the Trash, and restart your computer.
This is what I'm doing now. Because the issues are frustrating enough that, even though I do depend on Chrome for some things, I'm willing to try it because I depend on my Mac performance for everything.
There's also a MacObserver article from 5 years ago that explains how to use terminal commands to change the frequency for Keystone checks. That's if you really can't or don't want to remove Chrome but need to stop the system thrashing.
John Martellaro shows how to change it to run only every 48 hours... or never… but correctly points out never leaves you without security updates, which… leaves you open to security exploits. I'll leave a link in the description but proceed with extreme caution.
Also, if you also can't just stick with Safari because some damn website or another doesn't properly support it, other Chromium-based browsers like Microsoft Edge probably don't have the same problem because, while they use Google's rendering engines, they don't use Google's Software update engine. So, they should be fine.
Personally, I'm giving this a try. If you are as well, let me know how it works for you.
Is Google Chrome's updater killing Mac performance? posted first on http://bestpricesmartphones.blogspot.com
No comments:
Post a Comment