X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:content-type
	:content-transfer-encoding:message-id:date:from:to:subject
	:in-reply-to:references; q=dns; s=default; b=CMHpfOjqUHqPEHX4ZNm
	ACBVguMBbE0P/oBJDGDxIw5GsGPdZWgu5SdlFMJGIiiZ/qGjtpBbjSlMczlUClGz
	Jma9FfQojI6SS8q/OX8PvBTMpHvJqzibLMJYQqaPv/VJNzk/C1cKukkckBTgABJA
	+2MU+PzlqRI0VMkIaFp6jjI8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:content-type
	:content-transfer-encoding:message-id:date:from:to:subject
	:in-reply-to:references; s=default; bh=2v8dVO90dpY/9tYqAz1W+tL0Y
	Hc=; b=EhYF+vkqDmYfGfmXjb9X+zxqv9XMWqUHSS/BguIJUWRteCUJx7Q8L9FVO
	wPaYn7yY86ReiyyVHlSmYhLe0Y/x2LH9v44I1RA4A+jKf9gIlXe4RrYbpUbtACzG
	00jzSS6s6grAgI+N8tsG1t6ooqoYmtZ20JWYdPOgqWCW48jmyc=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.5 required=5.0 tests=AWL,BAYES_80,HK_RANDOM_ENVFROM,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2
X-HELO: sneak2.sneakemail.com
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <24780-1448274431-7444@sneakemail.com>
Date: Mon, 23 Nov 2015 03:27:05 -0700
From: "John Hein" <3fbmqnhaz4@snkmail.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin multithreading performance
In-Reply-To: <5652C402.7040006@maxrnd.com>
References: <CABPLASTtRK4mNxh0M_AnZgjJQ15kWPx+L=U=VCU3Wwi7jV_57A@mail.gmail.com> <564E3017.90205@maxrnd.com> <CABPLASTLrH_udLuu2F-m5P6dkENW1Z4YHEudp4NG0-FGLJgPMg@mail.gmail.com> <5650379B.4030405@maxrnd.com>	<20151121105301.GE2755@calimero.vinschen.de> <5652C402.7040006@maxrnd.com>

Mark Geisert wrote at 23:45 -0800 on Nov 22, 2015:
 > 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

Someone recently mentioned on this list they were working on porting
jemalloc.  That would be a good choice.

--
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

