3 ms·
We use MySQL on ZFS pretty extensively on my current team for both "hot" application database servers and warm storage / reporting / archival systems. Easy expa
by sethhochberg 9y ago
We use MySQL on ZFS pretty extensively on my current team for both "hot" application database servers and warm storage / reporting / archival systems. Easy expansion, free snapshotting, great IO performance, and self-healing, first-class monitoring from within the OS, etc made it a logical choice for us when we were designing new database servers. We also use ZFS-on-linux extensively on a large storage cluster for multimedia, so it fit into our existing ecosystem and we wanted to standardize as much as possible.
Through our own research and experimentation we settled on a few critical tweaks to make InnoDB and MySQL play nicely together... the highlights are:
- disable the innodb doublewrite buffer, ZFS protects against partial page writes
- tune the ARC aggressively: we size it waaay down on our db servers and let innodb's buffer pool handle in-memory caching, and disable the arc prefetch. On our application databases, our core tables fit entirely into the innodb buffer pool
- particularly important on spinning-platter systems, give the zpool scrub jobs higher IO priority... the default settings for zpool scrub delay scan_min_time are extremely conservative and safe, but on high-IO slaves we found that there was essentially never enough idle time for the scrub to complete. we sacrifice some IO overhead to allow scrubs to finish regularly.
I'm really curious to see some more detailed writing on MySQL/ZFS from the Percona team... their benchmarks are usually pretty well thought out, and they certainly understand InnoDB better than we do. What we've got works well, but I'd be surprised if a truly ideal setup down to the kind of detail that they dig into.