swap file

Matthias B. msbREMOVE-THIS at winterdrache.de
Mon Sep 20 10:05:24 PDT 2004

On Mon, 20 Sep 2004 17:55:46 +0200 Laurens Blankers
<laurens.blankers at gmail.com> wrote:

> > It used to be faster but I recall reading something about swap files
> > being as fast as swap partitions with newer kernels. But don't take my
> > word for it.
> >From what I understand for best performance all blocks of the swap
> file need to be consecutive. So one big peace on the hd. Because of
> the speed optimilizations in ext2 and other filesystems this is not
> always the case. On a partition this is always true.

That effect is not very significant, because swap space gets fragmented
anyway and keeping fragmented data in unfragmented storage is not very

> Also if the swap file is on a journaling filesystem, writing to the
> swap file will result in additional overhead from the journal.

That would be a really really stupid implementation. I'm willing to bet
that the swap code bypasses the journalling.


What color is a chameleon on a mirror?

More information about the lfs-support mailing list