*BSD News Article 71590


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.bhp.com.au!mel.dit.csiro.au!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!vic.news.telstra.net!act.news.telstra.net!psgrain!usenet.eel.ufl.edu!newsfeed.internetmci.com!howland.reston.ans.net!psinntp!psinntp!psinntp!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!uknet!newsfeed.ed.ac.uk!edcogsci!richard
From: richard@cogsci.ed.ac.uk (Richard Tobin)
Subject: Re: FreeBSD memory requirement
X-Nntp-Posting-Host: pitcairn
Message-ID: <DtAw58.IMp@cogsci.ed.ac.uk>
Sender: cnews@cogsci.ed.ac.uk (C News Software)
Organization: HCRC, University of Edinburgh
References: <Pine.SOL.3.93.960619222235.20516E-100000@bmec.hscbklyn.edu>
Date: Thu, 20 Jun 1996 13:29:32 GMT
Lines: 48

In article <Pine.SOL.3.93.960619222235.20516E-100000@bmec.hscbklyn.edu> David Zakai <zakaid99@hscbklyn.edu> writes:
>Although I understand that FreeBSD will run with less memory,
>I am considering adding more (total 12 Meg or 20 Meg RAM).
>A recent email message indicated that more memory may not
>improve performance greatly because of hardware cache size.

>I don't understand this concept.  I thought that the
>main RAM memory could be used for cache.

There are several types of caching at work in your PC.  There is the
processor's cache, which allows it to access instructions and data
faster than if it were in plain RAM.  Then there is the operating
system's disk cache, which is RAM used to store data from the disk.
You can also regard the whole of RAM as a cache for the virtual
memory, though if you find that idea confusing just forget it.

If you have so little main memory that your programs are continually
needing to page, performance will be poor.  If you're running X and,
say, a few xterms and emacs then you will probably need more than 8
MBytes.  16 MBytes should be fine.  More than 20 is likely to be
unnecessary unless you're running some big applications.

Unix has traditionally allocated a proportion of RAM, decided at boot
time, to the disk cache (known as the buffer cache).  It scales the
amount according to the total RAM available.  Several recent unixes,
including BSD, don't use a fixed amount for this but in effect adjust
it according to what is running.  So if you're only running a small
program that accesses lots of disk data, it will use most of your RAM
as disk cache.

As for the processor's memory cache, adding more will improve
performance, but if you're short of main memory (ie you're paging)
then the effect will be completely swamped by the paging overhead.
It's certainly not the case that more memory will be useless because
of a shortage of cache.  More cache wouldn't hurt, but how much
difference it makes will depend a lot on your applications.

In summary, yes, get more memory, and don't worry about the cache.

[Perhaps you're thinking of a recent thread about someone whose
machine went faster when he removed some memory, but that was a very
special case only applying to ancient PCs with memory on expansion
cards.  If your machine takes SIMMs on the motherboard, it's not
relevant.]

-- Richard
--
Don't worry, it's only Usenet.