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

Re: System performance using swap partition vs. swap file



On Mon, 2002-12-09 at 16:54, Rick Stevens wrote:
> 
> Make your partition and mount it.  Create a contiguous file of the
> size you want filled with zeroes (for example, 2GB):
> 
>      # dd if=/dev/zero of=/mountpoint/swapfile1 bs=1M count=2048
> 
> Then "swapon /mountpoint/swapfile1" to activate it.  You can also
> add a line like:
> 
>      /mountpoint/swapfile1   swap   swap    defaults        0 0
> 
> to your /etc/fstab and the system will activate it (via "swapon -a")
> on the next boot automatically.


Rick,
   Thanks for the instructions on actually making the file. That will
help a lot.

   The only place where I'd think I want to change this is, again
because of the drive reordering problem, would be the way you are
suggesting the file be mounted in the fstab file. Currently I have:

LABEL=/store      /store        ext2    defaults        0 0
/dev/hda6         swap          swap    defaults        0 0
/dev/hde6         swap          swap    defaults        0 0

where one or the other swap files mounts depending on which way the
system enumerates the drive controllers, but I always get a failure
message for the other line.

My thought is that I'd want:

LABEL=/store         /store        ext2    defaults        0 0
LABEL=/swapp         /swapp        ext2    defaults        0 0
/swapp/swapfile1     swap          swap    defaults        0 0

where the second line mounts the swap partition using the label, and
then the file is mounted as per your instructions.

I'll give this a try either this evening or tomorrow, presuming I don't
here something to the negative.

Thanks a lot for the help. This will be a nice fix!

Cheers,
Mark





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