SUMMARY: performances of swap file vs swap partition

From: Eric Voisard <evoisard_at_atisuher.ch>
Date: Fri Nov 18 2005 - 05:58:53 EST
Dear Sun friends,

Thanks to all who took time to send me a message, namely: William M Horton, 
Hutin Bertrand, Ken Rossman, Andrew Hay, Brad Morrison, Darren Dunham, 
Anthony D'Atri and Dana Hudes.

The general consensus is that even though performances would only differ 
slightly, it is better to use swap partitions.

The evoked reasons are that a swap file will be a bit slower because of the 
underlaying regular file system. It's getting worse when the swap file is 
on a disk with an existing swap partition because the system will assume a 
flat swap space and the Round-Robin accesses will cause a lot of head 
travel between swaps areas. It would then be better to put the swap file on 
another disk and even better, the latter being on another controller.

In addition, by default the system puts kernel crash dumps into the first 
swap partition in /etc/vfstab. While swap files can be configured as the 
dump device, it's not recommended. Recommendation is to use a regular disk 
partition.

Summarizing, whenever possible when swap space needs to be expanded, it's 
better to take the time to reorganise the disks and make a new swap 
partition, or use a free slice to make an additional swap partition. Swap 
files should remain a temporary solution.

However, everybody agreed that the difference in performance should be 
small not to say insignificant, unless the system is already slow or full 
of memory-hungry processes. Well, when the system is heavily swapping...

Thanks again to everybody!
Eric


At 14:03 15.11.2005, I wrote:
>Hi there,
>
>I must increase the swap space on a server here. As the system is in the 
>field it would be simplier to make a swap file on an existing partition, 
>but I'm wondering if I must expect some performance drawback versus a swap 
>partition.
>
>Any idea?...
>
>Many thanks, Eric
>_______________________________________________
>sunmanagers mailing list
>sunmanagers@sunmanagers.org
>http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Nov 18 06:07:48 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:53 EST