Benchmarking Linux filesystems on software RAID 1 (Lone Wolves)
Posted May 3, 2008 19:18 UTC (Sat) by
anton (guest, #25547)
In reply to:
Benchmarking Linux filesystems on software RAID 1 (Lone Wolves) by maney
Parent article:
Benchmarking Linux filesystems on software RAID 1 (Lone Wolves)
The write caching by the file system is no problem for the file system
and data consistency if the file system writes the data out in the
right order (and file systems do that (some better and some worse),
through such techniques as journaling and/or ordered writes).
The write caching by the drives or a hardware RAID controller can
be a problem, if it results in the writes being reordered; and at
least drives
perform such reordering. There are a several remedies: 1) Turn
off write caching in the drive (costs a lot of performance if you
don't have tagged commands) 2) Use flush commands to the drive at
appropriate moments. I don't know if the file systems do these things
and do them properly. Last I looked, they did not turn off write
caching, but left that to the sysadmin.
How does that mix with RAID1? In case of a power failure, the drives
may not contain the same data (one may have written one or more blocks
that the other has not written); what the md driver does in this case
is to run the RAID from on drive, and sync the other disk from it. I
guess that opens a window of vulnerability while the syncing is going
on, but it's probably still the safest thing to do. Having a reliable
UPS with automatic shutdown would eliminate this window, but the
window is typically small compared to the time when the RAID1 protects
against a disk failure, so the reliable UPS may not be worth the cost.
If the file system was better integrated with the RAID (ZFS?), this
situation could be handled in a better way.
Finally, in our experience UPSes are not more reliable than our
power grid. We had an UPS die (and take the machine it was supposed
to serve down) while the grid was ok and all other machines (including
those without UPS) continued working; we eventuelly decided to go
without UPSes. The alternative would have been to have redundant
power supplies with redundant UPSes, which was not worth the effort
for us.
(
Log in to post comments)