Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 2004 18:49:54 -0400
From:      Brian Fundakowski Feldman <green@freebsd.org>
To:        Gregory Nou <gregorynou@altern.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: memory always used at 99%
Message-ID:  <20040922224954.GC959@green.homeunix.org>
In-Reply-To: <1095889815.1072.111.camel@alfred>
References:  <1095889815.1072.111.camel@alfred>

next in thread | previous in thread | raw e-mail | index | archive | help
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.                       \,,,,,,,,,,,,,,,,,,,,,,\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040922224954.GC959>