From owner-freebsd-hackers Wed Oct 8 07:49:51 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA21769 for hackers-outgoing; Wed, 8 Oct 1997 07:49:51 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id HAA21763 for ; Wed, 8 Oct 1997 07:49:45 -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 HAA20067; Wed, 8 Oct 1997 07:50:00 -0700 (PDT) Message-Id: <199710081450.HAA20067@implode.root.com> To: Gordon Henderson cc: Mike Smith , hackers@FreeBSD.ORG Subject: Re: Wheres all my memory going? In-reply-to: Your message of "Wed, 08 Oct 1997 14:41:56 BST." From: David Greenman Reply-To: dg@root.com Date: Wed, 08 Oct 1997 07:50:00 -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >On Wed, 8 Oct 1997, Mike Smith wrote: > >> > Mem: 242M Active, 50M Inact, 26M Wired, 34M Cache, 1726K Buf, 152M Free >> > Swap: 64M Total, 53M Used, 11M Free, 83% Inuse >> ... >> > And that just does now add up!!! (Yes, named is supposed to be that large, >> > but it's no-where near the total memory of the machine) >> >> Yes it does: 242 + 50 + 26 + 34 + 1.762 + 152 ~= 512. > >But if theres 152MB of free memory then why is it ever pushing stuff out >into swap??? Because there was something that took lots of memory and triggered a pageout. The system "caches" the data written out to swap - it isn't freed up just by being paged back in again. This is why it is so important that you have at least as much swap as you have main memory. The weird thing isn't the memory totals - these make perfect sense to those of us who understand what they mean...but what's quite unusual is the size of your named process: UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 0 287 1 9 2 0 290060 840 select Ss ?? 237:40.19 named ...almost 300MB of virtual memory? Wow! I'd ask just what you were primary/secondary for, but I don't think I want to know. :-) It's also strange that the RSS is so small given the VSZ. Your pagedaemon is also consuming a lot of CPU, which probably means that the system is paging a lot...you apparantly have other things on the system competing for memory as well. "top" is a poor utility for looking at this sort of thing since this shows top CPU consumers, not top memory consumers. You really should be using 'ps -alx' to look at this stuff. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project