Skip to Content.
Sympa Menu

baslinux - Re: [BL] Swapon

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: qwms-avib AT dea.spamcon.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] Swapon
  • Date: Sun, 25 May 2003 09:53:51 +0000

James Miller wrote:
>
> So this is for making a swap file, as opposed to
> using a partition for swap. I've been wondering
> how that works. This could be a useful script,

Here's one for a 64mb swap file:
---------------------------------------------
cd /
dd if=/dev/zero of=swapfile bs=1k count=65536
mkswap swapfile
sync
swapon swapfile
---------------------------------------------

> Steven, could you say something about what are the
> merits/demerits of using a swap file as opposed to
> dedicating a partition to swap?

Partition is faster. I rarely use a swap file. The
only time I would use a file is when a partition is
too difficult.

> this script is apparently written for adding more swap
> "on the fly" - i.e., when a particularly memory intensive
> application needs to be run - correct?

I believe that live CDrom/ZipDrive versions of Linux
use swap files rather than swap partitions. Putting a
(temporary) swap file on the local HD is *much* easier
than trying to create (repartition?) a swap partition.

Cheers,
Steven





Archive powered by MHonArc 2.6.24.

Top of Page