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

RE: creating swap partition



>
> On Tue, Feb 24, 2004 at 09:49:34PM -0500, xucaen wrote:
> > Hi all, quick question here. how big should a swap partition be
> relative to the size of the drive?
>
> Your RAM size matters, not the HDD.
>
> First of all, you don't want to swap _at all_: buy yourself more RAM,
> it's cheap nowadays.  Swapping slows your system down, makes it more
> fragile (media errors), and compromises security a bit.
>

Actually, the two reasons for swap (not sure how well it applies to OS these
days )was
1) in case you didn't have enough memory (in which case.. yes, better to buy
more memory).  That is why my first boss always suggested 2xRAM so user jobs
could keep running . In the case of engineering jobs, they didn't always
have to run big calculations but once in awhlie one person did so it was
more cost-effective to have swap for that one job a month.

and

2) to dump core in case of a system crash.  That is why convention used to
be that swap should be at least as big as memory so memory had somewhere to
dump in case of a crash (that's also again from my first boss).

We were using HP/SGI/Solaris systems at the time and I guess that convention
just kept on (same as the idea of filesystem swap being slower than raw
swap, and though that intuitively makes sense when I did some research I
found that there have been some experiments done where the speed increase
was neglibile for files under a gig).




Reply to: