From owner-freebsd-current@FreeBSD.ORG Tue Aug 17 17:10:52 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A2FD16A4CF for ; Tue, 17 Aug 2004 17:10:52 +0000 (GMT) Received: from pimout1-ext.prodigy.net (pimout1-ext.prodigy.net [207.115.63.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id B71ED43D49 for ; Tue, 17 Aug 2004 17:10:51 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (adsl-68-124-233-133.dsl.snfc21.pacbell.net [68.124.233.133])i7HHAk5C013614; Tue, 17 Aug 2004 13:10:47 -0400 Message-ID: <41223C15.7050305@elischer.org> Date: Tue, 17 Aug 2004 10:10:45 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en, hu MIME-Version: 1.0 To: =?ISO-8859-2?Q?S=B3awek_=AFak?= References: <20040813121208.M31181@cvs.imp.ch> <86y8kfqcp8.fsf@thirst.unx.era.pl> In-Reply-To: <86y8kfqcp8.fsf@thirst.unx.era.pl> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit cc: freebsd-current@freebsd.org Subject: Re: Deadlocks with recent SMP current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2004 17:10:52 -0000 Sławek Żak wrote: > Martin Blapp writes: > > >>Hi, >> >>Since yesterday I'm getting complete deadlocks. This time unrelated >>the servers are nor loaded at all, the just freeze after a while. >>No break into DDB possible at all. > > > Despite the numerous reports of current problems I'm running 5.2-CURRENT for > 12 days now without a glitch. Tested overnight with 2 buildworlds running > with -j8. It's a 2 processor Xeon server with 4BSD scheduler. Just my .02 > euro. > > Another thing is bothering me. In top I see: > > CPU states: 16.2% user, 0.0% nice, 2.5% system, 1.0% interrupt, 80.3% idle > Mem: 254M Active, 605M Inact, 254M Wired, 16K Cache, 112M Buf, 2622M Free > Swap: 4096M Total, 4096M Free > > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND > 37033 mysql 20 0 265M 178M kserel 0 610:59 124.37% 124.37% mysqld > > > MySQLd is running with libpthread and can go up to 400% without > significantly afecting the idle percentage shown by top. I don't see how I > could fit 400% into 20% on those two suckers, therefore I ask :) > > /S Cpu percentage use is broken for pthread applications.. it's almost impossible to work out the right way of doing it due to the nature of M:N threading where there is no fixed rule as to which user thread is run by which kernel thread. I have ideas but it will probably have to be an aggreagate cpu% for the thread group, divided by the number of kernel threads in the group.