From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85498 invoked by alias); 6 Dec 2015 08:02:29 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 85486 invoked by uid 89); 6 Dec 2015 08:02:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: m0.truegem.net Received: from m0.truegem.net (HELO m0.truegem.net) (69.55.228.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 06 Dec 2015 08:02:24 +0000 Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id tB682Mjx029376 for ; Sun, 6 Dec 2015 00:02:22 -0800 (PST) (envelope-from mark@maxrnd.com) Received: from 76-217-5-154.lightspeed.irvnca.sbcglobal.net(76.217.5.154), claiming to be "[192.168.1.100]" via SMTP by m0.truegem.net, id smtpd9vm4UH; Sun Dec 6 00:02:18 2015 Subject: Re: Cygwin multithreading performance To: cygwin@cygwin.com References: <564E3017.90205@maxrnd.com> <5650379B.4030405@maxrnd.com> <20151121105301.GE2755@calimero.vinschen.de> <5652C402.7040006@maxrnd.com> <24780-1448274431-7444@sneakemail.com> <5653B52B.5000804@maxrnd.com> <20151126093427.GJ2755@calimero.vinschen.de> <5656DDEF.9070603@maxrnd.com> <5662C199.7040906@maxrnd.com> <566367C8.5020703@maxrnd.com> From: Mark Geisert Message-ID: <5663EB9A.40002@maxrnd.com> Date: Sun, 06 Dec 2015 08:02:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-12/txt/msg00059.txt.bz2 Kacper Michajlow wrote: > 2015-12-05 23:40 GMT+01:00 Mark Geisert : >> 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 :). > 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. Thanks, ..mark -- 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