Github for windows - ssh-agent.exe using high CPU + 100% disk?
Asked Answered
L

4

38

I've just installed Github for Windows on my Windows 8.1 machine and it appears to work fine except that my machine performance drops down dramatically.

Looking at task manager I see that ssh-agent.exe is using a constant 25% CPU (no doubt 100% of one of my cores) and the disk usage is at 100%.

I have had a look on the Internet but can't find any reference to what might be causing this.

Any ideas what might be causing this and how to resolve it?

UPDATE:

I can kill the process and GitHub for Windows appears to keep working but the ssh-agent.exe process starts up again as soon as I close and restart Github for Windows.

Lascivious answered 24/10, 2014 at 11:29 Comment(0)
H
13

Further to moggizx's comment in one of the other answers, I found this was influenced by SourceTree too.

The instance of ssh-agent.exe with the high CPU actually gets terminated when you close SourceTree. Restarting SourceTree does cause another ssh-agent process to be spawned, but the CPU is then idle.

Hirsute answered 8/1, 2018 at 18:36 Comment(3)
I can confirm at the end of year 2021 that SourceTree still has this problem (!).Effy
Here is a current bug open for SourceTree on this issue: jira.atlassian.com/browse/SRCTREEWIN-13776Lovato
For the meantime, until they fix the issue, I wrote a windows service that monitors the CPU usage of ssh-agent.exe and kills it once it exceeds a certain limit (10% by default).Spermatium
A
8

We've seen this happen on occasion due to a race condition between ssh-agent and anti-virus software competing over resources. Do you have any anti-virus software installed? Would you be able to temporarily turn it off and see if the problem persists? We'd be very keen to dig deeper into this if you could reach out to [email protected].

Arly answered 24/10, 2014 at 12:45 Comment(10)
the only AV I have running is Windows Defender.. I have tried disabling real-time protection but I still get ssh-agent.exe using high cpu. the strange thing however is that with RT protection disabled in the AV disk usage stays at 0% where with it enabled disk usage is at 100% when sd-agent is running. I'll email github support with this info anyway. thanksLascivious
@miked Just to be really clear here, when you say sd-agent, do you actually mean ssh-agent? sd-agent is not part of GitHub for WindowsArly
correct, the process in question is ssl-agent, NOT sd-agent. I have corrected the original postLascivious
Win 7 x64, latest github. This process starts as soon as I launch git shell, stays running after I close the shell, and constantly chews an entire core. Disabling my AV (McAfee Enterprise) didn't help anything.Milagro
ditto here, Win 8 x64, latest github - high cpu. I do see defender fighting with it but disabling that had no effect on ssh-agentNullity
I have the same issue, ssh-agent completely eating up one core, but only in combination with SourceTree. I'm using ssh-agent when using git on commandline too, but I never get this issue until SourceTree has been running for a while. I have F-Secure and I've made an exception for the ssh-agent.exe but it didn't help. Restarting SourceTree solves it, for a while...Clerc
Shouldn't it be reported to Git developers? It's not GitHub issue, it's happening with SourceTree also. And it's happening for 2 years already, multiple Git versions passed and nothing changed.Hysterectomy
Its 2017 and I landed on this page. The aforementioned ssh-agent.exe of github software uses 50% of my cpu. Even worse , with windows 10 this happens even when the laptop is in sleep mode.Caddric
I have the same issue on SourceTree, my AV is Sophos, I disabled all active protection features and added exceptions to it but it's still the same thing. I seriously doubt it's really that, because everyone in this thread has different AVs installed.Farley
Facing this issue after a windows 10 upgrade - windows 7 was fine. Other teammates facing the same issue as well. Corporate environment so the antivirus can't be disabled. Symptom: ssh.exe shows one full core of CPU usage while doing a git push/pull (and the operation hangs - I terminate it from my cygwin with Ctrl + C). ssh.exe continues to run in the background, eating one whole core until terminated in task manager.Suspense
O
3

I found the same issue, my solution was to add the file and the process C:\Program Files\Git\usr\bin\ssh-agent.exe to exclusion list in Windows Defender on Windows 10.

Oliva answered 3/5, 2017 at 17:22 Comment(3)
I'm also having this issue. I'll try this out and update here if it worked for me. For the record, the only anti-virus software I am running is Windows Defender.Hamburger
I believe it also has something to do with the size of the repository. If you have many files there this happensSupereminent
Adding ssh-agent.exe to exclusion list is not helping. I am also using Windows Defender.Weft
S
-1

The reason this happens is most likely that your git repository is huge. Probably you have mistakenly instantiated it in a folder where you have an enormous amount of files. So git loops over them constantly and thus takes up alot of processing power needlessly. You can try and delete your .git folder(s) and this should stop.

Try and initialize your git repo in a folder where you exclusively use your projects.

I would still consider this to be a sort of bug, because we should be notified if this happens(we shouldn't need to find out by opening task manager).

Supereminent answered 25/5, 2017 at 8:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.