12

I am going to be moving my database server to somewhat better new hardware. The current database server does not have any problems except that it is running Centos 4. The current hardware is 2 quad core xeon 5335, 4 15K RPM in RAID 10 and 4GB(yes, it really is only 4GB) of memory.

The hardware choices in my budget have almost no price differences and will have the same 4 15K RPM harddrives in RAID 10. They are:

  • 2 quad core xeon 5335 with 8GB 533/667
  • 2 hex core xeon 2620 with 16GB 1333
  • 4 dual core opteron 8212 with 8GB 667
  • 1 octo core xeon 2650 with 8GB 1333
  • 1 quad core xeon 3460 with 16GB 1333

Excluding harddrives, what is the order of important parts of a database server? Is it something like: memory size, memory speed, cores, and then cache size?

3
  • 3
    What's your current utilization on the CPU? Are you running at 10%? 50%? If you are ~ 30-40% on a regular basis, then it seems the 2620 with 16GB RAM is what you want (a Q1`12 hexacore chip with 16GB FAST RAM? Yes please)
    – jcolebrand
    Apr 18, 2012 at 17:53
  • @jcolebrand That is the one I was thinking would be best. 10-20% utilization on average with spikes to 30-40% sometimes. Apr 18, 2012 at 18:06
  • XEON 2620 at 2 GHz, XEON 3460 at 2,8 GHz?
    – Nils
    Apr 18, 2012 at 20:13

3 Answers 3

21

In my experience, what you're looking for would be in this priority order:

  1. Disk subsystem speed. RAID10 in my experience is best. Bonus points for SSDs.
  2. Total amount of RAM The more RAM, the more cache your server will be able to have.
  3. Memory speed. Faster RAM is obviously better than slower RAM, however RAM is always faster than disks, so more slower RAM is better than less faster RAM.
  4. Number of CPU cores
  5. CPU speed

This obviously depends on the application, but typically a database server's job is to provide really fast access to data, so the CPU speed is less important than the speed of access to the data (disks and RAM). But obviously if you're using a lot of math / calculations in your queries, you need more CPU resources.

3
  • 2
    depending on the db architecture I would say that more cores would be better overall than more cpu speed, because higher clockrate != shorter pipeline, and there are too many things to consider there, but with more cores, the OS can have more room to do side processes, and the engines are usually smart enough to be able to spread themselves over more cores.
    – jcolebrand
    Apr 18, 2012 at 17:47
  • @jcolebrand point taken and answer updated!
    – Josh
    Apr 18, 2012 at 17:52
  • 2
    Since MySQL was specifically mentioned, faster processors are usually a better choice than more (assuming you're not talking about just 1 or 2), as the speed of a single query is fundamentally limited by the speed of a single processor. Even the most recent MySQL versions don't scale as well as some other RDBMSes across multiple cores due to internal mutex and semaphore contention. I run several 24 core servers and I would give my left arm to trade them in for half as many cores that are 1.5x faster. Apr 19, 2012 at 13:01
8

When it comes to MySQL, you must also consider the default Storage Engine of your data.

If using MyISAM data only, you only need to consider the following

Disk speed, Memory Speed, Total RAM, CPU

Number of Cores is a big nonfactor because MyISAM (in fact, mysqld) does not utilize multiple cores.

If using InnoDB data only, now you have something to talk about when it comes to cores.

MySQL 5.5 now comes with multicore support for InnoDB.

All CPUs will be firing on all cylinders for InnoDB as long as you properly configure InnoDB do so. Believe it or not, if you do not configure InnoDB, there are instances where older versions of InnoDB will be faster out-of-the-box than newer versions.

Note to Moderators

If there are too many links, please do not downvote. Just alert me and I can paraphrse from excerpts of those links.

4
  • That is good to know. Lots of the tables are MyISAM, but most if not all can be changed to InnoDB, which I was thinking of doing anyways. I'm going to be upgrading to 5.1 (from 4.1) Apr 18, 2012 at 18:17
  • You need to upgrade to 5.5. MySQL 5.1 requires the plugin. It is easier just to go 5.5. Apr 18, 2012 at 18:21
  • InnoDB Plugin can be installed easily in 5.1. Also, Percona Server 5.1 is based on InnoDB plugin. Apr 19, 2012 at 13:15
  • @AaronBrown : Since Echo has MySQL 4.1, either Percona 5.1 or MySQL 5.5 would do it. Even though I have installed the semisync 5.5 plugins before, I am just a little lazy on plugins. Apr 19, 2012 at 13:27
0

From all that has already been said and what I have seem from DB-servers: "2 hex core xeon 2620 with 16GB 1333" seems to me like the first choice.

Use RDIMM3 with 1333 MHz speed - 12 or 15 GB is propably faster than 16 GB, since you can divide the number of DIMMs through 3.

If your DB is heavy on writes look for good disk IO performance as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .