EmergencyEMERGENCY? Get 24/7 Help Now!

Finding an optimal balance of I/O, CPU, and RAM for MySQL

Posted on:



Share Button

For a long time I’ve wanted to know how MySQL scales as you add more memory to the server. Vadim recently benchmarked the effects of increasing memory and CPU core count. He looked for a balance between utilizing the hardware as much as possible, limiting the system complexity, and lowering the price-to-performance ratio.

The outcome of the research, which was sponsored by Virident, is that as you add CPUs and increase memory size, MySQL doesn’t scale as well as we would like, and solid-state storage — specifically, the Virident tachIOn drive — has more bandwidth than MySQL can fully utilize at present. Therefore, to decrease the price-to-performance ratio and increase the utilization of the tachIOn drive, Vadim sharded the database into smaller instances and colocated them on the same machine. It’s not a new approach, but to date I’m not aware of anyone measuring the different configurations the way Vadim has done.

You can read the full details in our Scaling MySQL With Virident Flash Drives and Multiple Instances of Percona Server white paper.

Share Button

Baron Schwartz

Baron is the lead author of High Performance MySQL. He is a former Percona employee.


  • I should clarify that I too think that throwing many instances on a box is not the way to scale.. :)

    However, I’d also say from experience that the challenge of running two instances on a machine are just the same as 32..


  • Baron Schwartz Post author

    Mark, I was very conscious of that earlier work while writing up these results. I think there are a couple of crucial differences, and I have not changed my mind about the earlier benchmarks. They were artificially throttled to show “linear” scaling, they did not actually examine the scalability tradeoffs the way Vadim has done, and like Peter said, determining that 2 instances is a sweet spot is a far cry from just throwing 32 instances on the box. Finally, these 2 instances are providing high performance, not just massive parallelism — there is a big difference, and when latency matters, “many slow queries all at once” is not acceptable.


  • Peter Zaitsev


    I still would state what running many instances of MySQL on the same box is a pain and it is much better if you can get to use full box resources with only single instance.

    The other thing there is the difference between running 2 instances (which is there main advantage comes) and running 32 instances as the blogger in original article advices.


  • Interesting reading!

    I’ll note, we did similar stuff back in 2008 when originally joining Sun, which you guys were pretty critical of:


    Slightly different scalability bottlenecks discussed, but both falling back to the good old “oh just run more of them on the same machine”.. :)


Leave a Reply

Percona’s widely read Percona Data Performance blog highlights our expertise in enterprise-class software, support, consulting and managed services solutions for both MySQL® and MongoDB® across traditional and cloud-based platforms. The decades of experience represented by our consultants is found daily in numerous and relevant blog posts.

Besides specific database help, the blog also provides notices on upcoming events and webinars.
Want to get weekly updates listing the latest blog posts? Subscribe to our blog now! Submit your email address below and we’ll send you an update every Friday at 1pm ET.

No, thank you. Please do not ask me again.