From owner-freebsd-current@FreeBSD.ORG Mon Aug 16 18:40:13 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 6E91916A4CE for ; Mon, 16 Aug 2004 18:40:13 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2163543D46 for ; Mon, 16 Aug 2004 18:40:13 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.12.11) id i7GIeC61094924; Mon, 16 Aug 2004 13:40:12 -0500 (CDT) (envelope-from dan) Date: Mon, 16 Aug 2004 13:40:12 -0500 From: Dan Nelson To: Slawek Zak Message-ID: <20040816184012.GK73391@dan.emsphone.com> References: <20040813121208.M31181@cvs.imp.ch> <86y8kfqcp8.fsf@thirst.unx.era.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86y8kfqcp8.fsf@thirst.unx.era.pl> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i 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: Mon, 16 Aug 2004 18:40:13 -0000 In the last episode (Aug 16), Slawek Zak said: > 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 > :) The CPU accounting for KSE threads is a bit inaccurate; new threads inherit the CPU usage of their parent, so if a program does a lot of computation, then spawns a bunch of threads, you would end up with 50 threads each with 90% cpu. Top then totals them all up :) I don't know if it's possible to accurately display per-thread CPU usage in a M:N threading scheme. -- Dan Nelson dnelson@allantgroup.com