Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to speed up my mysql server. From what I read, mysql can only use 1 single core, at least when it's on the same connection and table.

Right now I have 2 * Intel E5420

I'm wondering if it will be faster with this : X7560

Core speed isn't a lot different, more cache L2, but since only 1 core will be use ...

My master master mysql server is getting more and more load, I need to find a solution to grow my capacity.

Thanks for your input !

share
    
Any details on the load or DB structure? Anything at all? –  Chris S Jun 9 '11 at 14:09
8  
You'll typically get more gains by optimizing your database layout. Are you sure you're CPU-bound? –  Kyle Smith Jun 9 '11 at 14:15
    
We have 99% of MyISAM tables. 40GB of RAM and our DBA already has optimize parameters in my.cnf –  Bastien974 Jun 9 '11 at 14:26
2  
Note that X7560 is an different socket processor to the E5420. It will not fit as an upgrade to your current machine if you were considering a CPU upgrade. –  HampusLi Jun 9 '11 at 15:32
    
Oh yeah sure, it would be a complete new server :) –  Bastien974 Jun 9 '11 at 23:17
show 1 more comment

3 Answers

From what I know, mysql use a lot more the memory than the processor.

Try to upgrade your memory first (way more economic than buying a new cpu.)

If that don't change anything look onto your sql process, some of them must not be very optimize and can require a lot of ressources for nothing.

share
    
I agree, but we already spent a lot of time optimizing our queries. The time will come when I'll have to change the hardware, so will a 5000$ CPU will be worth or a "cheap" one will be enough ? –  Bastien974 Jun 9 '11 at 23:22
    
If you'll need to change the hardware soon, don't upgrade to a 5000$ CPU, it will more interessting to do a tenders offer on IBM, HP, ORACLE to see what solution they can give you about datastorage server. (They all have storage server in their catalogue.) If you can't afford tender offers, then buying a cheap CPU to give your server a new fresh breath is the best solution, don't forget, that when you change one part of a server by a new one, the rest of your server's component doesn't change. Be aware that they can die in you hand without warning. A priceless CPU will be useless in this case –  Anarko_Bizounours Jun 10 '11 at 8:56
add comment

MySQL can use any number of cores - up to number of connected clients.

According to this benchmark: http://www.mysqlperformanceblog.com/2011/05/20/scaling-problems-still-exist-in-mysql-5-5/, MySQL scales well up to 16 cores

So, I believe if you have 8 or more clients running query at the same time, X7560 should be faster. But do not expect it would be 2x faster.

Another note: you might be interested in upgrading other parts of your system. disks and/or amount of memory for cache is the more common cause of boolteneck. CPU becomes a bootleneck quite rarely, mostly for read-only loads with all active data fitting in RAM.

share
1  
Wow 5.5 seems to be a lot more optimize for multi-core. But will it work on MyISAM tables ? Every optimization on Percona is made for innoDB :( –  Bastien974 Jun 9 '11 at 14:28
add comment

Mysql is only limited to 1 core for each process, or when it is replicating. So there's really nothing you can do to get a single query you run to use multiple cores as far as I know. But if you have 2 people on your system both executing a query, they will be able to run on different cores.

If your system is read intensive, creating read slaves will help ease the load on your master, but those slaves will only use 1 core when replicating, so if you're writing data to the master faster than the slaves can write, the replication will fall behind.

share
add comment

This site is currently not accepting new answers.

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