While a scale-out solution has traditionally been popular for MySQL, it’s interesting to see what room we now have to scale up – cheap memory, fast storage, better power efficiency. There certainly are a lot of options now – I’ve been meeting about a customer/week using Fusion-IO cards. One interesting choice I’ve seen people make however, is buying an SSD when they still have a lot of pages read/second – I would have preferred to buy memory instead, and use the storage device for writes.
Here’s the benchmark I came up with to confirm if this is the case:
To start with, we have a test on the RAID10 storage to establish a baseline. The Y axis is transactions/second (more is better), the X axis is the size of innodb_buffer_pool_size:
Let me point out three interesting characteristics about this benchmark:
Where the C arrow was, in this graph a Fusion-IO card improves performance by about five times (or 2x with an Intel SSD). To get the same improvement with memory, you would have needed to add 60% more memory -or- 260% more memory for a 5x improvement. Imagine a situation where your C point is when you have 32GB of RAM and 100GB of data. Than it gets interesting:
The workload here is designed to keep as much of the data hot as possible, but I guess the main lesson here is not to underestimate the size of your “active set” of data. For some people who just append data to some sort of logging table it may only need to be a small percentage – but in other cases it can be considerably higher. If you don’t know what your working set is – ask us!
Important note: This graph and these results are valid only for sysbench uniform. In your particular workload the points B and C may be located in differently.
Raw results:
| Buffer pool, GB | FusionIO | Intel SSD | RAID 10 |
| 2 | 450.3 | 186.33 | 80.67 |
| 4 | 538.19 | 230.35 | 99.73 |
| 6 | 608.15 | 268.18 | 121.71 |
| 8 | 679.44 | 324.03 | 201.74 |
| 10 | 769.44 | 407.56 | 252.84 |
| 12 | 855.89 | 511.49 | 324.38 |
| 14 | 976.74 | 664.38 | 429.15 |
| 16 | 1127.23 | 836.17 | 579.29 |
| 18 | 1471.98 | 1236.9 | 934.78 |
| 20 | 2536.16 | 2485.63 | 2486.88 |
| 22 | 2433.13 | 2492.06 | 2448.88 |