All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karsten Blees <karsten.blees@gmail.com>
To: pro-logic <pro-logic@optusnet.com.au>, msysgit@googlegroups.com
Cc: Sebastian Schuberth <sschuberth@gmail.com>,
	git@vger.kernel.org,  szager@google.com
Subject: Re: Windows performance / threading file access
Date: Thu, 17 Oct 2013 18:50:42 +0200	[thread overview]
Message-ID: <52601562.2090301@gmail.com> (raw)
In-Reply-To: <3bb056f6-5f8b-486e-8e5e-9bf541bd0d0b@googlegroups.com>

Am 16.10.2013 00:22, schrieb pro-logic:
> I also get fairly slow performance out of the checkout / reset 
> operations on windows.
> 
> This discussion got me trying to work out what's taking so long on 
> windows. To help I used killcache [1] to flush the HDD cache and
> Very Sleepy [2] to profile the code. I couldn't use the 
> GIT_TRACE_PERFORMANCE [3] patch as that seems to only work on script 
> commands, and in my case I just get a result of "335 seconds git 
> reset --hard head" from the log.

The trace_performance functions require manual instrumentation of the code sections you want to measure, e.g. like this [1]. Output looks like this for a full WebKit checkout (Win7 x64, Core i7 860, WD VelociRaptor 300, NTFS, no virus scanner, no luafv, no defragger):

trace: at entry.c:128, time: 135.786 s: write_entry::create
trace: at entry.c:129, time: 101.6 s: write_entry::stream
trace: at entry.c:130, time: 0 s: write_entry::read
trace: at entry.c:131, time: 0 s: write_entry::convert
trace: at entry.c:132, time: 0 s: write_entry::write
trace: at entry.c:133, time: 4.71825 s: write_entry::close
trace: at compat/mingw.c:2150, time: 5.68786 s: mingw_lstat (called 661660 times)
trace: at compat/mingw.c:2151, time: 259.219 s: command: c:\git\msysgit\git\git-checkout.exe -f HEAD

> After running killcache I ran very sleepy connected to git, and 
> according to the profile: 95.5% of the time is spent in do_lstat 
> (mingw.c) / NtQueryFullAttributeFile (ntdll)

Very Sleepy confirmed my numbers from above: lstat was always much smaller than create/stream/read/write. Could you post details about your test setup? Are you still using WebKit for your tests?

> For fun, not knowing if I would break anything or not (it probably 
> does), I wrapped the entire unpack_trees method in the fscache [4] 
> and the total git reset --hard head time fell from 335 seconds to 28 
> seconds, a 11x improvement.

Hmmm...this doesn't work for me at all. Fscache isn't updated during checkout, so lstat-checks whether creating a file or directory succeeded will fail.

$ git config core.fscache true
$ time git checkout -f HEAD
Unlink of file 'Examples' failed. Should I try again? (y/n) n
warning: unable to unlink Examples: Permission denied
fatal: cannot create directory at 'Examples': Permission denied


Karsten

[1] https://github.com/kblees/git/commit/b8eca278

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

  reply	other threads:[~2013-10-17 16:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-10 18:18 Windows performance / threading file access Stefan Zager
2013-10-10 20:19 ` Sebastian Schuberth
2013-10-11  0:51   ` Karsten Blees
2013-10-11  5:28     ` Stefan Zager
2013-10-11  5:35     ` Stefan Zager
2013-10-11  5:48       ` Duy Nguyen
2013-10-15 22:22       ` pro-logic
2013-10-17 16:50         ` Karsten Blees [this message]
2013-10-21 22:58           ` pro-logic
2013-10-22 14:30             ` Karsten Blees
2013-10-22 14:49               ` Sebastian Schuberth
2013-10-22 15:40                 ` Karsten Blees

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52601562.2090301@gmail.com \
    --to=karsten.blees@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=msysgit@googlegroups.com \
    --cc=pro-logic@optusnet.com.au \
    --cc=sschuberth@gmail.com \
    --cc=szager@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.