From owner-freebsd-current@FreeBSD.ORG Wed Sep 22 22:49:59 2004 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 C808816A4CE for ; Wed, 22 Sep 2004 22:49:59 +0000 (GMT) Received: from green.homeunix.org (pcp04368961pcs.nrockv01.md.comcast.net [69.140.212.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3ECAF43D2F for ; Wed, 22 Sep 2004 22:49:57 +0000 (GMT) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.1/8.13.1) with ESMTP id i8MMntp1009665; Wed, 22 Sep 2004 18:49:55 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.1/8.13.1/Submit) id i8MMntfa009664; Wed, 22 Sep 2004 18:49:55 -0400 (EDT) (envelope-from green) Date: Wed, 22 Sep 2004 18:49:54 -0400 From: Brian Fundakowski Feldman To: Gregory Nou Message-ID: <20040922224954.GC959@green.homeunix.org> References: <1095889815.1072.111.camel@alfred> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1095889815.1072.111.camel@alfred> User-Agent: Mutt/1.5.6i cc: freebsd-current@freebsd.org Subject: Re: memory always used at 99% 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, 22 Sep 2004 22:49:59 -0000 On Wed, Sep 22, 2004 at 11:50:16PM +0200, Gregory Nou wrote: > Hi > I'm experiencing something I see as a problem. > I run two computers with freebsd : a server with 5.2.1 and my computer > with 5.3-beta-4 > On the two version (and as far as I remember, with 5.1 too), the memory > is used at 99% after a few hours. > For example, here is the mem. use after only 3 hours : > Mem: 318M Active, 472M Inact, 120M Wired, 20M Cache, 111M Buf, 63M Free > I suppose it's a problem for two reasons : music is experiencing some > weird effects or distorsions (the same thing when I have a load of 2 or > 3) and my computer used to crash when I was trying to launch UT2004 in > this situation. There was not that kind of problems when I was launching > it just after the boot. Another weird fact is that when I kill quite > everything to have the same configuration as at the boot, the mem use > change only a few and the mem free is at about 5% only ... > So my question is : is it normal ? If not, did I something wrong ? If I > did, what and how to correct it ? (or even a URL with a > solution/explanation) > I just hope It's not the wrong list :) > Thanks a lot ! FreeBSD (like most Unixes) will always try to use as much memory as you have available minus a tiny amount for critical shortages where it will be needed without possibility of failure. Active memory is swappable- type memory that is used often. Inactive memory is used less often. Cached memory is not in use at the moment and not part of the free reserve I mentioned first. Buf memory is physical device buffer cache -- for example, files on your filesystems that are recently-accessed. Wired memory is locked by root (mlock/mlockall system calls) or from any number of kernel subsystems -- most do not use any pageable memory. Unless "Wired" is growing without stopping in top(1), or you can watch the swap being filled, you shouldn't have instability due to memory. The sound could be due to needing faster interrupt service/better tuning on your part of the target interrupt rate/CPU starvation of the user program/disk starvation/anything. The crash is for some reason I could not hope to guess; you have to try to get a crashdump or backtrace to go from. My systems look like this: Mem: 197M Active, 166M Inact, 101M Wired, 27M Cache, 60M Buf, 1128K Free Swap: 512M Total, 56K Used, 512M Free Mem: 235M Active, 122M Inact, 99M Wired, 23M Cache, 60M Buf, 11M Free Swap: 1024M Total, 32M Used, 992M Free, 3% Inuse -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\