6.2-Release and Clamd 0.90 with libpthread.so

Daniel Eischen deischen at freebsd.org
Tue Feb 20 22:29:20 UTC 2007


On Tue, 20 Feb 2007, Martin Blapp wrote:

> Hi,
>
>> Also try setting kern.threads.virtual_cpu=1 if you have
>> more than 1 cpu (this will limit it to 1 KSE).
>
> Our boxes have 2 CPUs and HTT is activated.
>
> Interesting. With kern.threads.virtual_cpu=1 it works also
> in the libpthread case, but while there are still some fork() calls
> it works better. With kern.threads.virtual_cpu=2 it's slower. And
> With kern.threads.virtual_cpu=4 its really slow.
>
> If I run clamd in foreground mode everything works as it should.
> More interesting, the CPU load drops significantly (500-1000%) !
>
> Something is seriosly broken here.

Running in foreground with or without kern.threads.virtual_cpu
adjusted?

If running in foreground works regardless of kern.threads.virtual_cpu
(there will still be some inefficiencies here because of the
scheduler and KSE overhead/contention), then it is probably due
to the application doing a fork() from a threaded application
without doing an exec().  This is prohibited by POSIX and
libpthread makes no attempt to allow it.

-- 
DE


More information about the freebsd-threads mailing list