High load - new server needed ?
I have a fairly large database intensive forum site hosted on a p4 2.8 with 2gb of RAM. Recently we have been receiving a lot more traffic than we have been and the server load has been consistantly high during peak times. This often results in poor performance onsite.I'm not sure how to proceed in order to fix this, the server we have cannot be upgraded any further, so a new one may be on the cards.
Here is an example top output during a server load spike at a busy time:
16:48:12 up 5 days, 21:46, 1 user, load average: 14.00, 9.49, 6.03
272 processes: 264 sleeping, 8 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 84.7% 0.0% 14.6% 0.0% 0.5% 0.0% 0.0%
cpu00 85.7% 0.0% 13.4% 0.0% 0.7% 0.0% 0.0%
cpu01 83.7% 0.0% 15.8% 0.0% 0.3% 0.0% 0.0%
Mem: 2047376k av, 2023892k used, 23484k free, 0k shrd, 49276k buff
1544700k actv, 293436k in_d, 32936k in_c
Swap: 2040212k av, 1656k used, 2038556k free 1102360k cache
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
20593 mysql 20 0 40716 39M 1344 R 12.8 1.9 0:05 1 mysqld
20368 mysql 20 0 40716 39M 1344 R 11.5 1.9 0:13 1 mysqld
20514 mysql 20 0 40716 39M 1344 R 11.1 1.9 0:11 0 mysqld
20845 mysql 25 0 40716 39M 1344 R 10.7 1.9 0:01 0 mysqld
20468 mysql 20 0 40716 39M 1344 R 10.2 1.9 0:13 1 mysqld
20824 nobody 16 0 9240 9240 4284 S 3.5 0.4 0:00 1 httpd
15491 nobody 15 0 21516 21M 14544 S 3.1 1.0 2:18 1 httpd
7687 nobody 15 0 13776 13M 8564 S 2.0 0.6 0:20 0 httpd
20653 nobody 15 0 10044 9.8M 4876 S 1.7 0.4 0:00 1 httpd
11674 nobody 15 0 15908 15M 9796 S 1.6 0.7 0:13 0 httpd
30685 nobody 15 0 18572 18M 11844 S 1.1 0.9 0:51 1 httpd
19412 nobody 15 0 9688 9688 4648 S 0.9 0.4 0:00 1 httpd
20614 nobody 16 0 10096 9.9M 4804 S 0.9 0.4 0:00 0 httpd
272 processes: 264 sleeping, 8 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 84.7% 0.0% 14.6% 0.0% 0.5% 0.0% 0.0%
cpu00 85.7% 0.0% 13.4% 0.0% 0.7% 0.0% 0.0%
cpu01 83.7% 0.0% 15.8% 0.0% 0.3% 0.0% 0.0%
Mem: 2047376k av, 2023892k used, 23484k free, 0k shrd, 49276k buff
1544700k actv, 293436k in_d, 32936k in_c
Swap: 2040212k av, 1656k used, 2038556k free 1102360k cache
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
20593 mysql 20 0 40716 39M 1344 R 12.8 1.9 0:05 1 mysqld
20368 mysql 20 0 40716 39M 1344 R 11.5 1.9 0:13 1 mysqld
20514 mysql 20 0 40716 39M 1344 R 11.1 1.9 0:11 0 mysqld
20845 mysql 25 0 40716 39M 1344 R 10.7 1.9 0:01 0 mysqld
20468 mysql 20 0 40716 39M 1344 R 10.2 1.9 0:13 1 mysqld
20824 nobody 16 0 9240 9240 4284 S 3.5 0.4 0:00 1 httpd
15491 nobody 15 0 21516 21M 14544 S 3.1 1.0 2:18 1 httpd
7687 nobody 15 0 13776 13M 8564 S 2.0 0.6 0:20 0 httpd
20653 nobody 15 0 10044 9.8M 4876 S 1.7 0.4 0:00 1 httpd
11674 nobody 15 0 15908 15M 9796 S 1.6 0.7 0:13 0 httpd
30685 nobody 15 0 18572 18M 11844 S 1.1 0.9 0:51 1 httpd
19412 nobody 15 0 9688 9688 4648 S 0.9 0.4 0:00 1 httpd
20614 nobody 16 0 10096 9.9M 4804 S 0.9 0.4 0:00 0 httpd
The CPU load however is very high, is this a sign that the demands of the site have finally exceeded what this server can cope with, or is there another solution that we are overlooking ?
If a new server is the answer, what sort of server setup would be best for a database intensive forum site like this ?
Thanks in advance.