MySQL: ZFS vs RAID, was Re: MyISAM engine: worst case scenario in case of crash (mysql, O

  • robert_milkowski / 212 / Wed, 17 Feb 2010 16:04:00 GMT / Comments (0)
  • Robert Milkowski wrote:
    No, a truly fault-tolerant hardware RAID is VERY expensive to develop and manufacture. You don't take $89 100GB disk drives off the shelf, tack them onto an EIDE controller and add some software to the system.

    You first have to start with high quality disk drives. The electronic components are also higher quality, with complicated circuits to detect marginal signal strength off of the platter, determine when a signal is marginal, change the sensing parameters in an attempt to reread the data correctly, and so on.

    The firmware must be able to work with this hardware to handle read errors and change those parameters, automatically mark marginal sectors bad before the become totally wiped out, and if the data cannot be read,automatically retry from the mirror. And if the retry occurs, the firmware must mark the original track bad and rewrite it with the good data.

    Also, with two or more controllers, the controllers talk to each other directly, generally over a dedicated bus. They keep each other informed of their status and constantly run diagnostics on themselves and each other when the system is idle. These tests include reading and writing test cylinders on the disks to verify proper operation.

    Additionally, in the more expensive RAID devices, checksums are typically at least 32 bits long (your off-the-shelf drive typically uses a 16 bit checksum), and the checksum is built in hardware - much more expensive, but much faster than doing it in firmware.

    Checksum comparisons are done in hardware, also.

    Plus, with verified writes, the firmware has to go back and reread the data the next time the sector comes around and compare it with the contents of the buffer. Again, this is often done in hardware on the high end RAID systems.

    And, most of these RAID devices use custom chip sets - not something off the shelf. Designing the chipsets themselves is in itself quite expensive, and due to the relatively limited run and high density of the chipsets, they are quite expensive to produce.

    There's a lot more to it. But the final result is these devices have a lot more hardware and software, a lot more internal communications, and a lot more firmware. And it costs a lot of money to design and manufacture these devices. That's why you won't find them at your local computer store.

    Some of this can be emulated in software. But the software cannot detect when a signal is getting marginal (it's either "good" or "bad", adjust the r/w head parameters, and similar things. Yes, it can checksum the data coming back and read from the mirror drive if necessary. It might even be able to tell the controller to run a self-check (most controllers do have that capability) during idle times.
    But it can't do a lot more than that. The controller interface isn't smart enough to do a lot more.

    The point is that you can still use such array and put on top of it ZFS for many reasons - easier management is one of reasons, another is better data protection than if you use classic file system.

    Robert Milkowski
    rmilkowskiZZZZ...wp-sa.pl
    http://milek.blogspot.com
  • Keywords:

    zfs, raid, myisam, engine, worst, case, scenario, crash, mysql

  • http://database.itags.org/mysql/62245/«« Last Thread - Next Thread »»