Thread: Apache2 + Mysql bencharmk ab 4 requests per second
hi,
it's official. have 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
best benchmar using apachebench is:
ab -n 500 -c 20 http://www.example.com/
by bench marked pretty hardware faults: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 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 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:
hard drive bench using hdparm -t /dev/sdacode:cpu blowfish machine 3192 mhz 3.450 cpu cryptohash machine 3192 mhz 369.540
so...that leaves me software configuration.code:/dev/sda: timing buffered disk reads: 780 mb in 3.01 seconds = 259.42 mb/sec
apache2.conf
i tested running apache2 startservers8,4 results got worse, default seems work best.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>
disabled logging in apache2.conf , virtualhosts, getting desperate
mysql, my.conf
i tested memory , swap key_buffer, right set 64m, tested 16m, 32m , 128m.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 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 , 128m seems provide best results... still extremely low:
requests per second: 4.40 [#/sec] (mean)
requests per second: 4.69 [#/sec] (mean) wow best result ever?!?!
removed dns queries apache2 , mysql, not take time resolve hostnames, ip based only.
tested dns (pointed @ google dns), tested network card, seems normal.
i'm out of ideas?!
p.s. sorry long post.
just few questions:
1. content page you're trying serve?
2. there programming language involved, or straight html?
3. have run benchmark against other webservers pages of similar length?
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] Apache2 + Mysql bencharmk ab 4 requests per second
Ubuntu
Comments
Post a Comment