Thread (16 messages) 16 messages, 6 authors, 2004-11-01

Re: RAID5 crash and burn

From: Nathan Dietsch <hidden>
Date: 2004-11-01 04:26:35

Mark Hahn wrote:
quoted
If you are seriously considering the performance implications of RAID1 
vs RAID5 for swap, you are already done for performance wise.
   
I disagree.  the whole point of Linux's approach to swap is that 
it's fairly cheap to write a page to swap.
Writing to any form of secondary storage is not "cheap" when compared to 
memory.
Writing to a swap RAID5 volume, where you will probably incur a 
read-modify-write operation is not considered "cheap" either.
whether you ever need 
it again depends on how overcommitted you are.  this is assuming that
the kernel successfully chooses not-likley-to-be-reused pages to 
write to swap, and that your swap partitions are reasonably fast 
to write to. 
This is what I am getting at: Any partition can not be considered 
reasonably fast to write to when compared to memory.
this approach works very well, excepting heuristic problems
in certain kernel versions.

in other words, reading from swap is permitted to be expensive,
since any disk read is always assumed to be slow.  
Agreed.
but writing to 
swap really should be fairly cheap, and this is a premise of the 
kernel's swap policies.
 
Sorry, I still don't buy the premise that writing to disk can be 
considered cheap.
I would not use raid5 swap for this reason; raid1 is not insane,
since you don't need *that* much swap space, so the 50% overhead 
is not crippling.  (don't even think about things like raid 10
for swap - the kernel already has zero-overhead swap striping.)
 
I would agree with that.

What I was trying to say was that if you are forced to go to swap, for a 
page out or a page in, you are going to incur overhead which is 
incredibly inefficient compared to memory.
Putting swap on RAID5, where you incur even more overhead is worse.

Putting swap on RAID1, as Guy pointed out, avoids crashes. So for the 
one time that you will go to swap, it is worse the extra bit of overhead 
to write it to a second disk to avoid losing the machine in the event of 
a disk failure.

Simply: Looking for performance improvements in swap means that you are 
already very, very overloaded OR it is simply an exercise in theory.

Kind Regards,

Nathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help