Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Feb 2007 16:04:40 +0100 (CET)
From:      Martin Blapp <mb@imp.ch>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        clamav-devel@lists.clamav.net, freebsd-threads@freebsd.org
Subject:   Re: 6.2-Release and Clamd 0.90 with libpthread.so
Message-ID:  <20070225151646.J18301@godot.imp.ch>
In-Reply-To: <20070224231443.S18301@godot.imp.ch>
References:  <20070220153632.E4139@godot.imp.ch> <Pine.GSO.4.64.0702201138080.12034@sea.ntplx.net> <20070220174221.B4139@godot.imp.ch> <Pine.GSO.4.64.0702201145420.12034@sea.ntplx.net> <20070220190347.C4139@godot.imp.ch> <Pine.GSO.4.64.0702201319230.12034@sea.ntplx.net> <20070220225303.V4139@godot.imp.ch> <Pine.GSO.4.64.0702201724590.12034@sea.ntplx.net> <20070220234734.H4139@godot.imp.ch> <20070221000830.V4139@godot.imp.ch> <20070221020335.Y4139@godot.imp.ch> <20070224103422.V18301@godot.imp.ch> <Pine.GSO.4.64.0702241012230.5266@sea.ntplx.net> <20070224185741.F18301@godot.imp.ch> <Pine.GSO.4.64.0702241344240.6160@sea.ntplx.net> <20070224231443.S18301@godot.imp.ch>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi all,

I'm including now clamav-devel@lists.clamav.net too, since it's
not clear if this problem is clamd or system library related.

The problem is that clamd works only well with FreeBSDs libthr 1:1
kernel threading library. Using libc_r (userland threading only)
seems to consume already a bit more resources. But clamd together with
the N:M kernel threads library (libpthreads) is really slow.

For some strange reason setting the sysctl kern.threads.virtual_cpu=1 to allow 
only one CPU for clamd works well and takes the CPU load significantly down.

After reading

http://www.gossamer-threads.com/lists/clamav/users/28795
especially this part:

[...]

>
>We've been running 6.x our scanner boxes for a while now, but it's only
>been with the more recent security/clamav-devel port installs that we
>noticed a problem much like this. Most connections to the daemon (made
>through clamav-milter in our case) timed out, and the only way to bring
>down the daemon was with a kill -9.
>
>For us, the 20061029 devel snapshot was fine, but the current one
>(20061217) has problems.
>

[...]

I've now tried to go back to the development snapshot 20061129
and so I've reversed the clamd threading patches up to this date.
But no luck. First it works well, then it becomes suddenly slower
and more and more connections time out. Also, only 'kill -9' kills
clamd. This isn't the case with lc_r and libthr btw ...

Could it be that libpthread from it's kind of nature is a lot
slower than libthr in that special case ? Maybe clamd expects system scope 
thread semantics and so libpthreads is slower ... Of course our current 
workload could then be too much for the poor clamd and a even more growing 
workload may slow it down due to resource bottlenecks.

--
Martin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070225151646.J18301>