Our company servers are currently hosted on a VPS and we've decided to move into dedicated servers.

When choosing the best hardware for a DB server, what should we invest more resources: better CPU (more cores)? or more RAM?

Where is the best ROI?

Any suggestions?

  • 3
    It's kind of difficult without knowing your database workload & setup. OLTP/DWH/MySQL & memcached/etc ... ?
    – Philᵀᴹ
    Mar 14, 2012 at 21:33
  • im interested with servers to our MySql databases. we have a master and 3 slaves. the db size is about 150GB. there is a ratio of about 3:1 reads to writes.
    – Ran
    Mar 14, 2012 at 21:50

2 Answers 2


You should invest in both.

As for MySQL, if you are using InnoDB as your default storage engine, you must upgrade to MySQL 5.5 in order to use more cores. Here are some of my past posts on this subject

As a point of reference, I have a client at my employer's web hosting company that has three DB Servers in Circular Replication. Each DB server has the following:

  • MySQL 5.5.9
  • 192 GB RAM
  • 162 GB InnoDB Buffer Pool
  • dual hexacore (that's right, 12 CPUs)
  • 1.8TB Disk Volume
  • 978 multitenant databases
  • 892 GB of InnoDB Data
  • innodb_file_per_table enabled

They have had this setup for a whole year. I personally configured my.cnf for multicore engagement. All 12 CPUs are in use. The InnoDB Buffer Pool is full to capacity. There have been no complaints from the client on the DB Performance since this layout was setup for them.

Tuning InnoDB is very important because if you don't, MySQL 5.5 will perform worse than MySQL 5.1. In some cases, it can be worse than MySQL 4.1.

As for RAM, tuning connection usage, the number of connections and InnoDB caches is the most important thing

  • Wow Rolando, couldn't ask for a better reply :)
    – Ran
    Mar 15, 2012 at 21:38
  • BTW, any recommendation for 5.1?
    – Ran
    Mar 15, 2012 at 21:44
  • Use MySQL 5.5 instead of 5.1. Why? MySQL 5.5 has the new multicore enhancements in its native InnoDB. MySQL 5.1.38+ requires the InnoDB plugin to have multicore enhancements. A mysql upgrade to MySQL 5.5 is more trustworthy and puts you mind at ease than to try a plugin installation in MySQL 5.1. Mar 15, 2012 at 21:48
  • since we are a small bootstrapped start up, we dont have the finance to purchase 5.5, till we get funded the free version will have to do :)
    – Ran
    Mar 15, 2012 at 21:53

MySQL does not properly utilize CPUs with more than 4 cores, so you would go for 4-cores max, and as much RAM as you can get to be able to carry out as much of the processing in memory as possible.

  • This was maybe true for MySQL up to 5.1. 5.5 and above is much better. May 15, 2015 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.