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

Re: disc partition plan for new install



"John L . Fjellstad" <john-list@fjellstad.org> writes:

> [1  <text/plain; us-ascii (quoted-printable)>]
> On Mon, Sep 18, 2000 at 10:46:11AM +0400, Rino Mardo wrote:
>  
> > /swap - 2xRAM
> 
> I don't think the 'rule' of swap being 2xRAM is necessary anymore.
> I have 256 MB RAM, and 133 MB swap, and hardly use the swap at all 
> (currently using about 712 KB of swap). My system can have up to
> 1 GB of RAM.  I hardly think with that much physical memory, that
> 2 GB swap disk will be necessary.
> 
> Even with 64MB RAM, and if you're not doing heavy development, 128 MB
> swap is probably overkill.

I think a short history of where that guideline comes from is in
order.  That guideline is absolutely essential in HPUX and probably
Solaris and AIX.  In HPUX the system starts by reserving swap space
equal to physical RAM when it boots up.  Then, for any process that
allocates RAM, it first reserves swap space for that amount of RAM.
So, you really must have swap space = 2 * RAM just to use all of your
physical RAM.  In Linux it is possible to cause problems by using up
all swap space, but by pre-allocating swap you eliminate almost all of
those kind of problems.  Since Linux doesn't pre-allocate swap, the
guideline is really irrelevant;  all that really counts is whether you 
have enough RAM + swap space to hold your applications.

-- 
Carl Johnson		carlj@peak.org



Reply to: