Hi, It's official. I have the worse apache2 + php + mysql ever running on Ubuntu server 10.04LTS 64x. Dual CPU Xeon 3,2 dual core = 8 cores 3GB RAM 800GB SAS My best benchmar using apachebench is: ab -n 500 -c 20 http://www.example.com/ Code:
Server Software: Apache/2.2.14 Server Hostname: www.example.com Server Port: 80 Document Path: / Document Length: 20590 bytes Concurrency Level: 90 Time taken for tests: 231.692 seconds Complete requests: 1000 Failed requests: 106 (Connect: 0, Receive: 0, Length: 106, Exceptions: 0) Write errors: 0 Total transferred: 18923080 bytes HTML transferred: 18410852 bytes Requests per second: 4.32 [#/sec] (mean) Time per request: 20852.285 [ms] (mean) Time per request: 231.692 [ms] (mean, across all concurrent requests) Transfer rate: 79.76 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.8 0 3 Processing: 99 20433 8935.3 21352 44022 Waiting: 99 19119 8354.0 20284 42850 Total: 99 20433 8935.3 21352 44022 Processor 8x Intel(R) Xeon(TM) CPU 3.20GHz Memory 3090MB (799MB used) Operating System Ubuntu 10.04.3 LTS CPU Bench using hardinfo: Code:
CPU Blowfish This Machine 3192 MHz 3.450 CPU CryptoHash This Machine 3192 MHz 369.540 Code:
/dev/sda: Timing buffered disk reads: 780 MB in 3.01 seconds = 259.42 MB/sec apache2.conf Code:
TimeOut 300 KeepAlive on MaxKeepAliveRequests 100 KeepAliveTimeout 5 <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule> <IfModule mpm_worker_module> StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule> Also I disabled all logging in apache2.conf and the virtualhosts, getting desperate MYSQL, my.conf Code:
[client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] #skip-innodb skip-name-resolve # END SKIPPING THINGS user = mysql socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp skip-external-locking bind-address = 127.0.0.1 key_buffer = 64M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 64 myisam-recover = BACKUP query_cache_limit = 64M query_cache_size = 128M query_cache_type = 1 join_buffer_size = 512K max_connections = 90 log_error = /var/log/mysql/error.log #log_slow_queries = /var/log/mysql/mysql-slow.log expire_logs_days = 2 max_binlog_size = 100M # Try number of CPU's*2 for thread_concurrency #thread_concurrency = 4 wait_timeout = 10 [mysqldump] quick quote-names max_allowed_packet = 16M [mysql] [isamchk] key_buffer = 16M #key_buffer = 150M #sort_buffer = 64M #read_buffer = 16M #write_buffer = 16M [myisamchk] #key_buffer = 150M #sort_buffer = 64M #read_buffer = 16M #write_buffer = 16M !includedir /etc/mysql/conf.d/ 64M and 128M seems to provide the best results... but still extremely low: Requests per second: 4.40 [#/sec] (mean) Requests per second: 4.69 [#/sec] (mean) WOW my best result ever?!?! Also removed all dns queries from apache2 and mysql, so it does not take time to resolve hostnames, IP based only. Tested DNS (pointed at google DNS), tested the network card, seems normal. I'm out of ideas?! p.s. Sorry for the long post. |