From owner-freebsd-threads@FreeBSD.ORG Tue Feb 20 22:48:26 2007 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6199316C5DA; Tue, 20 Feb 2007 22:48:26 +0000 (UTC) (envelope-from mb@imp.ch) Received: from pop.imp.ch (mx2.imp.ch [157.161.9.17]) by mx1.freebsd.org (Postfix) with ESMTP id DAC2313C481; Tue, 20 Feb 2007 22:48:25 +0000 (UTC) (envelope-from mb@imp.ch) Received: from dan.imp.ch (godot.imp.ch [157.161.4.8]) by pop.imp.ch (8.13.8/8.13.8/Submit_imp) with ESMTP id l1KMmNjp048732; Tue, 20 Feb 2007 23:48:24 +0100 (CET) (envelope-from mb@imp.ch) Date: Tue, 20 Feb 2007 23:48:23 +0100 (CET) From: Martin Blapp To: Daniel Eischen In-Reply-To: Message-ID: <20070220234734.H4139@godot.imp.ch> References: <20070220153632.E4139@godot.imp.ch> <20070220174221.B4139@godot.imp.ch> <20070220190347.C4139@godot.imp.ch> <20070220225303.V4139@godot.imp.ch> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: rob@debank.tv, freebsd-threads@freebsd.org Subject: Re: 6.2-Release and Clamd 0.90 with libpthread.so X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Feb 2007 22:48:26 -0000 Hi, Useing daemon(3) instead of fork seems to fix the problem. Thank you very much ! Martin Martin Blapp, ------------------------------------------------------------------ ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH Phone: +41 61 826 93 00 Fax: +41 61 826 93 01 PGP: PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E ------------------------------------------------------------------ On Tue, 20 Feb 2007, Daniel Eischen wrote: > 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 > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" >