virtual memory swap size

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: KevinO
Date:  
Subject: virtual memory swap size
Craig White wrote:

> I am amazed at the diversity of opinion here. It would seem that 2X is safe
> but not necessarily going to be the fastest setting. My interest is because
> I am going to set up what is likely to be my first server that will actually
> be serving a fair amount of web pages and it would seem that I have to make
> allowances for this thing to keep running - even if it goes slow by way of
> VM. It has 128M RAM but I think that it's necessary to upgrade it to 512K -
> RAM's cheap anyway. I don't mind giving away 1 gigabyte of memory over to VM
> if it's gonna help to keep this thing alive.
>


The more ram the merrier. If you are thinking of running X and a web
server at
the same time (gasp), upgrade to more ram.

Having a swap file, of any size, will not slow down your machine. Not
having one,
and running out of memory will mean a crash.

So go for the 512 MB, and add a swap file for those 'just in case' times
...

You can always start with a 150 to 250 MB swap file and then watch the
box to
make sure you don't need more. If you do run out of ram and start to
swap, things
a r e g o i n g t o s l o o o w d o w n . . . . . but at least it
won't crash.

Expect the amount of 'free ram' displayed to dwindle down towards zero
at times.
It doesn't necessarily mean that you don't have any ram available, the
kernel just
hates to see any extra go to waste. It will be used for buffers/disk
cache and be
returned to use as soon as the box has something better to do with it...

Yes, this means more ram than you 'need' can speed things up since you
don't need
to load something from disk if it is already in ram.

512MB is a pretty large chunk of ram unless you are running a LARGE
load.

YMMV

--
Kevin O'Connor

She can kill all your files;
She can freeze with a frown.
And a wave of her hand brings the whole system down.
And she works on her code until ten after three.
She lives like a bat but she's always a hacker to me.
                -- Apologies to Billy Joel