NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/50791: NetBSD's malloc has performance issues



In article <20190430140501.F0C557A1BB%mollari.NetBSD.org@localhost>,
Andreas Gustafsson  <gnats-bugs%netbsd.org@localhost> wrote:
>The following reply was made to PR lib/50791; it has been noted by GNATS.
>
>From: Andreas Gustafsson <gson%gson.org@localhost>
>To: gnats-bugs%NetBSD.org@localhost
>Cc: 
>Subject: Re: lib/50791: NetBSD's malloc has performance issues
>Date: Tue, 30 Apr 2019 17:02:13 +0300
>
> To see if the recent jemalloc update had improved performance, I reran
> my test case from this PR using versions of NetBSD-current from before
> and after the update.  The result was the opposite of what I expected:
> my test case ran more than ten times slower after the update than
> before it.  Most of the difference seems to come from running
> unexpectedly fast before the update, not running unexpectely slow
> after it.
> 
> Here's the test case again, with an added -Wno-int-to-pointer-cast
> option which makes compilation run more than 50 times faster (an
> interesting performance anomaly in itself, but outside the scope of
> this PR).
> 
>   ftp http://www.gson.org/netbsd/bugs/malloc-perf/test.c.gz
>   gunzip test.c.gz
>   cc -Wno-int-to-pointer-cast test.c
>   time ./a.out
> 
> Before the jemalloc update (using 2019.01.01.10.09.26 sources):
> 
> # time ./a.out
>         0.08 real         0.06 user         0.02 sys
> 
> After the jemalloc update (using 2019.04.29.12.53.15 sources)
> 
> # time ./a.out
>         1.33 real         0.68 user         0.65 sys
> 
> This is NetBSD/amd64 on
> 
>   cpu0: Intel(R) Xeon(R) CPU           L5630  @ 2.13GHz, id 0x206c2

This is expected because of -DJEMALLOC_DEBUG

christos



Home | Main Index | Thread Index | Old Index