Re: Swapfile

Kai Schulte (sp0005@aixrs1.hrz.uni-essen.de)
Mon, 2 Oct 1995 04:30:00 +0100 (MEZ)


On Sun, 1 Oct 1995, Dirk-Jan Koopman wrote:

> I was wondering the other day whether, in this modern day & age, we need
> to have separate swap partitions? What with running X, doing a longish
> print in netscape and only 32Mb of RAM, I was swapping and couldn't I
> hear it!

Having an extra partition to swap to reduces file system overhead, and
by keeping the swap partition on a separate drive you can gain further
improvement in performance compared to a swap file within the same
file system :)

These two reasons are definitely enough for me to use a partition, but
if you still want to go with the file, just say

dd if=/dev/zero of=<swapfile> bs=1024 count=<blocks>
mkswap <swapfile> <blocks>
sync
swapon <swapfile>

(cf. swapon manpage ;)
This can also be rather useful in case you suddenly need more swap space for
certain applications.

Kai