[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Poor performance with 1GB of RAM



On Mon, 11 Aug 2003 15:10:45 +0100
Antony Gelberg <antony@antgel.co.uk> wrote:
> On Mon, Aug 11, 2003 at 01:47:17PM +0200, Nejko Zidarjev wrote:
> Aside from that, why do you have a 2GB swapfile anyway, as you don't
> appear to even be close to using all of your physical RAM?

    I'm sure you know all this, Antony, I'm writing this for Nejko's (and
other reader's) edification.

     On a personal machine the old rule of thumb of 2xRAM for swap kind of
breaks when one gets close to or over 512Mb RAM.  Right now I am running KDE,
decoding from some binaries groups with Pan, writing this message in Sylpheed,
have a few rxvt terminals open and browsing web pages in Opera.  This
machine also run my Samba host, Apache, Apace-SSL, Bind, ProFTPd, a
dedicated Counter-Strike server and a slew of other things I don't recall
off the top of my head.  Oh, I also carved off some memory for /tmp.  80Mb
of which 1Mb is in use right now.  On 640Mb of RAM here's what free shows:

{grey@teleute:~} free
             total       used       free     shared    buffers     cached
Mem:        645468     628668      16800          0      62748     261604
-/+ buffers/cache:     304316     341152
Swap:        32760      32752          8

    Sure I'm using about 1/2 of the RAM for applications and the like but 1/2
is essentially free.  The 32Mb of swap is most likely things that haven't been
touched in ages.  The 32Mb is a dedicated swap file (not partition) for just
that purpose.

    I'm not concerned because I also have swapd running.  It is configured to
kick in if physical RAM drops under ~100Mb and create a 32Mb Swap file.  It
can make up to 7 before it konks out.  I've seen it as high as 5.  I have such
a convoluted way of handling memory because I wanted to keep the protection of
/tmp not being a part of / but having only 10Mb to play with I can afford to
carve off tons of drive space for the dedicated task of swap.  Right now my
swap has a range of 32-256 which seems to be adequate for my needs.  If I ever
pushed the machine too hard I can always twiddle with swapd's configuration
and tune it for a little higher limit.

    So once Nejko figures out what is causing his machine to be so slow
reducing the swap partition to something smaller would definitely be in order.
With 1Gb of RAM and presuming if it is a personal system I'd advise dropping
the swap partition completely and going with a small static swap file with
swapd to create a larger swap space if needed.  I know that a swap file is
slower than a dedicated partition but let's face it, if it is a desktop
machine if one is hitting swap speed isn't going to be the main consideration;
not crashing is.  All that is needed there is swap to grow into to get the
machine under control.

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
       PGP Key: 8B6E99C5       | main connection to the switchboard of souls.
	                       |    -- Lenny Nero - Strange Days
-------------------------------+---------------------------------------------

Attachment: pgpZNJLK6QVmx.pgp
Description: PGP signature


Reply to: