Real word test: MySQL database

Using the Sysbench utility, I have benchmarked various aspect of a MySQL database, which is famous for its high speed. How can array layout influence the creation of a OLTP table containing 1000000 (one-million) rows?

MySQL prepare benchmark

As we can see, RAID 5 here is quite slow, excessing the speed of only a RAID 1 array. In contrast, RAID 10 perform much better, but the single disk is surprisingly good also: the mighty RAID 0 is not so faster than it.

Now its time to run some tests against the prepared database. I used the Sysbench utility to launch 16 threads, all executing simple, read only SQL commands concurrently. The total requests number weights at 1000000 (one-million).

MySQL simple benchmark

Excluding the single disk setup, we see quite similar results from all the tested RAID levels. It is interesting to note that RAID 1 perform quite better than the single disks setup: it seems that, after all, in some situations the Linux software RAID controller is smart enough to efficiency use these multiple disks.

The last MySQL test in a tougher one: this time, Sysbench issues some complex transaction-related SQL commands. For this test, the total requests number was lowered to 10000

MySQL complex benchmark

This time, RAID 1 and 5 perform worse than the single disks setup. In stark contrast, RAID 0 and 10 are very fast here.