Re: [SLUG] swap drive, partition or no?

From: steve (steve@itcom.net)
Date: Thu Apr 04 2002 - 23:13:31 EST


On Thursday 04 April 2002 21:09, you wrote:
> On Thu, Apr 04, 2002 at 06:07:50PM -0500, Paul Braman wrote:
> > I've got this 4G HD sitting around and I figured I would use it as a
> > "swap drive" for an installation I'm doing. (Debian, maybe, if I can be
> > convinced I'm still geeky enough.)
> >
> > My question is, would the Linux kernel get more use out of the drive if I
> > partitioned it up into, say, 4 1G partitions or just left it as one, big
> > swap space?
> >
> > Or...does it matter?
>
> I don't think there's any benefit for more than 2 * memory of swap
> space. There used to be a stiff limitation like this in the 2.2 kernels,
> but I don't know about the 2.4.
>
> As a suggestion, I'd use the 4G as a backup drive. You could back up
> your most important files to that drive nightly. That's what I do with
> spare drives.
>
> Paul

The only thing with IDE drives is to try to keep one drive per controller (to
maintain maximum throughput).

Being that Unix is a multiuser O/S, people add their stuff to the computer
all the time. Now the system needs to have space for writing its log files.
Some Unixes would halt when they no longer could account for what it was
doing (through log files). So you would have a seperate partition or disk
(/var) to ensure disk space would be available (i.e. not useable by users).

This also translates into having space dedicated to things like data and
applications. This way you would typically backup that drive. If it broke
you'd simply replace it and restore the data. It actually makes a lot of
sense in a bigger production environment as it buys flexibility.

You can mount let's say the /usr partition as read only, while the rest is
read/write. This could be extended to all other bin dirs too. Makes them that
much safer.

I realize now that this may not have been exactly what you asked about but I
here it is nevertheless.

Swap size seem to loose value at 1G. With 768M RAM (all used) I've used up
smaller swap disks, but with 1G I don't, but again that's with my kind of
usage. (Sounds like I was trying to have it both ways does it not?)

It used to be that I went for about 400M swap. But I noticed that some
conditions would occur that would use it all up. So I've increased until I
hit 1G and now I don't run out of swap (unless I have some kind of race
condition where some app is running away eating up all available memory, but
that's not applicable anyway. [Ramble on...]:).

My servers f.ex. all have 1G swap.

My desktop machine at any given time have about four O/S's. I share the swap
partition between the different Linux versions.

-- 

Steve ________________________________________________________ HTML in e-mail creates out-security, and more spam. By using it you teach others less knowledgeable that it's OK.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:48:06 EDT