Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question
3  
It's kind of difficult without knowing your database workload & setup. OLTP/DWH/MySQL & memcached/etc ... ? –  FreshPhilOfSO Mar 14 '12 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 '12 at 21:50
add comment

2 Answers

up vote 3 down vote accepted

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

share|improve this answer
    
Wow Rolando, couldn't ask for a better reply :) –  Ran Mar 15 '12 at 21:38
    
BTW, any recommendation for 5.1? –  Ran Mar 15 '12 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. –  RolandoMySQLDBA Mar 15 '12 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 '12 at 21:53
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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