swap file vs. swap partition

Damian Menscher menscher at uiuc.edu
Sat Jul 30 15:51:18 UTC 2005


On Sat, 30 Jul 2005, Dotan Cohen wrote:

> I'm now prepearing to either create a swap file or a swap partition. I
> am interested in knowing if there is any difference in performance.
> Anyone have any experience with this? Thanks.

A swap partition would be faster (think about it -- no filesystem 
overhead).  The only reason for a swap file is if you didn't plan your 
partitioning scheme properly, and _need_ to add swap at a later date.

Sorry, I don't have specific benchmark numbers for you.  I'm not sure 
how one would even go about benchmarking such a thing.

Oh, you can also have multiple swap partitions, on different drives. 
If you set them to the same priority, it will use all at the same time. 
Kinda like a raid0 stripe, but without creating the software raid.  If 
you're concerned about stability, I think you can software raid the 
drives first, and then create a swap partition on them (haven't actually 
done this myself, since raid would damage performance).

Damian Menscher
-- 
-=#| Physics Grad Student & SysAdmin @ U Illinois Urbana-Champaign |#=-
-=#| 488 LLP, 1110 W. Green St, Urbana, IL 61801 Ofc:(217)333-0038 |#=-
-=#| 4602 Beckman, VMIL/MS, Imaging Technology Group:(217)244-3074 |#=-
-=#| <menscher at uiuc.edu> www.uiuc.edu/~menscher/ Fax:(217)333-9819 |#=-
-=#| The above opinions are not necessarily those of my employers. |#=-




More information about the fedora-list mailing list