I administrate a virtual server with 16x Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz with a shitload of 32GiB system memory. The server is used as a web server and has 100 to 150 users at rush hour. In these times the server needs around 5 seconds to handle incoming requests. It is almost impossible to do anything.
The server itself runs Apache/2.2.22, MySQL 5.5.41-0ubuntu, PHP 5.3.10-1ubuntu3.16 and of course a self written web app that uses the CakePHP framework.
When the server isn't busy, mysqld takes about 90% cpu and when it is up to 350% cpu.
$ top
top - 02:58:11 up 6 days, 15:12, 1 user, load average: 1.00, 1.00, 0.85
Tasks: 91 total, 2 running, 89 sleeping, 0 stopped, 0 zombie
Cpu(s): 6.3%us, 0.0%sy, 0.0%ni, 93.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 33554432k total, 2455720k used, 31098712k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 2047796k cached
My assumption was that the server isn't using all of it resources and thus fails to handle more than 150 clients.
If the hardware were powerful enough to handle that amount of clients, what do I have to do to fix the very high load speed?