October 11, 2009 posted by Greg Oster
The work to improve the parity handling in RAIDframe was done by Jed
Davis as a 2009 Google Summer of Code project in NetBSD. The
mentoring on this project was done by Greg Oster. This document
summarizes the project and the results.
RAIDframe (the software RAID implementation in NetBSD) suffers from
long parity checking/rebuilding times in the event of an unclean
shutdown. The goal of this project was to implement a solution that
greatly reduces the amount of time required to ensure that the parity
is correct after an unclean shutdown.
The main project goals were met. Jed's solution to the parity
rebuilding problem is based on a "parity map". In this solution, the
RAID set is divided into some number of "zones", where the parity
status of each zone is reflected in the parity map. So while the
existing RAIDframe code can be though of as having just a single zone
(i.e. the entire RAID set) the new parity map code uses simple
heuristics (e.g. minimum zone size of 25MiB per component, maximum of
4096 zones) to determine the number of zones and the size of the
Part of the work involved exploring various zone sizes and
investigating the performance implications of not only the zone sizes
but the frequency of updating the parity map as well. There were also
data consistency (e.g. order of write operations) and update issues
(e.g. drive cache flushing) to deal with.
The code has yet to be merged into the main NetBSD tree, pending
additional testing and verification of the code involved.