[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: top vs htop %MEM



On Tue, 08 May 2007 16:34:40 +0200
Joe Hart <j.hart@orange.nl> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Tyler Smith wrote:
> > Hi,
> > 
> > I'm running a process that is very memory intensive (analyzing
> > ca. 500,000 phylogenetic trees). It's using 1.6Gb of virtual memory,
> > 1.2Gb of physical memory (I have 1.5Gb of RAM). However, htop reports
> > only 21.5 for MEM%, while top reports 83.8 for %MEM. I thought that
> > htop was just a prettier top, but I can't find an explanation in the
> > man pages for the difference in the reported MEM%. VIRT and RES are
> > the same for both. Where does the difference come from?
> > 
> > Not a burning issue, just curious...
> > 
> > Tyler
> > 
> > 
> The way it appears (to me) is that top is telling you the free memory
> including the cache buffer and htop is telling you the free memory
> without it.  When I run them, I get the same number if I subtract the
> buffer usage from the available memory.

I'm now running top, htop, and 'watch free'. The Mem and Swap lines in
the top summary area are the same as the Mem and Swap lines in the
'free' output. htop's memory summary is close to the '-/+
buffers/cache' line of 'free', which I think is Joe's point. They also
report tasks differently; htop is reporting 73 total, while top says
90, as does ps ax | wc. I'm not yet sure what htop means. htop lists 7
liferea-bin processes, and reports MEM% as 3.2 (for each one), while
top lists only one and reports 6.0 for it. This is the discrepancy that
I think the OP was wondering about; I don't know what it means either.
Whatever the explanation is, since htop claims to be similar to top, if
there's such a basic difference, it should be documented; if it isn't,
I'd suggest a bug report.

> Joe

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator



Reply to: