You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Internal git process periodically using ~100% CPU usage on macOS #10171
Describe the feature or problem you’d like to solve
I am running GitHub Desktop 2.5.3 on a 2018 MacBook Pro running macOS 10.14.6. Recently, I've noticed that my computer's fans turn on periodically. When I investigated, I found that GitHub's internal git process would eat ~100% CPU (equivalent of one core) for roughly 1-2 minutes.
Proposed solution
Determine what git is doing in the background and either stop it or otherwise message what it's doing in the UI.
@ericdrobinson Thanks for the report. Please upload your logs from the day this happened -- see the Help menu in Desktop -- so one of our developers can take a look.
The issue happened again right before I grabbed this log. The last few lines are probably the most relevant.
Also, of all of the other issues you listed (thanks!), I think the closest looked like #7955 but I suspect it's unrelated as the referenced background process takes merely ~14-30s which I believe is only a fraction of the time that the internal git process sits at that ~100% CPU utilization...
It´s happening for me on PC some for some days now.
I cant pull, refresh or any operation without CPU going to 100% and the operation doesn´t work even if I wait an hour.
Only way to really get CPU usage down again is using task manager to finish Git there.
i9 - 0080HK CPU - 64Gb RAM here.
My understanding (guess?) is that these random 100% CPU usage spikes are due to a whole bunch of git status processes running in the background to update the Repository Status Indicators.
Yesterday's update of GitHub Desktop to v2.5.6 included this little nugget:
Periodic background fetch and status updates can now be disabled in the Advanced section of Preferences/Options - #10593
Disabling this feature via the new option may help cut down on the periodic 100% CPU usage issue. I have made the change myself and will keep an eye on whether the problem persists or not.
@ericdrobinson I'm going to close this out since we are tracking these CPU issues in #10625. Please let us know if disabling background fetching helped improve things for you.
Please let us know if disabling background fetching helped improve things for you.
Disabling background fetching does appear to have improved things for me.
As an experiential note, the background git process would consume ~100% of a logical CPU core when active and last somewhere between 30-60 seconds. As I am on a laptop (2018 15" MacBook Pro) with multiple external monitors connected¹, the additional heat from this process would typically cause the fans to spool up to 100%. In warmer operating environments (read: summer), this would also drive up the frequency with which kernel_task CPU floods occurred, causing the computer to grind to a painful halt in the middle of standard work.
¹The multiple monitors are important because of the effect that some connections to external monitors have on power draw. This gets pretty technical, but the short of it is that the GPU has to synchronize display timings between external monitors and the built-in panel (e.g. with laptops), and if an efficient cross-monitor configuration cannot be found, the display driver will simply run the GPU at maximum power draw to compensate. This additional power production will reduce the amount of thermal headroom typically provided to the CPU. In short, people with laptops using external monitors may be more severely affected by (or otherwise notice) the sudden burst of CPU draw from the background process.
Activity
tierninho commentedon Jul 8, 2020
@ericdrobinson Thanks for the report. Please upload your logs from the day this happened -- see the Help menu in Desktop -- so one of our developers can take a look.
Ref: #9969, #9901, #9662, #9675, #7955, #7610, #5789, #5226 as we have a few reports of similar issues.
ericdrobinson commentedon Jul 9, 2020
@tierninho Hah! It happens every day (and night) so I'll just post the latest log. See:
2020-07-09.desktop.production.log
The issue happened again right before I grabbed this log. The last few lines are probably the most relevant.
Also, of all of the other issues you listed (thanks!), I think the closest looked like #7955 but I suspect it's unrelated as the referenced background process takes merely ~14-30s which I believe is only a fraction of the time that the internal
gitprocess sits at that ~100% CPU utilization...Holfz commentedon Jul 9, 2020
Can confirmed this happens on windows too. I've got like ~68-100 CPU usage when trying to commit the change

It's pushed the change to repo but desktop stuck at

Fetching originand start to affect the CPU usage.Here is the log files :
2020-07-09.desktop.production.log
ptzkoke3 commentedon Jul 10, 2020
ptzkoke3 commentedon Jul 10, 2020
1bertor commentedon Aug 26, 2020
It´s happening for me on PC some for some days now.
I cant pull, refresh or any operation without CPU going to 100% and the operation doesn´t work even if I wait an hour.
Only way to really get CPU usage down again is using task manager to finish Git there.
i9 - 0080HK CPU - 64Gb RAM here.
UebelAndre commentedon Sep 20, 2020
This is happening to me as well. Does anyone know if this is an upstream issue?
ericdrobinson commentedon Sep 29, 2020
My understanding (guess?) is that these random 100% CPU usage spikes are due to a whole bunch of
git statusprocesses running in the background to update the Repository Status Indicators.Yesterday's update of GitHub Desktop to v2.5.6 included this little nugget:
Disabling this feature via the new option may help cut down on the periodic 100% CPU usage issue. I have made the change myself and will keep an eye on whether the problem persists or not.
steveward commentedon Oct 20, 2020
@ericdrobinson I'm going to close this out since we are tracking these CPU issues in #10625. Please let us know if disabling background fetching helped improve things for you.
ericdrobinson commentedon Oct 20, 2020
@steveward Understood, thanks!
Disabling background fetching does appear to have improved things for me.
As an experiential note, the background
gitprocess would consume ~100% of a logical CPU core when active and last somewhere between 30-60 seconds. As I am on a laptop (2018 15" MacBook Pro) with multiple external monitors connected¹, the additional heat from this process would typically cause the fans to spool up to 100%. In warmer operating environments (read: summer), this would also drive up the frequency with which kernel_task CPU floods occurred, causing the computer to grind to a painful halt in the middle of standard work.¹ The multiple monitors are important because of the effect that some connections to external monitors have on power draw. This gets pretty technical, but the short of it is that the GPU has to synchronize display timings between external monitors and the built-in panel (e.g. with laptops), and if an efficient cross-monitor configuration cannot be found, the display driver will simply run the GPU at maximum power draw to compensate. This additional power production will reduce the amount of thermal headroom typically provided to the CPU. In short, people with laptops using external monitors may be more severely affected by (or otherwise notice) the sudden burst of CPU draw from the background process.
I hope this is helpful.