From owner-freebsd-questions@FreeBSD.ORG Thu Aug 10 04:45:58 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A509616A4DA for ; Thu, 10 Aug 2006 04:45:58 +0000 (UTC) (envelope-from hakmi@rogers.com) Received: from smtp107.rog.mail.re2.yahoo.com (smtp107.rog.mail.re2.yahoo.com [68.142.225.205]) by mx1.FreeBSD.org (Postfix) with SMTP id 2E0E843D46 for ; Thu, 10 Aug 2006 04:45:57 +0000 (GMT) (envelope-from hakmi@rogers.com) Received: (qmail 95105 invoked from network); 10 Aug 2006 04:45:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:From:To:Subject:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:X-MimeOLE:In-Reply-To; b=M+KWop/14C/3/eBbTG1nZoUHLlFoqO3VGhXvviJMLkqRFndJofclrQ1/oDRNbnhMQ+vodeO7IQNfPZTvNZG+AkVUBcgM/9cIoWOf+hi1W2OwsqoU9jnM3h1nGzzro6dGmy1yR4n2i0s5zsgnjzwxFsvvvSj1CU5y2bbK4M4+THs= ; Received: from unknown (HELO tamouh) (hakmi@rogers.com@70.27.160.99 with login) by smtp107.rog.mail.re2.yahoo.com with SMTP; 10 Aug 2006 04:45:57 -0000 From: "Tamouh H." To: "'Ian Smith'" , Date: Thu, 10 Aug 2006 00:45:57 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Thread-Index: Aca8NhVnewWoa8kySMy+FHxfA8SNrAAAXAjA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 In-Reply-To: Message-Id: <20060810044557.2E0E843D46@mx1.FreeBSD.org> Cc: Subject: RE: Top not showing cpu usage even remotely accurately X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Aug 2006 04:45:58 -0000 > But since running 5.x (5.5-STABLE since 1st Aug) top can show=20 > 0.0% idle but the cpu usages shown don't add up to much of a=20 > fraction of 100%. >=20 > For a typical illustration: 'make index' has been running for=20 > hours, and here's a shot of 'nice top', o)rdered by cpu,=20 > showing S)ystem procs:=20 >=20 > last pid: 62397; load averages: 2.06, 2.09, 2.13 up=20 > 3+03:57:39 13:11:27 > 154 processes: 6 running, 125 sleeping, 23 waiting CPU=20 > states: 77.3% user, 0.0% nice, 22.7% system, 0.0%=20 > interrupt, 0.0% idle > Mem: 79M Active, 24M Inact, 37M Wired, 5640K Cache, 25M Buf,=20 > 3388K Free > Swap: 384M Total, 133M Used, 251M Free, 34% Inuse >=20 > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU =20 > CPU COMMAND > 62380 root 122 0 788K 648K RUN 0:01 19.48% 1.86% make > 736 smithi 97 0 27000K 3184K select 89:56 1.07% =20 > 1.07% kdeinit > 762 smithi 96 0 29708K 7428K select 14:01 0.93% =20 > 0.93% kdeinit > 699 smithi 96 0 52320K 10288K select 105:02 0.88% 0.88% Xorg > 62394 root 125 0 580K 440K RUN 0:00 7.00% 0.34% make > 754 smithi 96 0 30972K 6308K select 57:22 0.15% =20 > 0.15% kdeinit > 770 smithi 8 0 2524K 660K nanslp 20:51 0.05% =20 > 0.05% ascpu > 'ps auxww' cpu percentages reveal little more, except that=20 > make index is running 'make -j2 ..' hence the ~2.0 load average. >=20 > Ignore the high swap use; most of it is numerous quiescent=20 > kwrite, httpd and mozilla sessions pushed out to swap on this=20 > lil' 160MB laptop; 'systat -vm' shows it's not actually doing=20 > any paging during this time. >=20 > Any ideas why top hasn't much of a clue about what's consuming cpu?=20 >=20 > Cheers, Ian I've the same issue with FBSD 5.4 and TOP. In fact, the load averages = are so irrelevant now that I barely pay attention to them. The server = goes to 4 or 6 load averages without slowing down, and other times the = load average would be 0.8 and the server is running slow. An example of unmatching TOP: last pid: 17889; load averages: 0.60, 0.52, 0.50 = up 3+17:22:33 00:41:45 186 processes: 2 running, 183 sleeping, 1 lock CPU states: 30.0% user, 0.0% nice, 1.7% system, 0.1% interrupt, 68.3% = idle Mem: 1678M Active, 1110M Inact, 287M Wired, 87M Cache, 112M Buf, 103M = Free Swap: 8762M Total, 1584K Used, 8760M Free PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU = COMMAND 5071 nobody 101 0 43124K 35180K CPU2 2 0:07 14.89% 14.89% = httpd 14409 nobody 4 0 43940K 36076K sbwait 0 0:01 1.22% 1.22% = httpd 95515 nobody 4 0 39892K 32188K sbwait 1 0:08 0.29% 0.29% = httpd 17656 prpcon 4 0 9916K 5680K sbwait 1 0:01 0.26% 0.24% = cppop 18006 root 8 0 3032K 2324K nanslp 0 25:35 0.05% 0.05% perl 783 root 96 0 9704K 4572K select 3 17:39 0.05% 0.05% = cppop 3820 mysql 20 0 339M 251M kserel 3 43:34 0.00% 0.00% = mysqld 744 root 8 20 16776K 15120K nanslp 0 40:53 0.00% 0.00% perl 72899 root 20 0 21704K 20128K kserel 3 30:25 0.00% 0.00% = clamd 913 root 97 0 11616K 4864K select 3 5:27 0.00% 0.00% = cpsrvd 1065 mailnull 96 0 5880K 2828K select 0 3:22 0.00% 0.00% = exim-4.62-0