Cygwin multithreading performance
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Nov 26 09:49:00 GMT 2015
On Nov 23 16:54, Mark Geisert wrote:
> John Hein wrote:
> >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.
>
> Indeed; thanks for the reminder. Somehow I hadn't followed that thread.
Indeed^2. Did you look into the locking any further to see if there's
more than one culprit? I guess we've a rather long way to a "lock-less
kernel"...
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20151126/990019ed/attachment.sig>
More information about the Cygwin
mailing list