Previously I tested Tokutek’s Fractal Trees (TokuMX & TokuMXse) as MongoDB storage engines – today let’s look into the MySQL area.
I am going to use modified LinkBench in a heavy IO-load.
I compared InnoDB without compression, InnoDB with 8k compression, TokuDB with quicklz compression.
Uncompressed datasize is 115GiB, and cachesize is 12GiB for InnoDB and 8GiB + 4GiB OS cache for TokuDB.
Important to note is that I used tokudb_fanout=128, which is only available in our latest Percona Server release.
I will write more on Fractal Tree internals and what does tokudb_fanout mean later. For now let’s just say it changes the shape of the fractal tree (comparing to default tokudb_fanout=16).
I am using two storage options:
- Intel P3600 PCIe SSD 1.6TB (marked as “i3600” on charts) – as a high end performance option
- Crucial M500 SATA SSD 900GB (marked as “M500” on charts) – as a low end SATA SSD
The full results and engine options are available here
Results on Crucial M500 (throughput, more is better)
- Engine Throughput [ADD_LINK/10sec]
- InnoDB: 6029
- InnoDB 8K: 6911
- TokuDB: 14633
There TokuDB outperforms InnoDB almost two times, but also shows a great variance in results, which I correspond to a checkpoint activity.
Results on Intel P3600 (throughput, more is better)
- Engine Throughput [ADD_LINK/10sec]
- InnoDB: 27739
- InnoDB 8K: 9853
- TokuDB: 20594
To understand the reasoning why InnoDB shines on a fast storage let’s review IO usage by all engines.
Following chart shows Reads in KiB, that engines, in average, performs for a request from client.
Following chart shows Writes in KiB, that engines, in average, performs for a request from client.
There we can make interesting observations that TokuDB on average performs two times less writes than InnoDB, and this is what allows TokuDB to be better on slow storages. On a fast storage, where there is no performance penalty on many writes, InnoDB is able to get ahead, as InnoDB is still better in using CPUs.
Though, it worth remembering, that:
- On a fast expensive storage, TokuDB provides a better compression, which allows to store more data in limited capacity
- TokuDB still writes two time less than InnoDB, that mean twice longer lifetime for SSD (still expensive).
Also looking at the results, I can make the conclusion that InnoDB compression is inefficient in its implementation, as it is not able to get benefits: first, from doing less reads (well, it helps to get better than uncompressed InnoDB, but not much); and, second, from a fast storage.
The post InnoDB vs TokuDB in LinkBench benchmark appeared first on Percona Data Performance Blog.