From: Kacper Michajlow <kasper93@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin multithreading performance
Date: Sun, 06 Dec 2015 20:56:00 -0000 [thread overview]
Message-ID: <CABPLASQZrDMnN32GG3-qRsnHhjsoroaY7ti1wx5uASDqdU7M+g@mail.gmail.com> (raw)
In-Reply-To: <5663EB9A.40002@maxrnd.com>
2015-12-06 9:02 GMT+01:00 Mark Geisert <mark@maxrnd.com>:
> Kacper Michajlow wrote:
>>
>> 2015-12-05 23:40 GMT+01:00 Mark Geisert <mark@maxrnd.com>:
>>>
>>> It looks like we're going to have to compare actual pthread_mutex_lock()
>>> implementations. Inspecting source is nice but I don't want to be
>>> chasing a
>>> mirage so I really hope there's a pthread_mutex_lock() function inside
>>> the
>>> MinGW git you are running. gdb could easily answer that question. Could
>>> you please do an 'info func pthread_mutex_lock' after starting MinGW git
>>> under MinGW gdb with a breakpoint at main() (so libraries are loaded).
>
> [...]
>>
>> Hmm, thinking about it mingw doesn't have pthread implementation or
>> any wrapper for it. If someone needs pthread they would probably go
>> for pthreads-w32 implementation.
>>
>> I started to wonder because I don't recall git would need pthreads to
>> compile on Windows. And indeed they have a wrapper for Windows API...
>> https://github.com/git/git/blob/master/compat/win32/pthread.h
>> https://github.com/git/git/blob/master/compat/win32/pthread.c
>
>
> OK, so git has its own pthread_mutex_lock/unlock ops which map to very
> light-weight critical section operations.
>
>> Though it is not really a matter that "native" git build is fast and
>> all, but that Cygwin's one really struggles if it comes to MT workload.
>
>
> In the worst cases I see using your testcase, about half the time the
> busiest locks are processed within 1 usec but there's a spectrum of longer
> latencies for the other half of the time. I don't know (yet) if that can be
> improved in Cygwin's more general implementation but at least the matter has
> now been brought to our attention :).
,
Yes, I can imagine, git's objects are very small so threading overhead
is very noticeable.
>> And this not only issue with git unfortunately. Download speeds are
>> also limited on Cygwin. I know POSIX compatibility layers comes with a
>> price but I would love to see improvements in those areas.
>> Cygwin:
>> Receiving objects: 100% (230458/230458), 78.41 MiB | 1.53 MiB/s, done.
>> "native" git:
>> Receiving objects: 100% (230458/230458), 78.41 MiB | 18.54 MiB/s, done.
>
>
> You're asserting this additional testcase has the same cause. What is
> telling you that? And FTR what is the git command you are issuing? I can
> then do the lock latency analysis on this new testcase if warranted.
No, sorry, I mixed different things. It is just that I'm ruining both
git build lately and I wanted to share another issue before I forget
about it.
This was git clone command for some random repository from github.
There is a lot factors at hand here but the fact is with cygwin speed
is capped on 1.5MB/s and this is reproducible. This is probably also
related to the fact that git operates on large amount small object.
But this time it is single thread workload. I tried strace this, but
frankly I am not sure what to look for.
All in all I just want to bring those issues to your attention.
Whether it is fixable or not is another story. But we will not know
unless someone with required knowledge analyze it.
-Kacper
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2015-12-06 20:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-14 0:24 Kacper Michajlow
2015-11-19 20:24 ` Mark Geisert
2015-11-20 14:25 ` Kacper Michajlow
2015-11-21 9:21 ` Mark Geisert
2015-11-21 10:53 ` Corinna Vinschen
2015-11-23 7:45 ` Mark Geisert
2015-11-23 10:27 ` John Hein
2015-11-24 1:05 ` Mark Geisert
2015-11-26 9:49 ` Corinna Vinschen
2015-11-26 10:49 ` Mark Geisert
2015-12-05 10:51 ` Mark Geisert
2015-12-05 13:07 ` Kacper Michajlow
2015-12-05 13:59 ` Kacper Michajlow
2015-12-05 22:40 ` Mark Geisert
2015-12-06 2:35 ` Kacper Michajlow
2015-12-06 8:02 ` Mark Geisert
2015-12-06 20:56 ` Kacper Michajlow [this message]
2015-12-08 10:51 ` Mark Geisert
2015-12-08 15:34 ` Corinna Vinschen
2015-12-08 17:02 ` Corinna Vinschen
2015-12-18 15:06 ` Achim Gratz
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=CABPLASQZrDMnN32GG3-qRsnHhjsoroaY7ti1wx5uASDqdU7M+g@mail.gmail.com \
--to=kasper93@gmail.com \
--cc=cygwin@cygwin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).