From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29006 invoked by alias); 23 Nov 2015 07:45:19 -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 28990 invoked by uid 89); 23 Nov 2015 07:45:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 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; Mon, 23 Nov 2015 07:45:16 +0000 Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id tAN7jEQo048876 for ; Sun, 22 Nov 2015 23:45:14 -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 smtpdct1gjM; Sun Nov 22 23:45:05 2015 Subject: Re: Cygwin multithreading performance References: <564E3017.90205@maxrnd.com> <5650379B.4030405@maxrnd.com> <20151121105301.GE2755@calimero.vinschen.de> To: cygwin@cygwin.com From: Mark Geisert Message-ID: <5652C402.7040006@maxrnd.com> Date: Mon, 23 Nov 2015 07:45: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: <20151121105301.GE2755@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-11/txt/msg00322.txt.bz2 Corinna Vinschen wrote: > On Nov 21 01:21, Mark Geisert wrote: [...] so I wonder if there's >> some unintentional serialization going on somewhere, but I don't know yet >> how I could verify that theory. > > If I'm allowed to make an educated guess, the big serializer in Cygwin > are probably the calls to malloc, calloc, realloc, free. We desperately > need a new malloc implementation better suited to multi-threading. That's very helpful to know. I'd want to first make sure the heavy lock activity I'm seeing in the traces really is due to malloc() and friends but I couldn't help a speculative search online for multithread-safe malloc(). These turned up: tcmalloc - part of google-perftools, requires libunwind, evidently not yet ported to Windows AFAICT, nedmalloc - http://www.nedprod.com/programs/portable/nedmalloc/ ptmalloc - http://www.malloc.de/ The latter two are based on Doug Lea's dlmalloc which is also the basis of Cygwin's malloc() functions. As I understand it, ptmalloc in one form or another has been part of glibc on Linux for some time. So there may be a solution in sight if we need to go that direction. Of course, SHTDI as usual :). ..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