Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jun 2012 08:10:28 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Markus Gebert <markus.gebert@hostpoint.ch>
Cc:        fs@freebsd.org
Subject:   Re: [PATCH] Simple ARC stats in top
Message-ID:  <201206270810.28589.jhb@freebsd.org>
In-Reply-To: <CEF5D7D4-3143-4FDB-954F-744D59FF8D91@hostpoint.ch>
References:  <201206251443.41768.jhb@freebsd.org> <CEF5D7D4-3143-4FDB-954F-744D59FF8D91@hostpoint.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206270810.28589.jhb>