From owner-freebsd-fs@FreeBSD.ORG Wed Jun 27 12:22:50 2012 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D421010657B2 for ; Wed, 27 Jun 2012 12:22:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A7EBE8FC16 for ; Wed, 27 Jun 2012 12:22:50 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 018B1B97F; Wed, 27 Jun 2012 08:22:50 -0400 (EDT) From: John Baldwin To: Markus Gebert Date: Wed, 27 Jun 2012 08:10:28 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201206251443.41768.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201206270810.28589.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 27 Jun 2012 08:22:50 -0400 (EDT) Cc: fs@freebsd.org Subject: Re: [PATCH] Simple ARC stats in top X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2012 12:22:50 -0000 On Wednesday, June 27, 2012 6:24:35 am Markus Gebert wrote: > Hi John > > On 25.06.2012, at 20:43, John Baldwin wrote: > > > I have some patches based on a script I got from avg@ that add some simplistic > > ARC stats to top so that one can see how much of wired memory is set aside for > > ARC, and how that memory is split up. The patch is against 8-stable: > > http://www.FreeBSD.org/~jhb/patches/top_arc.patch > > > > Sample output: > > > > Mem: 1245M Active, 1393M Inact, 21G Wired, 309M Buf, 23G Free > > ARC: 19G Total, 1381M MRU, 17G MFU, 272K Anon, 232M Header, 442M Other > > Swap: 8192M Total, 8192M Free > > > > Comments, etc.? > > Nice feature for top, thanks! > > I've tested your patch on 8.3p3. When I'm using patched top to display per- cpu statistics, the ARC line corrupts the third CPU line (CPU 2). That seems to be exactly the line top would display ARC stats on when running in normal (i.e. not -P) mode. It doesn't always happen immediately after starting top, I guess some of the ARC stats actually need to change for it to break. > > Example (top -S -P): > ---- > last pid: 18994; load averages: 0.00, 0.00, 0.00 up 4+19:45:05 12:14:33 > 55 processes: 2 running, 52 sleeping, 1 waiting > CPU 0: 0.4% user, 0.0% nice, 0.0% system, 0.0% interrupt, 99.6% idle > CPU 1: 0.0% user, 0.0% nice, 0.0% system, 40.0% interrupt, 100% idle > CPU 2: 0.0% user, 0.0% nice, 0.0% s1009K Anon, 54M Header, 118M Other > CPU 3: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle > Mem: 629M Active, 23M Inact, 2475M Wired, 1308K Cache, 748M Buf, 4786M Free > ARC: 1535M Total, 455M MRU, 906M MFU, 912K Anon, 54M Header, 118M Other > Swap: 8192M Total, 8192M Free > ---- Hmmm, my patch is relative to a top that has -P backported and I can't reproduce this, the ARC lines moves around properly if 'P' is toggled at runtime as well for me. Did you have any conflicts in your patch that you had to resolve by hand? -- John Baldwin