From owner-freebsd-questions@FreeBSD.ORG Thu Sep 14 04:48:22 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 8C4DF16A407 for ; Thu, 14 Sep 2006 04:48:22 +0000 (UTC) (envelope-from hakmi@rogers.com) Received: from smtp104.rog.mail.re2.yahoo.com (smtp104.rog.mail.re2.yahoo.com [206.190.36.82]) by mx1.FreeBSD.org (Postfix) with SMTP id 1039743D45 for ; Thu, 14 Sep 2006 04:48:21 +0000 (GMT) (envelope-from hakmi@rogers.com) Received: (qmail 88357 invoked from network); 14 Sep 2006 04:48:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:From:To:Cc:Subject:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:X-MimeOLE:In-Reply-To:Thread-Index; b=wM48Kx76+Xj9R2JtgT2bdiACkbuZwpwa00cGR4EJAKeX5Bcxv9z2V9TF4DOFYMPA7u4EKypEqwz+d9+J1ifAm8ux0Xj1niDnLSqpOjYZzY2xHTzFT3Nd9BTMQ4tlIMqyV7SHd+gisfcCRyMnLnsw/Cq5/2LZr7lqJsGLbOL5Kyk= ; Received: from unknown (HELO tamouh) (hakmi@rogers.com@70.27.160.99 with login) by smtp104.rog.mail.re2.yahoo.com with SMTP; 14 Sep 2006 04:48:21 -0000 From: "Tamouh H." To: "'Giorgos Keramidas'" Date: Thu, 14 Sep 2006 00:48:49 -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 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 In-Reply-To: <20060810055227.GA7051@gothmog.pc> Thread-Index: Aca8QUteLI2+R8lNT2qGnWr2Qdvh5AbdwUtw Message-Id: <20060914044821.1039743D45@mx1.FreeBSD.org> Cc: questions@freebsd.org, 'Ian Smith' 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, 14 Sep 2006 04:48:22 -0000 >=20 > In recent 6.X versions, you can use 'S' to show system threads too. > For an even more fine-grained view, you can use 'H' to show=20 > each thread separately. >=20 > Then there is also the 'CPU' mode (as opposed to the default 'WCPU' > mode of top). >=20 > > I've the same issue with FBSD 5.4 and TOP. In fact, the=20 > load averages=20 > > are so irrelevant now that I barely pay attention to them.=20 > The server=20 > > goes to 4 or 6 load averages without slowing down, and=20 > other times the=20 > > load average would be 0.8 and the server is running slow. >=20 > Probably because the work it does at the moment is not CPU-bounded? >=20 > > An example of unmatching TOP: > >=20 > > last pid: 17889; load averages: 0.60, 0.52, 0.50 =20 > up 3+17:22:33 00:41:45 > > 186 processes: 2 running, 183 sleeping, 1 lock CPU states:=20 > 30.0% user, =20 > > 0.0% nice, 1.7% system, 0.1% interrupt, 68.3% idle > > Mem: 1678M Active, 1110M Inact, 287M Wired, 87M Cache, 112M=20 > Buf, 103M=20 > > Free > > Swap: 8762M Total, 1584K Used, 8760M Free > >=20 > > PID USERNAME PRI NICE SIZE RES STATE C TIME =20 > WCPU CPU COMMAND > > 5071 nobody 101 0 43124K 35180K CPU2 2 0:07=20 > 14.89% 14.89% httpd > > 14409 nobody 4 0 43940K 36076K sbwait 0 0:01 =20 > 1.22% 1.22% httpd > > 95515 nobody 4 0 39892K 32188K sbwait 1 0:08 =20 > 0.29% 0.29% httpd >=20 > Try hitting 'S'. Perhaps the system spends too much time in=20 > system threads (i.e. the "syncer") :) >=20 I think TOP and load averages are no longer accurate on FBSD 5.x and 6.x = with SMP kernel. As far as I've seen. Load averages hit sometimes 8.0 = without a noticable degradation in performance. This is one TOP that freaked me out, notice Idle CPU is 70% while the = process is showing it is using 99% of CPU. systat draws more accurate = picture, however, load average is still useless as far as performance = monitoring : last pid: 10174; load averages: 1.63, 1.44, 1.20 = up 4+00:25:19 00:39:20 169 processes: 2 running, 166 sleeping, 1 zombie CPU states: 25.8% user, 0.0% nice, 0.7% system, 0.1% interrupt, 73.4% = idle Mem: 1316M Active, 1445M Inact, 297M Wired, 127M Cache, 112M Buf, 79M = Free Swap: 8762M Total, 2096K Used, 8760M Free PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU = COMMAND 13362 root 111 0 36444K 34196K CPU3 3 50:06 98.88% 98.88% = perl5.8.7 90391 root 96 0 27356K 26236K select 2 0:06 0.54% 0.54% = perl5.8.7 79619 nobody 4 0 209M 84640K sbwait 1 0:09 0.39% 0.39% = httpd 10161 root 97 0 6712K 4752K select 2 0:00 1.40% 0.20% = exim-4.62-0 79649 nobody 20 0 210M 84464K lockf 0 0:06 0.15% 0.15% = httpd 10158 mailnull 4 0 6760K 3992K sbwait 2 0:00 0.81% 0.15% = exim-4.62-0 79654 nobody 4 0 208M 68660K sbwait 0 0:08 0.05% 0.05% = httpd 79660 nobody 4 0 208M 58144K sbwait 0 0:06 0.05% 0.05% = httpd 10170 sshd 117 0 4768K 2052K select 0 0:00 1.00% 0.05% sshd 1123 mysql 96 0 346M 214M select 2 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 3 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 3 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 2 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 0 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 2 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 1 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 0 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 0 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 3 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 3 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 0 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 1 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 2 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 1 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 1 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 0 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 0 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 2 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 1 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 0 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 2 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 0 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 1 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 0 114:48 0.00% 0.00% = mysqld 1123 mysql 20 0 346M 214M kserel 1 114:48 0.00% 0.00% = mysqld