Page is a not externally linkable
Frank_Rizzo - 6:41 pm on Feb 12, 2012 (gmt 0)
The OP states 'in the past few weeks ... more traffic ... server slows down'.
It was fine before but now not is. The change is increase in traffic.
This looks like an optimisation issue. Your mysql and apache settings are not optimal.
download and run the following scripts:
mysqltuner.pl
apache_mem.sh
They will show how much memory is being used by MySQL and apache. the tuner script will also offer suggestions as to what to tune.
As for apache you may have the server installed with default parameters which is just wasting your memory. You will need to tune some of them just so slightly and then check if the memory footprint reduces.
For Apache you want to be looking at changing
Keep Alives / Timeouts
Minspare servers
maxrequestsperchild
For MySQL change
timeouts
buffer sizes
---
The quickest option is to just put more ram in the box. RAM is dirt cheap. You could put 8Gb in there for around $50 bucks (depending on type required, depending on if your DC will charge an exorbitant monthly fee).
Note too that your O/S may not be able to see more than 4Gb. In this case you just need to tune apache and / or MySQL.