Re: How to boost git performance on Windows

1,113 views
Skip to first unread message

Thomas Ferris Nicolaisen

unread,
Jul 22, 2013, 4:07:45 AM7/22/13
to git-...@googlegroups.com, msy...@googlegroups.com
On Monday, July 22, 2013 8:28:03 AM UTC+2, Teddy wrote:
Dear all,

Has anyone got ideas to boost the git performance on windows?

I am testing git on windows 2012 64 bit server (testing environment) with latest git 1.8.3.
Intel Xeon @2.5 GHz 12 cores (24 threads) with 32 GB RAM.

Here are the tweaks i've done so far :
- uninstall non critical software
- disable firewall 

This is generally a bad idea. I doubt a firewall will have an effect on performance by itself. Either it will block traffic entirely, or if correctly configured, allow traffic to pass through. If some firewall does packet inspection on the fly, this should only affect git pull/push/fetch, which you don't do so often anyway.
 
- not using any antivirus
 
Again, this is a bad idea. Perhaps you can set your antivirus software to exclude any on-the-fly scanning of your git repositories (c:\projects\ or whatever), or schedule scans to run at intervals where you are not using Git.
 
- disable non critical windows services
- set windows performance options ==> "adjust for best performance"

Maybe those two are generally good advice for Windows users, but I doubt they will add much to Git performance directly. 
 
- use git portable

I don't see why using git portable would offer an advantage (?).
 
- disabled the UAC

As with the firewall above: Either Windows will block your operations, or it will allow it without limiting performance (unless Windows checks permissions on every micro-operation - I'm not a Windows expert so someone else will have to correct me on this if I'm in the wrong here).

Compared to the git performance on linux, the git on windows are wayyyy slower.
Example on linux : 1 min, on windows : 13 mins

It would be more useful if you would include what Git commands you are using here, and what the size of the repository is.
 
Anyone can suggest other improvements?

How about working on SSD-drives? Since Git is largely file-system based (and I'm guessing a large part of Linux' performance advantage comes from cleverly caching file-system reads in memory), running on SSD could offer some big improvements.

If you are doing some kind of one-off operations or analysis, and you just need a really fast Git repository for the day, you could try cloning onto a RAM disk and do the operations there. Just remember to clone back onto a proper disk regularly or before you reboot, so you don't lose data. 

I'll also CC the msysgit list as this is up their alley. 

Karsten Blees

unread,
Jul 22, 2013, 8:38:28 AM7/22/13
to msy...@googlegroups.com, git-...@googlegroups.com
On Monday, July 22, 2013 10:07:45 AM UTC+2, Thomas Ferris Nicolaisen wrote:
On Monday, July 22, 2013 8:28:03 AM UTC+2, Teddy wrote:
Dear all,

Has anyone got ideas to boost the git performance on windows?

 
'git config core.preloadindex true' boosts performance of many git
commands, e.g. 'git status' by factor 2-3.

The (still not quite finished) fscache patch series [1] improves many
interrogation commands, e.g. 'git status' by another factor 3-4 on top of
preloadindex. A 1.8.3 installer to test this can be found here [2].

Scripted commands, however, will be much slower on Windows due to
expensive fork emulation.

HTH,
Karsten

[1] https://github.com/msysgit/git/pull/47
[2]
https://docs.google.com/file/d/0BxXUoUg2r8ftczNmVFAtYXllTEE/edit?usp=sharing
 

Johannes Schindelin

unread,
Jul 22, 2013, 10:42:46 AM7/22/13
to Thomas Ferris Nicolaisen, git-...@googlegroups.com, msy...@googlegroups.com
Hi,

On Mon, 22 Jul 2013, Thomas Ferris Nicolaisen wrote:

> On Monday, July 22, 2013 8:28:03 AM UTC+2, Teddy wrote:
>
> > - not using any antivirus
>
> Again, this is a bad idea. Perhaps you can set your antivirus software
> to exclude any on-the-fly scanning of your git repositories
> (c:\projects\ or whatever), or schedule scans to run at intervals where
> you are not using Git.

This is probably the best way to speed up Git on Windows: exclude your
project directories from scanning.

In general, Windows' file system performance has a *lot* of room for
improvement. Linux is just so much more efficient at accessing, caching
and writing files than Windows (and it is quite obvious that the vast
majority of the people who are both capable and willing to contribute
patches to Git are using Linux, not Windows) that this is probably the
primary reason for performance issues with Git on Windows.

> How about working on SSD-drives? Since Git is largely file-system based
> (and I'm guessing a large part of Linux' performance advantage comes
> from cleverly caching file-system reads in memory), running on SSD could
> offer some big improvements.

I could not agree more.

There is also a vast performance improvement in the works:
https://github.com/msysgit/git/pull/47 (Karsten Blees is one of the
handful of Windows people who cannot be thanked enough for all of his
wonderful contributions to the Git project).

Ciao,
Johannes

Johannes Schindelin

unread,
Jul 22, 2013, 10:44:02 AM7/22/13
to Karsten Blees, msy...@googlegroups.com, git-...@googlegroups.com
Hi Karsten,

On Mon, 22 Jul 2013, Karsten Blees wrote:

> [1] https://github.com/msysgit/git/pull/47

Heh... I actually missed your mail before I started writing mine... ;-)

Ciao,
Dscho
Reply all
Reply to author
Forward
0 new messages