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

amol pise amolpise15 at gmail.com
Wed Apr 11 02:32:07 PDT 2012


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