Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Sep 2002 08:50:18 -0500
From:      "Mark Johnston" <mjohnston@skyweb.ca>
To:        <pzw@aabc.dk>
Cc:        <isp@freebsd.org>
Subject:   Re: Inactive memory in FreeBSD
Message-ID:  <001b01c25f1a$54c46260$3e0fa8c0@skycable.int>
In-Reply-To: <E01A200E2339D311AF7E00508B319A2B04C84713@expers.aabc.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
The VM discussion at
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/vm-design/x78.html
is
enlightening.  From what I gather, an inactive page is not a program
"hogging
up" memory, and there's no need to worry about freeing it.  To
summarize,
pages marked Inact and Cache are similar in that they are candidates to
be
reused; the difference is that Inact pages are "dirty", i.e. they still
have
data to be flushed to disk.  When there are too many dirty pages, the
system
will flush them to disk and move them to the Cache queue.

Pages in Cache are like free memory, but better. :)  Their data is
already on
disk, so the pages can be instantly reused as free memory if needed, but
if
the original program tries to access the data again, the page can be
revived
without having to swap the data back in from disk.  An Inact page can be
reused, too, but its data has to be flushed first.

The VM algorithm controlling when Inact pages are flushed, etc., is
magic too
deep for me, but judging by the page, the heavier the load, the more
aggressively the memory system works.

I'm not one to argue re whether FreeBSD is suitable for workstations vs
servers, but this particular criterion isn't the one that should make
the
decision for you.

Sorry if the formatting on this comes through broken - I've tried to
keep it
sane, but I'm stuck with Outlook and it's very sneaky about breaking
things.

Mark

pzw@aabc.dk wrote:
> Well, yes, it might be a good thing when you have a lot of reoccurring
> tasks, and plenty of memory.
> 
> However, when you compile a program or FTP a file to the server, the
chances
> of you doing that over and over again is almost null, therefore
caching
> these processes are a total waste.
> 
> So, FreeBSD is best used for a server system, where you have more RAM
than
> you use for all normal activity, and to prevent some seldom used tasks
to
> hog up memory, you should reboot often.
> 
> As a workstation system, you're better of using Windows or Linux,
unless
> ofc. You're a secretary using the same word processor program day in
and day
> out.
> 
> IMHO it would be a far better solution, for you to be able to specify
the
> maximum amount of memory that a program could hog up, so you don't
have to
> reboot all the time to free memory.
> 
> Best Regards,
> Peter
> 
> 
> 
> >This is how the vm subsystem is supposed to work. This is normal,
this
> >is good. Inactive memory is memory that currently has data (programs)
> >stored in it, but that data is not currently being used (the programs

> >are not currently running). If the data that is currently stored in
the 
> >inactive memory is needed again (you run a program again), you don't
have 
> >to load it off the hard drive. 
> 
> >This is a good thing.  You don't want to change this.
> 
> >The comparison to solaris is irrelevant, as they (solaris and
FreeBSD) have
> >different vm subsystems.
> 
> >-- 
> >Jeremy Faulkner			http://www.gldis.ca
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001b01c25f1a$54c46260$3e0fa8c0>