Running Sysbench Benchmark on MySQL using Solid State Drives and ZFS
By Roger Bitar, Systems Technical Marketing
Introduction
As a follow up to the previous Sysbench benchmark that ran on Solaris UFS, we re-ran the benchmark using ZFS filesystem on the same setup and configuration. Solaris ZFS does not allow the forcedirectio option as with UFS. We followed the “ZFS Best Practices Guide” recommendations. Namely, we limited the size of the Adaptive Replacement Cache (ARC) to 1GB, and we set the ZFS recordsize to 16K as it matches the Innodb page size. We used the same MySQL configuration file “my.cnf” that was used in the previous UFS test.Results on Solaris ZFS
The following TPS (transactions per seconds) results were obtained for read only operations:
The following latency results were obtained, smaller is better:

Conclusion
- We obtained better results when we used UFS, because of the forcedirectio option used when mounting the filesystem. ZFS does not have this option, instead we limited the ARC cache to 1GB in the /etc/system file.
- Again, SSDs demonstrated a significant advantage (up to 7x) for this read-only workload in environments where memory was constrained when using smaller innodb_buffer_pool_size.
- Database transaction latency is much better (30x) when using SSDs compared to HDDs.
- The best results with this type of workload are obtained on regular disks along with ample main memory. SSDs come a close second, even when main memory is severely constrained. Throughput is significantly worse when regular disks are combined with insufficient buffer memory.
What about read/write scenarios?
Posted by Behrang on February 23, 2009 at 05:30 PM PST #
Behrang,
Good question! I only published read only results, because you get the most performance with read, and I wanted to highlight the dramatic difference between SSD and HDD in terms of performance and latency, since we will be introducing SSD in our servers. Besides, read operations are much more predominant than write operations.
Now, why you get better results with read, is because with flash and SSD, you need to erase a memory cell before you can write to it. Even with this caveat, you still get better performance than with HDD. In addition, all the SSDs available from Sun also come with a built-in buffer to help speed up the write operations.
Posted by Roger Bitar on February 24, 2009 at 10:54 AM PST #