Hi,
But I guess I know now what's going on. Lock contention (many little calls to
malloc() and free() together with the M:N threading model of libpthread.so,
the default scheduler mode of libpthread.so (LIBPTHREAD_SYSTEM_SCOPE), so all
threads have to share the scheduled CPU slice for one process. I expected the
behaviour to be different with 'export LIBPTHREAD_PROCESS_SCOPE=YES', but the
lock contention seems to be higher than with libthr.so ...
After I've made tests with a self compiled jemalloc.so from FreeBSD CURRENT,
which seems to be specially optimized for threading and multiple CPUs, clamd
has started to be very very fast, and all the lock contention on free() and
malloc() has gone.
Thanks to everyone who helped to track this down.
--
Martin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net