Date: Wed, 14 May 1997 04:24:49 -0700 From: David Greenman <dg@root.com> To: ee96199@tom.fe.up.pt Cc: Random Junk <jsd@gamespot.com>, freebsd-questions@FreeBSD.ORG Subject: Re: memory usage Message-ID: <199705141124.EAA21755@implode.root.com> In-Reply-To: Your message of "Wed, 14 May 1997 11:38:11 -0000." <Pine.OSF.3.96.970514113341.14208A-100000@tom.fe.up.pt>
next in thread | previous in thread | raw e-mail | index | archive | help
>And with 2.2.x? Since you, David, are the Principal Architect could you >explain with some detail what these values mean? Hmmm. Well, for 2.2.x, the various VM parameters aren't really very useful for determining memory consumption/shortages in the system since the algorithms as written will tend to keep a fairly precise balance between them at all times - regardless of actual memory usage. The fact that there is no good way other than looking at swap usage to determine current memory demands in FreeBSD 2.2.x is an architectural problem that we've been looking at fixing for several months. Unfortunately, this is a very difficult problem to solve. To best understand what those numbers mean, it's first important to realize that they really weren't meant to be used as any sort of metric for memory consumption, despite the usage/reporting of them in 'top'. The numbers represent the number of VM pages on various internal page queues that the kernel manages. The "active" queue is a queue of pages that the kernel, for a variety of reasons, considers "active". The "inactive" queue is similarly named, but is also used as a way of controlling the amount of dirty pages in the system (pages are moved to the inactive queue prior to being cleaned by the pagedaemon). The cache queue is a queue that holds pages which are clean and not mapped into any process. These pages can be reclaimed immediately at any time except while processing an interrupt. Pages in the cache queue normally contain cached file data. The free queue contains pages that have no useful data and can be used at any time. The "wired" queue is a queue that the kernel uses to store pages that it uses internally (such as for kernel mallocs and other allocations). Pages in filesystem buffers are also put on the wired queue. I suspect that the above information doesn't really help you, however, since it isn't going to help you tune the system any better. For now, the best number to look at is total swap consumption, but keep in mind that once FreeBSD pages something out, it continues to occupy swap space until the memory it is backing is freed (from a process exit, for example). Perhaps even more useful would be to look at page in/out rates...top reports this whenever page in/outs occur. If this rate appears to be fairly high, then chances are that you are low on memory. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705141124.EAA21755>
