Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2001 00:04:43 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        sean-freebsd-hackers@chittenden.org
Cc:        David Scheidt <dscheidt@tumbolia.com>, freebsd-hackers@freebsd.org
Subject:   Re: Easy way to compute memory stats? (procfs?) 
Message-ID:  <200103200804.f2K84hg15939@mass.dis.org>
In-Reply-To: Your message of "Mon, 19 Mar 2001 22:33:03 PST." <20010319223303.K84536@rand.tgd.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > :total avail mem
> > 
> > Do you mean physical memory, in which case the value of hw.physmem will
> > tellyou.  
> 
> 	Phys mem + swap, which I think I can calc pretty easily now
> that I have swap. -sc

That's not actually a useful number either. 8)

Bear in mind, for example, that program text segments are effectively 
backed by their on-disk file, so whilst they're paged into memory while 
being executed, they don't occupy swap so they wouldn't "use memory" in 
the case you're looking at.

A lot of programs also mmap various things which results in these things 
being paged into memory while being touched, but not being backed by swap.

The real bottom line here is simply that you can't look at a FreeBSD 
system and think of the way it uses memory as though it were a DOS 
system; it just doesn't work like that, and you need to adjust the way 
think accordingly.  Not to say that you can't measure the things you want 
to measure, just that you have to use different numbers to do so.

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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