From owner-freebsd-questions Mon Oct 22 18:47:28 2001 Delivered-To: freebsd-questions@freebsd.org Received: from web9608.mail.yahoo.com (web9608.mail.yahoo.com [216.136.129.187]) by hub.freebsd.org (Postfix) with SMTP id 2757F37B409 for ; Mon, 22 Oct 2001 18:47:22 -0700 (PDT) Message-ID: <20011023014721.81770.qmail@web9608.mail.yahoo.com> Received: from [66.69.141.1] by web9608.mail.yahoo.com via HTTP; Mon, 22 Oct 2001 18:47:21 PDT Date: Mon, 22 Oct 2001 18:47:21 -0700 (PDT) From: The Almonds Subject: Re: Q: Inactive vs. free memory? To: Marco Radzinschi , Bob Johnson Cc: questions@freebsd.org In-Reply-To: <20011022182357.X3056-100000@mail.radzinschi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Sorry to jump in but thought this may be a good thread to ask a similar question. We are trying to determine 4 things on some systems at work. 1. How much memory is on the system via a utility in FreeBSD? 2. How much of the physical memory is being used by the system currently? 3. What part of the physical memory belongs to the kernel? 4. What part of the physical memory belongs to applications? --- Marco Radzinschi wrote: > > On Mon, 22 Oct 2001, Bob Johnson wrote: > > [snip!] > > > The relatively short answer is that "Inactive" > memory is dirty > > memory that needs to be written to swap before it > can be reallocated. > > "Cache" is memory that can be reallocated > immediately, either because > > it has already been written to swap, or for some > reason it can be > > reused without doing so (I suppose an example of > this would be > > executable code that will be re-read from the > original file if it > > is needed again). > > > > Memory gets into the "Inactive" or "Cache" queue > by not being accessed > > for a while. Something is still claiming it, but > since it hasn't been > > accessed recently, it is considered a good > candidate for re-use > > when something else needs some physical memory. > If the process that > > owns the memory accesses it, it will be moved back > to "Active" without > > any swapping being necessary. > > > I thought that it was unlikely that my system had > 174 MB of memory > that would need to be swapped out before being > reclaimed, since I am sure > it did not actually NEED that much memory. That is, > there is no way it > was working with that large a data set. > > I wanted to see what would happen if it was needed, > so I started enough > processes to eat up 200+ MB of RAM, and what I > observed was that the > system first used the cache memory, as you said it > would. Then the inactive > memory started dropping fast, and the active memory > count started going > up. It DID NOT, however, start paging until the > inactive memory was down > to a few megabytes. From this I conclude that > inactive memory need not > necessarily be paged out in order to be reclaimed. > > In my particular case, I believe Samba eats up RAM > when I transfer several > gigabytes over the network, which ends up as > inactive. It still seems odd > to me that it does not end up as cache memory, but > it seems to work just > as well. > > Thanks for the input, > > Marco Radzinschi > > E-Mail: marco@radzinschi.com > AOL IM: CrackedBoy > > Running FreeBSD 4.4-RELEASE i386 > 6:23PM up 1 day, 4:32, 1 user, load averages: > 1.00, 1.00, 1.00 > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of > the message __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message