I have really strange problem with my servers. I have two servers, both with same processors, hard disks and everything else except RAM. First one have 16GB DDR3, the second one is with 32GB. On the first one the OS is Ubuntu server 10.04.4, on the second - Ubuntu server 11.04.
So .. here is the problem. I have relatively heavy php/mysql application running on both. On the first one I have 3 instances of the application, on the second just one, but the second server is much slower. (I`ve tripple checked the config files for apache, mysql and php) and they are absolutely the same. When I run ab on the first one from localhost:
ab -n 1000 -c 100 http://local_page/
Concurrency Level: 100
Time taken for tests: 5.056 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 26133000 bytes
HTML transferred: 25721000 bytes
Requests per second: 197.77 [#/sec] (mean)
Time per request: 505.642 [ms] (mean)
Time per request: 5.056 [ms] (mean, across all concurrent requests)
Transfer rate: 5047.15 [Kbytes/sec] received
On the second one the situation is different:
Concurrency Level: 100
Time taken for tests: 20.593 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 28437000 bytes
HTML transferred: 28024000 bytes
Requests per second: 48.56 [#/sec] (mean)
Time per request: 2059.296 [ms] (mean)
Time per request: 20.593 [ms] (mean, across all concurrent requests)
Transfer rate: 1348.54 [Kbytes/sec] received
From what I see the second one, which imo should perform better is much slower. I don't have any more ideas what to tweak to speed up the second server. I know it is shot in the dark, but could you point me to some general guides to check what is wrong ?
On the first server, when I have many users I have high cpu and ram usage (as expected), on the second one - even when many users are connected I have about 50% top cpu usage and about 50% used ram. Disk reads aren't intensive. Most used process is mysql, which on the second server rarely goes over 50% cpu usage and 5% ram usage acording to top
. Maybe the best idea for now is to force mysql to use as much resources as it can.