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

Re: Swap partition

On 28 Dec 2002, Alexandre Oliva wrote:

> On Dec 28, 2002, John Summerfield <phoebe computerdatasafe com au> wrote:
> > Size.
> > 	Once you create a swap partition you are tied to using that-size swap
> > partition. You go ahead and fully partition your drive and you cannot either
> > expand the partition or create another. So, if you want more swap space you
> > must use a swap file.
> Swap onto a logical volume, or use parted to resize your filesystems.

Do you mean a partition after the primaries? or are you talking about

The former is not better, and don't think LVM offers anything either.

> > /boot a few megabytes
> > /     the rest of the disk, say 40 Gbytes for current drives
> > If you create a swap partition, guess where it's going to be! No,
> > I'll tell you. It will be either at the centre of the drive or the
> > perimeter.
> > This means that whenever you access a page on your swap area, the heads
> > on your only disk drive travel to an edge of the recording surface,
> > diddle round there, and then travel back to your data.
> Which is one of the reason why, whenever I create a swap partition on
> a memory-starved machine, I split out / from say /home and place swap

My /home is usually on another system, mounted via NFS.

I find more partitions make disk management more difficult, so I go for
two partitions (one till I actually got caught on a system what wouldn't
boot some time in RHL 7.x).

> in between.  Swapping on logical volumes may be a better idea, since
> you can then scatter swap extents all over the disk.  Not that I've
> done it myself; I fear there might be memory deadlocks in such a
> configuration (e.g., you need to swap something out to make room for
> memory for the lvm module to be able to swapping something out).

Give me swap files. Far more flexible, I can add more any time, I can
easily remove them.

> > Now, when does this matter? Why, when you most need efficient
> > paging/swapping. I don't care how much better swap partitions are in a
> > technical sense then swap files, I do not believe they can possibly
> > perform better than a swap file on a busy disk drive.
> I have similar thoughts regarding ext3 journals.  It appears to me
> that it might be advantageous to have it scattered over the entire
> filesystem, instead of in a sequential chunk of blocks.

No no no. You do not want to _force_ seeks. That's what's wrong with
Windows - it scatters stuff all over the place.

> > dedicate a disk drive for swap. If you do that, then I don't see any
> > point in a partition - use the whole drive.
> It seems to me to make even more sense to raid or lvm between the two
> drives, with swap partitions on both, at least for some workloads.  I
> don't know whether the kernel will actually be smart enough to use
> each disk's swap space intelligently, though.

We're talking about low-cost personal computers, not servers. One disk
drive. I have six computer with me, all runnint Linux. Only one has more
than one drive, and that because I wanted more disk space.

You can priotorise swap areas.



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