Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 May 1998 17:15:56 -0700
From:      David Greenman <dg@root.com>
To:        Doug White <dwhite@resnet.uoregon.edu>
Cc:        "Ronald F. Guilmette" <rfg@monkeys.com>, questions@FreeBSD.ORG
Subject:   Re: How do I find out how much memory the kernel is using now? 
Message-ID:  <199805290015.RAA18004@implode.root.com>
In-Reply-To: Your message of "Wed, 27 May 1998 14:09:15 PDT." <Pine.BSF.3.96.980527140049.2179L-100000@gdi.uoregon.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
>> I spent good money to put 32 MB of main memory in this puppy and now when
>> I say that it look like the OS is using up all but 3.8 MB of that you say
>> ``That isn't bad''.
>
>FreeBSD (and UNIces in general) don't use memory the same way MicroSlop
>systems do.  FreeBSD will allocate all of system RAM to itself, or as
>much as it can use.  RAM is first allocated to the kernel then to user
>programs.  Everything left over is allocted to a disk cache, aka buffer
>cache, that is dynamically sized according to system RAM demands.  Thus
>your `Free RAM' number will stay small.  Here's a snapshot of my
>workstation's memory usage from top:
>
>Mem: 15M Active, 1444K Inact, 15M Wired, 5016K Cache, 4536K Buf, 504K Free
>
>This machine has 40MB of RAM installed.  I see the 500K left totally Free
>is reserved for any instant memory demands, but otherwise the left over
>9MB is allocated to the disk cache and buffers.

   Actually it's even more complicated then that. The numbers that top reports
are quite useless for determining the split between process memory and disk
caching. The "cache" number is, for lack of a better term, the 'low priority'
part of the disk cache...those pages that will be reclaimed first. Higher
priority disk cache pages will be in the "active" and "inactive" class. The
"buffers" number is almost completely useless and I don't know why top reports
it. Process pages are usually in the "active" class, but can be "inactive"
or "cache" as well. So the numbers all have to do with priority and have to
do with type.

-DG

David Greenman
Co-founder/Principal Architect, The FreeBSD Project

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



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