jemalloc?

Vlad Galu dudu at dudu.ro
Tue Dec 12 07:14:31 PST 2006


On 12/12/06, Vlad Galu <dudu at dudu.ro> wrote:
On 12/12/06, Thomas E. Spanjaard <tgen at netphreax.net> wrote:
> Vlad Galu wrote:
> >   I've compiled $subj as a shared library that I preload when using
> > some test programs and it's been behaving nicely. Are there any plans
> > to import it? phkmalloc is painfully slow when freeing numerous small
> > objects.
>
> It might be nice to look Google's tcmalloc thing, it's BSDl as well
> (perhaps you could benchmark both?).
>
> http://goog-perftools.sourceforge.net/doc/tcmalloc.html
> http://dammit.lt/2006/12/06/google-perftools-tcmalloc-squid/
   I tried to compile this the other day, but it looked rather alpha stage.
   Now back to jemalloc. You can find Jason Evans's presentation at
http://www.bsdcan.org/2006/papers/jemalloc.pdf. As for a (rather
blunt) benchmark, try this: http://night.rdslink.ro/tree.c. It's a
naive program filling a rbtree with 5M nodes then deleting  half of
them.
-- cut here --
phkmalloc:
root at durandal ~ # ./tree
Insertion took 3.4531 seconds
Removed 2621440 nodes in 101.6406 seconds
root at durandal ~ #
jemalloc:
root at durandal ~ # LD_PRELOAD=jemalloc/libjemalloc.so ./tree
Insertion took 3.6328 seconds
Removed 2621440 nodes in 0.7656 seconds
root at durandal ~ #
-- and here --
  I rest my case :) However, please note that I have no SMP systems
to test the behaviour on :(
> Cheers,
> --
>          Thomas E. Spanjaard
>          tgen at netphreax.net
>
>
>
--
If it's there, and you can see it, it's real.
If it's not there, and you can see it, it's virtual.
If it's there, and you can't see it, it's transparent.
If it's not there, and you can't see it, you erased it.


--
If it's there, and you can see it, it's real.
If it's not there, and you can see it, it's virtual.
If it's there, and you can't see it, it's transparent.
If it's not there, and you can't see it, you erased it.




More information about the Kernel mailing list