Re: swap file vs. swap partition

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

 



On Sat, 30 Jul 2005, Peter Arremann wrote:
On Saturday 30 July 2005 13:06, Mathieu Chouquet-Stringer wrote:
menscher@xxxxxxxx (Damian Menscher) writes:
A swap partition would be faster (think about it -- no filesystem
overhead).

Not true anymore. There is no overhead for a swap file compared to a swap
partition:

Was just going to post that link... Yes, there is no performance difference on
a block by block base between partition and file... but there is still one
good performance reason to use swap partitions - you can put them in the
fastest region of the disk. Look at this graph
http://www.tomshardware.com/storage/20050606/toshiba-05.html#data_transfer_graph
(just an example, you can usually easily find similar graphs for your drive
type).
You see, if you place the swap partition at the end of the disk, you'll get
like 40% less performance than if it is at the beginning. With a individual
partition you can control this - with a filesystem (if its larger, i.e. if
you only make one large / partition) you can't really determine the location
of your swap file...

Interesting link, though the graph is labeled so poorly it's not clear what it even is supposed to mean. I'm not convinced you interpreted it correctly.

I used to think the data transfer rate would be faster on the outer cylinders, but then I benchmarked it. There's no difference on the disks I checked (18G scsi disks). Oh, and keep in mind that the relevant factor is seek speed, not data transfer speed, if you're using your disk as RAM. Don't forget that the R stands for Random.

(I did this for a project several months ago where I was adding 64 gig of swap space -- 8 gig on each of 8 drives.)

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@xxxxxxxx> www.uiuc.edu/~menscher/ Fax:(217)333-9819 |#=-
-=#| The above opinions are not necessarily those of my employers. |#=-


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux