standalone jemalloc is slower than glibc's malloc (ptmalloc)

amol pise amolpise15 at gmail.com
Thu Apr 12 05:32:39 PDT 2012


Dear Jasone,

With respect to my previous mail, I have performed few benchmark
testing mentioned in the
http://people.freebsd.org/~jasone/jemalloc/bsdcan2006/jemalloc.pdf on
MIPS target

The results are as below:

Benchmark Test:   CCA
-----------------------------------
 With glibc malloc (ptmalloc):
{{{
 # time ./bin/cca -f sample.c
 real    0m12.668s
user    0m12.172s
sys     0m0.276s
 }}}
	
With jemalloc:
{{{
# time LD_PRELOAD=/devel/usr/lib/jemalloc.so ./bin/cca -f sample.c
real    0m13.451s
user    0m12.948s
sys     0m0.252s
 }}}

Here sample.c is the file of lines 17364.

Benchmark Test:  sh6bench
-----------------------------------------
 With glibc malloc (ptmalloc):
{{{
#./sh6bench
 Total elapsed time: 94.00 (94.6600 CPU)
}}}

With jemalloc:
{{{	
# LD_PRELOAD=/devel/usr/lib/libjemalloc.so ./sh6bench
 Total elapsed time: 119.00 (119.4100 CPU)
}}}

Here, I build standalone jemalloc-2.2.5 library for MIPS architecture and used.

The both the benchmark result shows "jemalloc is slower than glibc's malloc".

I wanted to use jemalloc library but these results disappointed me.

Please let me know is there are any way to improve the performace of
jemalloc in this regards.

Please help me. Waiting for the reply.

Thank You,
Amol Pise




On 4/11/12, amol pise <amolpise15 at gmail.com> wrote:
> Dear All,
>
> I have check the performance of the jemalloc vs glibc's malloc
> (ptmalloc) using complex test in libxml2 package
> i.e. "runtest". This program allocate many memory of different size
> and supported multi-thread.
>
> The results are seen as below:
>
>
> With glibc's malloc (ptmalloc):
> --------------------------------------------
>
> # LD_LIBRARY_PATH=.libs time .libs/runtest
> {{{
> ## XML regression tests
> ## XML regression tests on memory
> :
> <snip>
> Total 2820 tests, no errors
> 67.68user 54.96system 2:02.89elapsed 99%CPU (0avgtext+0avgdata
> 0maxresident)k
> }}}
>
>
> With jemalloc:
> ------------------
> # LD_LIBRARY_PATH=.libs LD_PRELOAD=/devel/usr/lib/libjemalloc.so time
> .libs/runtest
> {{{
> ## XML regression tests
>
> ## XML regression tests on memory
>
> :
> <snip>
> Total 2820 tests, no errors
> 76.89user 55.70system 2:12.72elapsed 99%CPU (0avgtext+0avgdata
> 0maxresident)k
> 0inputs+0outputs (0major+0minor)pagefaults 0swaps
> }}}
>
> Here it is observed jemalloc seems slowers than glibc malloc (ptmalloc)
>
>
> I used jemalloc-2.2.5 from http://www.canonware.com/download/jemalloc/
>
> Is it mean jemalloc() is slower than glibc's malloc ?
> Is there any way to improve the speed performance of jemalloc in this
> regard?
>
> I am waiting for the reply.
>
> Thank You,
> Amol Pise
>



More information about the jemalloc-discuss mailing list