This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] benchtests: Add malloc microbenchmark
- From: Steven Munroe <munroesj at linux dot vnet dot ibm dot com>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 15 Apr 2014 10:36:11 -0500
- Subject: Re: [PATCH] benchtests: Add malloc microbenchmark
- Authentication-results: sourceware.org; auth=none
- References: <1397568941-4298-1-git-send-email-will dot newton at linaro dot org>
- Reply-to: munroesj at us dot ibm dot com
On Tue, 2014-04-15 at 14:35 +0100, Will Newton wrote:
> Add a microbenchmark for measuring malloc and free performance. The
> benchmark allocates and frees buffers of random sizes in a random
> order and measures the overall execution time and RSS. Variants of the
> benchmark are run with 8, 32 and 64 threads to measure the effect of
> concurrency on allocator performance.
>
> The random block sizes used follow an inverse square distribution
> which is intended to mimic the behaviour of real applications which
> tend to allocate many more small blocks than large ones.
>
This test is more likely to measure the locking overhead of random then
it is to measure malloc performance.
Any attempt at defining a new (another) micro-benchmark should profile
to verify that overhead of setup and measurement is small (< 1%)
compared to what you are trying measure.
And verify this on multiple platforms.