From owner-cvs-all@FreeBSD.ORG Sun Apr 17 13:01:28 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F38116A4CE; Sun, 17 Apr 2005 13:01:28 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD25143D46; Sun, 17 Apr 2005 13:01:27 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])j3HD19ml007749; Sun, 17 Apr 2005 23:01:09 +1000 Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) j3HD15Io019319; Sun, 17 Apr 2005 23:01:06 +1000 Date: Sun, 17 Apr 2005 23:01:05 +1000 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: Giorgos Keramidas In-Reply-To: <20050417110321.GA78636@gothmog.gr> Message-ID: <20050417222313.K946@epsplex.bde.org> References: <200504161543.j3GFhclO075103@repoman.freebsd.org> <86acnyd2k7.fsf@xps.des.no> <20050416191436.G68941@fledge.watson.org> <863btq4k9m.fsf@xps.des.no> <20050417110321.GA78636@gothmog.gr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Dag-Erling Sm?rgrav cc: src-committers@FreeBSD.org cc: Robert Watson cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/top machine.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2005 13:01:28 -0000 On Sun, 17 Apr 2005, Giorgos Keramidas wrote: > On 2005-04-16 21:03, Dag-Erling Sm?rgrav wrote: >> Robert Watson writes: >>> The 'C' column is quite useful when tuning SMP systems, and something >>> I frequently look at when debugging performance issues in 5.x and >>> 6.x. >> >> The C column is pointless when you're not showing individual threads, >> since different threads in the same process might be running >> simultaneously on different CPUs. > > That's probably I could manage to do later today or tomorrow. For the > moment, how does the following change look (change of NICE to NIC and > removal of CPU column)? The NICE column cannot be shrunk, because all 4 columns in it are used. The scheduling class/base priority is encoded in the nice value, and this gives values like -180 for ithreads... Even more columns would be needed to show the scheduling class completely or in a non-cryptic way. top -S output on sledge: %%% last pid: 4781; load averages: 0.00, 0.00, 0.00 up 0+22:14:00 12:19:32 89 processes: 3 running, 47 sleeping, 39 waiting Mem: 10M Active, 537M Inact, 107M Wired, 20K Cache, 214M Buf, 7101M Free Swap: 9216M Total, 9216M Free PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND 11 root 1 171 52 0K 16K CPU1 1 22.2H 98.97% 98.97% idle 12 root 1 171 52 0K 16K RUN 0 22.2H 98.93% 98.93% idle 59 root 1 20 0 0K 16K syncer 1 1:07 0.00% 0.00% sync 45 root 1 -32 -151 0K 16K WAIT 0 0:36 0.00% 0.00% swi4 4 root 1 -8 0 0K 16K - 1 0:16 0.00% 0.00% g_do 3 root 1 -8 0 0K 16K - 1 0:11 0.00% 0.00% g_up 39 root 1 -68 -187 0K 16K WAIT 1 0:05 0.00% 0.00% irq2 47 root 1 -16 0 0K 16K - 0 0:05 0.00% 0.00% yarr 44 root 1 -44 -163 0K 16K WAIT 1 0:05 0.00% 0.00% swi1 2 root 1 -8 0 0K 16K - 1 0:04 0.00% 0.00% g_ev 26 root 1 -64 -183 0K 16K WAIT 1 0:04 0.00% 0.00% irq1 57 root 1 171 52 0K 16K pgzero 0 0:04 0.00% 0.00% page 65 root 1 -32 0 0K 16K - 1 0:03 0.00% 0.00% sche 60 root 1 -4 0 0K 16K vlruwt 0 0:02 0.00% 0.00% vnlr 404 root 1 96 0 7628K 2012K select 1 0:01 0.00% 0.00% ntpd 415 daemon 1 4 0 2472K 1072K sbwait 1 0:01 0.00% 0.00% rwho 429 root 1 96 0 9336K 3368K select 0 0:01 0.00% 0.00% send 58 root 1 -16 0 0K 16K psleep 1 0:01 0.00% 0.00% bufd %%% This also shows recent severe lossage in the COMMAND column, and bogus extra newlines after the "processes" and "Swap" rows (these only show up in output to a file). There used to be only 3 columns for NICE, but that broke when the priority range was expanded from [0..127] to [0..255] in rev.1.35 of machine.c and associated kernel changes. Rev.1.36 of machine.c fixed this by adding a 4th column for NICE. Before rev.1.36, "NICE" wasn't truncated to "NIC" in the header. The value was just in the columns under "NIC" with the column under "E" left blank to serve as a separator. Just removing the CPU column doesn't seem right. ps has a -C flag to switch between WCPU and CPU. Bruce