Linux Swap???

epsas at inflicted.net epsas at inflicted.net
Thu Sep 6 22:02:09 PDT 2001


Hey,

Ideally, swap should be twice of RAM, except on systems with more than 256M of RAM.   This has been linux folk wisdom for as long as I remember.  Of course, as you know, an abundance of swap is not very important for desktop systems.  A heavily loaded server will need that space for paging; a h0rked server is a useless server.  This is likely the reason for the maxim. 

ciao,
epsas


On Thu, Sep 06, 2001 at 09:50:26PM -0700, Dusty wrote:
> I'll have to do some reading about that.  That is something new to me.  Sun used to tell us don't make swap more than 2x physical memory.  Something about a performance problem trying to address more memory that it had.  Where did you read that they recomend 2x ram for swap?
> 
> I have built several Linux and BSD systems with no swap at all (I think mandrake 8 didn't work) and they ran fine.  Reasoning, if I have 512MB ram and all I do is surf the web and write docs and such why do I need 512MB or more SWAP.  I could load the entire system into RAM and have room left.
> 
> > Linux kernel 2.4 REQUIRES swap to be twice your amount of RAM, or bad things
> > happen in medium/high load.  Linus and Alan Cox have repeated this mantra
> > over and over again.  I still don't know why they say so, but do it!  Also
> > keep in mind that the beginning of the hard drive is faster than the end, so
> > I always suggest making the swap partition at the very beginning of the
> > drive.
> > 
> > If the hard drive is less than 8GB, then you are probably fine making all
> > non-swap space into a big partition for Linux mounted as root "/".  However,
> > most older computers BIOS cannot handle LILO booting from a partition above
> > cylinder 1024, so if your hard drive is larger than 1024 cylinders (usually
> > 8GB in LBA access) then you will need a /boot partition below 1024
> > cylinders.  Win98 and 2000 has this same limitation when booting on x86
> > hardware.
> > 
> > If it is a single user system, I don't really care about performance and
> > filesystem fragmentation so I just put everything into one big /...
> > especially if the hard drive is small.
> > 
> > ----- Original Message -----
> > From: "Dusty" <dusty at sandust.com>
> > To: "Linux & Unix Advocates & Users" <luau at list.luau.hi.net>
> > Cc: <recipient list not shown:>
> > Sent: Thursday, September 06, 2001 3:24 PM
> > Subject: [luau] Partitioning *nix
> > 
> > 
> > 
> > 
> > >
> > > Typically make swap the same size as you RAM and no more than twice your
> > RAM.  You can use less swap if you will not be doing anything memory
> > intensive, but some systems won't run without a swap.
> > >
> > > If the system is going to be a server for anything then you should break
> > out /var.  Things like mail (/var/spool/mail), print server
> > (/var/spool/lpd), logs (/var/logs), http (/var/www/htdocs), etc.  The reason
> > you want to break this out is so /var doesn't fill up you / partition.  It
> > is possible that your system could get so many error messages (someone
> > trying to port scan) or so much mail from an overly active list or printing
> > a 5,000,000 page document that /var would comsune your entire harddrive.
> > When / runs out of space all kinds of wierd things can happen from not being
> > able to log in, the system crashing.  If you don't have a high traffic
> > server you won't need much space for /var (I have 32MB on my sparc5 for
> > logs, mail, and web and it stays 50%).  If my 32MB /var fills up oh well, I
> > just get more errors that the system can't write and I have to delete some
> > stuff, but my / is safe.
> > >
> > > Other partitions that could be useful to have are /usr and /opt and
> > /usr/home.  /usr is where most of you programs are stored (unless you are on
> > an old style system like Solaris or Suse who use /opt for optional
> > software).  /usr/home (or the like) is where your users keep their personal
> > files.  If you have a lot of users and don't use quotas bob could try and
> > download the latest .iso images for his five favorite distributions onto
> > your 500MB harddrive.  Again this would fill your / and bad things happen.
> > >
> > > What I typically do for my home systems is just / and swap (my girlfriend
> > is a *nix geek too).  On my home severs I create /, /var, and swap.
> > Productions servers in a data center really require you to look at what they
> > will be used for and partition them out for their specific job.
> > >
> > > Dusty
> > >
> > > ---
> > > You are currently subscribed to luau as: warren at togami.com
> > > To unsubscribe send a blank email to $subst('Email.Unsub')
> > >
> > >
> > >
> > 
> > 
> > ---
> > You are currently subscribed to luau as: dusty at sandust.com
> > To unsubscribe send a blank email to $subst('Email.Unsub')
> 
> ---
> You are currently subscribed to luau as: epsas at inflicted.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> 



More information about the LUAU mailing list