A New FreeBSD Server

Robert Watson rwatson at FreeBSD.org
Sun Jun 25 10:24:11 UTC 2006


On Sat, 24 Jun 2006, Mike Meyer wrote:

>> Swap drive, should probably be a piece of one of the 17GB drives (NO RAID) 
>> the Box has 500MB ram......
>
> Why not RAID your swap? The extra reliability might not be worth very much, 
> but the extra performance couldn't hurt - unless you don't plan on swapping 
> at all. This is enough of a win that the swap subsystem will interleave swap 
> usage across multiple drives, a facility that predates RAID. If you just 
> split your swap across multiple drives, you get RAID0 behavior from swap.

On my boxes, I always put swap on RAID, for two reasons:

(1) When swapping, performance does matter, so having the extra throughput and
     reduced latency helps quite a bit under load.  This is especially
     important if you use a swap-backed temporary file system for /tmp.

(2) System reliability depends on swap reliability.  Specifically, if your
     init process, or X server, etc loses its memory because your swap disk
     dies, that's really bad for reliability.

Similar arguments apply to system boot disks, which are left out of RAIDs by 
some administrators.  Data corruption in swap or system programs and data can 
result in overall system failures, and the possibility of data corruption due 
to misbehaving apps, etc.  I always stick all swap and file systems on RAID 
for critical systems in order to avoid the cost and risks of recovering from a 
non-RAID failure.

Robert N M Watson
Computer Laboratory
University of Cambridge


More information about the freebsd-hackers mailing list