git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Inexplicably deteriorating performance of Git repositories on Windows

From
A Large Angry SCM <gitzilla@gmail.com>
Date
Nov 24, 2010, 21:18 UTC
Message-ID
<4CED8127.8060505@gmail.com>
In-Reply-To
<AANLkTi=X724OJgUvG0Ggu3OwxyaJprr9CLL+t+x=MbTO@mail.gmail.com>
On 11/24/2010 04:00 PM, Dun Peal wrote:
Show 50 quoted lines
> On Wed, Nov 24, 2010 at 5:16 PM, Joshua Jensen
> <jjensen@workspacewhiz.com>  wrote:
>> Whenever I want to know exactly what is going on with disk access, I
>> download Process Monitor from http://sysinternals.com/.
>>
>> In order to just show disk access, I filter entries that begin with TCP,
>> UDP, and Reg out.
>>
>> Josh
>
> Thanks, we tried that and we don't see a whole lot of disk activity on
> the "fast" machines.
>
> One emerging theory is that the "slow" Windows machines differ from
> the "fast" ones by how their disk cache works.
>
> So `git status` on a large tree heavily depends on caching. Without
> it, it would be slow; with it, it's much faster.
>
> We verified that part since when we reboot a fast Windows machine, the
> first run of `git status` is slow (~30s) but the next one is much
> faster (~5s).
>
> We see a similar phenomenon on Linux: the first run is always
> significantly slower than the others.
>
> On slow Windows machines, this difference is much less pronounced.
>
> On a typical "slow" machine, if you clone the repo, the first run of
> `git status` on it would already be fast (5s). But then your reboot,
> and the first run is slow, but then it only gets up to 14s. And you
> can't get back the 5s latency unless you re-clone the repo and status
> the fresh clone.
>
> So my theory is that there's a cache that on the "fast" machines
> aggressively caches the entire tree on a regular `git status` run. On
> such a machine, it's enough to run `git status` once, and after that
> initial cold run, the rest will be warm... until you reboot the
> machine, rinse, repeat.
>
> On a slow machine, however, cache isn't so aggressive. It might be
> write-oriented. So when you write out a whole new working tree, that
> tree gets cached as it is written. And for the remainder of the
> lifetime of that cache, you get the fully-cached performance you see
> on the "fast" machines. But then you reboot the machine, and lose the
> cache. And since the caching process isn't aggressive, any number of
> `git status` runs won't get you back to the fully cached state. You
> will only get that on a newly written working copy.
>
> What do you think?

How much memory do the fast and slow machines have? How much memory will windows use for disk caching? Is it possible that your normal work flow between status' are forcing the caches to pruned due to memory pressure?

Previous: Dun PealNext: Johannes Sixt
Message 10 of 21 in “Inexplicably deteriorating performance of Git repositories on Windows”
  1. Dun PealNov 23, 2010
  2. Wilbert van DolleweerdNov 23, 2010
  3. Dun PealNov 23, 2010
  4. Wilbert van DolleweerdNov 23, 2010
  5. Stephen BashNov 23, 2010
  6. Dun PealNov 23, 2010
  7. Tay Ray ChuanNov 24, 2010
  8. Joshua JensenNov 24, 2010
  9. Dun PealNov 24, 2010
  10. A Large Angry SCMNov 24, 2010
  11. Johannes SixtNov 24, 2010
  12. Dun PealNov 24, 2010
  13. Martin LanghoffNov 23, 2010
  14. Dun PealNov 23, 2010
  15. Ferry HubertsNov 23, 2010
  16. Dun PealNov 23, 2010
  17. Andreas EricssonNov 24, 2010
  18. Dun PealNov 24, 2010
  19. Nguyen Thai Ngoc DuyNov 24, 2010
  20. Dun PealNov 24, 2010
  21. Robin RosenbergNov 28, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.