Henrik Nordström wrote:
> fre 2010-05-28 klockan 17:08 +1200 skrev Amos Jeffries:
>
<snip>
>
>> On other slightly related memory issues... some users who need good
>> malloc have been trying to build squid with talloc or the google malloc
>> implementation. I'd like to see such alternative allocators easy to
>> plug in. If it already is that way then we lack documentation about how
>> to do it.
>
> Properly using talloc could bring some interesting effects, but that's
> another project in itself. tallock !== a malloc replacement, instead
> talloc uses a slightly different approach to memory management.
Doing my homework after the fact, I find that what I was talking about
was tcmalloc and jemalloc.
But yes.
>
> Google malloc should plug right in as a malloc replacement by just
> adding -ltcmalloc or by using LD_PRELOAD when starting the binary. And
> it's design practically eliminates heap fragmentation. With tcmalloc
> (google-perftools) already packaged for a number of distributions this
> should be an easy switch.
>
Hmm, being drop-in. Then this would be all that is needed adding to
configure.in yes?
AC_SEARCH_LIBS([malloc],[tcmalloc gnumalloc malloc])
A few minutes searching for benchmarks got me this list of libraries
maybe useful in that search list (ordered according to their speed
benchmarks):
tcmalloc
jemalloc
ptmalloc3
nedmalloc
ptmalloc2
malloc
* tcmalloc seems to be faster for smaller sized allocations but
otherwise on par with jemalloc.
Some others I could not find easy benchmarks on:
gnumalloc
dlmalloc
phkmalloc
c
Amos
-- Please be using Current Stable Squid 2.7.STABLE9 or 3.1.3Received on Fri May 28 2010 - 13:59:34 MDT
This archive was generated by hypermail 2.2.0 : Fri May 28 2010 - 12:00:11 MDT