From owner-freebsd-questions Thu May 28 17:18:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA01779 for freebsd-questions-outgoing; Thu, 28 May 1998 17:18:07 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA01704 for ; Thu, 28 May 1998 17:17:27 -0700 (PDT) (envelope-from root@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with ESMTP id RAA18004; Thu, 28 May 1998 17:15:56 -0700 (PDT) Message-Id: <199805290015.RAA18004@implode.root.com> To: Doug White cc: "Ronald F. Guilmette" , questions@FreeBSD.ORG Subject: Re: How do I find out how much memory the kernel is using now? In-reply-to: Your message of "Wed, 27 May 1998 14:09:15 PDT." From: David Greenman Reply-To: dg@root.com Date: Thu, 28 May 1998 17:15:56 -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> 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