[PATCH v3] benchtests: Add malloc microbenchmark
Siddhesh Poyarekar
siddhesh.poyarekar@gmail.com
Wed Jun 25 09:51:00 GMT 2014
On 25 June 2014 15:09, Will Newton <will.newton@linaro.org> wrote:
> I expected to potentially see two inflection points in the curve. One
> due to the single thread optimization in glibc that will make the
> single threaded case disproportionally faster. I also expected to see
> some kind of indication that I had run out of free CPU cores (and thus
> context switch overhead increases). I ran the test on a 4 core i5
> (hyper-threaded). I believe that's what is visible here:
There should be a third inflection point for glibc malloc at 8 *
number of cores, where it stops allocating arenas per thread and you
have contention for locks in addition to contention for CPU. That's
not visible in this graph because on a 4 core machine glibc malloc can
go up to 32 threads without sharing arenas.
Siddhesh
--
http://siddhesh.in
More information about the Libc-alpha
mailing list