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 on a quadcore CENTOS 5.9 i686 standard running WHM 11.36.0. It's a dedicated LAMP server with lots of websites, most of which are using databases. I'm monitoring the server using Munin and notice the load is always quite high, pushing the limits (often >4). Munin also shows a memory graph which indicates constant swapping and committed memory averaging around 5-6 GB on a 4GB RAM server. Surely this isn't healthy?

I have tried to tweak mysql using tuning-primer.sh and mysqltuner.pl, but I'm now at a point where I feel I cannot do more. These tools keep recommending stuff, but whatever I do, they keep giving new advice, and I feel I am running in circles now. So my question is: is there a point when it's becoming practically pointless to try and tweak mysql further, even though it may theoretically be possible to squeeze out more performance?

Is there an easy way to know if mysql is maxed out?

share|improve this question

closed as not constructive by dunxd, kce, Dave M, gharper, mdpc Apr 11 '13 at 3:00

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 1 down vote accepted

A database server needs lots of RAM. 4GB is a tiny amount by todays standards. Adding more RAM is the single most effective optimization you can do to MySQL (and you even know you are short on RAM, hence the swapping). Everything else you do is comparatively just fine tuning with a lot less impact. Since you are on a 32Bit system, the easiest approach would be to offload MySQL to a secondary server with more RAM (and a modern 64bit OS).

share|improve this answer
    
Oh yes, migrating to a 64 bit server is on top of my wish list. One problem is that the ISP is quite pricey and the dedicated 64 bit mysql server I have been looking at is hosted with another ISP, in another country..so the latency isn't that appealing. –  Phred Apr 10 '13 at 13:20

Doesn't matter, really. Unless the performance isn't enough, worrying about this instead of other issues that should have your attention is a bad use of your time. This includes the security of the machine, backups, worry about the queries (badly organized queries or data can have an enormous impact, I saw a query once that was killed after a few hours; rethinking the database organization and the query iself cut that down to a few minutes). Set up so that if the machine fails a replacement can be put on line on short order (clean, documented and backed up configuration; fresh backups of relevant data; potential spares identified; ...).

share|improve this answer
    
Well, I consider myself to have quite good control of security and backup issues and more, so this is why I feel the performance problem is a priority. I would rather try to get the most out of the current server than get a replacement. And investigating queries is something I have considered, especially BLOBs and TEXTs which are known to cause memory problems. –  Phred Apr 10 '13 at 13:18

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