1

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?

Phred
  • 13
  • 2

2 Answers2

1

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).

Sven
  • 98,649
  • 14
  • 180
  • 226
  • 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
0

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; ...).

vonbrand
  • 1,149
  • 2
  • 8
  • 16
  • 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