From owner-freebsd-current@FreeBSD.ORG Wed Feb 16 21:13:14 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD83A16A4CE for ; Wed, 16 Feb 2005 21:13:14 +0000 (GMT) Received: from mail.mcneil.com (mcneil.com [24.199.45.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id A317D43D48 for ; Wed, 16 Feb 2005 21:13:14 +0000 (GMT) (envelope-from sean@mcneil.com) Received: from localhost (localhost.mcneil.com [127.0.0.1]) by mail.mcneil.com (Postfix) with ESMTP id 55BA0F35F9; Wed, 16 Feb 2005 13:13:14 -0800 (PST) Received: from mail.mcneil.com ([127.0.0.1]) by localhost (server.mcneil.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12000-05; Wed, 16 Feb 2005 13:13:13 -0800 (PST) Received: from mcneil.com (mcneil.com [24.199.45.54]) by mail.mcneil.com (Postfix) with ESMTP id BE500F35F7; Wed, 16 Feb 2005 13:13:13 -0800 (PST) From: Sean McNeil To: Eric Anderson In-Reply-To: <4213B3C8.3090508@centtech.com> References: <1108584730.95661.12.camel@server.mcneil.com> <4213B3C8.3090508@centtech.com> Content-Type: text/plain Date: Wed, 16 Feb 2005 13:13:13 -0800 Message-Id: <1108588393.12275.9.camel@server.mcneil.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mcneil.com cc: current@freebsd.org Subject: Re: where did all my memory go? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2005 21:13:15 -0000 On Wed, 2005-02-16 at 14:57 -0600, Eric Anderson wrote: > Brooks Davis wrote: > > On Wed, Feb 16, 2005 at 12:12:10PM -0800, Sean McNeil wrote: > > > >>With a system built yesterday on my amd64, I had plenty of memory > >>showing as free when the system completely started up. Even after > >>intense usage I showed lots of free memory in top. Over night at some > >>point all my memory is no longer free but inactive. Is there anything > >>wrong here or is this expected behavior? ps doesn't show any serious > >>usage by any particular process. Also, if disk caches or something were > >>taking up the memory, I would expect it to have shown a lot earlier. > > > > > > On a system that has been up for any significant time, free memory > > should be very small since free memory is wasted. My guess is that it > > is disk cache and that one of the nightly jobs accessed enough stuff to > > fill it. > > Speaking of this - is there a way to flush the disk cache? I would have to dispute this fact. Any disk cache should not be assigned to inactive user pages. It should be, IMHO, cache or buffer memory. In my original email, the vmstat -m output would support this: UFS dirhash 2656 1105K 1330K 15744 16,32,64,128,256,512,1024,2048 BIO buffer 5435 10870K 10940K 236537 2048 I see nothing on my system that comes close to accounting for the 1G of inactive memory. Further, it really makes something like the system applet in gnome useless when all my memory is claimed to be allocated as user space. I've only recently used this applet, but again I stress that after heavy usage of the system during initial boot I had plenty of ram shown as free. As for flushing the disk cache, I thought that sync should do this. It doesn't have any effect here, though. Cheers, Sean