Squid performance tuning

Squid performance tuning

sbin/squid -v
Squid Cache: Version 2.5.STABLE4
configure options:  --enable-gnuregex --enable-htcp --enable-snmp --enable-storeio=aufs,ufs,null --enable-time-hack --prefix=/usr/local/squid --enable-truncate --enable-poll --enable-async-io

ab -c300 -n 1000000 -X schnecke:8001 http://www.wikipedia.org/favicon.ico
This is ApacheBench, Version 1.3d <$Revision: 1.70 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking www.wikipedia.org (be patient)
Completed 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
Completed 500000 requests
Completed 600000 requests
Completed 700000 requests
Completed 800000 requests
Completed 900000 requests
Finished 1000000 requests
Server Software:        Apache/1.3.29
Server Hostname:        www.wikipedia.org
Server Port:            80

Document Path:          /favicon.ico
Document Length:        318 bytes

Concurrency Level:      300
Time taken for tests:   906.481 seconds
Complete requests:      1000000
Failed requests:        0
Broken pipe errors:     0
Total transferred:      662008606 bytes
HTML transferred:       318004134 bytes
Requests per second:    1103.17 [#/sec] (mean)
Time per request:       271.94 [ms] (mean)
Time per request:       0.91 [ms] (mean, across all concurrent requests)
Transfer rate:          730.31 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    10   20.6      9  3009
Processing:    85   262   49.0    255  1712
Waiting:       33   261   49.0    255  1711
Total:         85   271   51.2    265  3278

Percentage of the requests served within a certain time (ms)
  50%    265
  66%    274
  75%    280
  80%    284
  90%    306
  95%    324
  98%    375
  99%    457
 100%   3278 (last request)

#################################

Newer version with poll enabled:
sbin/squid -v
Squid Cache: Version 2.5.STABLE4-20040219
configure options:  --enable-gnuregex --enable-htcp --enable-snmp --enable-storeio=aufs,ufs,null --enable-time-hack --prefix=/usr/local/squid --enable-truncate --enable-poll --enable-async-io

ab -c300 -n 1000000 -X schnecke:8001 http://www.wikipedia.org/favicon.ico
This is ApacheBench, Version 1.3d <$Revision: 1.70 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking www.wikipedia.org (be patient)
Completed 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
Completed 500000 requests
Completed 600000 requests
Completed 700000 requests
Completed 800000 requests
Completed 900000 requests
Finished 1000000 requests
Server Software:        Apache/1.3.29
Server Hostname:        www.wikipedia.org
Server Port:            80

Document Path:          /favicon.ico
Document Length:        318 bytes

Concurrency Level:      300
Time taken for tests:   678.515 seconds
Complete requests:      1000000
Failed requests:        0
Broken pipe errors:     0
Total transferred:      662001986 bytes
HTML transferred:       318000954 bytes
Requests per second:    1473.81 [#/sec] (mean)
Time per request:       203.55 [ms] (mean)
Time per request:       0.68 [ms] (mean, across all concurrent requests)
Transfer rate:          975.66 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0     6   18.6      5  3012
Processing:    81   198   33.0    188   500
Waiting:       32   197   33.0    187   499
Total:         81   203   37.4    193  3268

Percentage of the requests served within a certain time (ms)
  50%    193
  66%    198
  75%    201
  80%    205
  90%    267
  95%    282
  98%    294
  99%    300
 100%   3268 (last request)

##########################################
This is the newer, but with null cache_dir instead of aufs:
sbin/squid -v
Squid Cache: Version 2.5.STABLE4-20040219
configure options:  --enable-gnuregex --enable-htcp --enable-snmp --enable-storeio=ufs,null --enable-time-hack --prefix=/usr/local/squid --enable-truncate --enable-poll

ab -c300 -n 1000000 -X schnecke:8001 http://www.wikipedia.org/favicon.ico
This is ApacheBench, Version 1.3d <$Revision: 1.70 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking www.wikipedia.org (be patient)
Completed 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
Completed 500000 requests
Completed 600000 requests
Completed 700000 requests
Completed 800000 requests
Completed 900000 requests
Finished 1000000 requests
Server Software:        Apache/1.3.29
Server Hostname:        www.wikipedia.org
Server Port:            80

Document Path:          /favicon.ico
Document Length:        318 bytes

Concurrency Level:      300
Time taken for tests:   703.552 seconds
Complete requests:      1000000
Failed requests:        0
Broken pipe errors:     0
Total transferred:      662025818 bytes
HTML transferred:       318012402 bytes
Requests per second:    1421.36 [#/sec] (mean)
Time per request:       211.07 [ms] (mean)
Time per request:       0.70 [ms] (mean, across all concurrent requests)
Transfer rate:          940.98 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0     6    3.7      5   112
Processing:    87   204   33.1    195   464
Waiting:       31   204   33.1    194   463
Total:         87   211   32.1    201   465

Percentage of the requests served within a certain time (ms)
  50%    201
  66%    206
  75%    209
  80%    212
  90%    275
  95%    293
  98%    306
  99%    312
 100%    465 (last request)

##################################################
now with all logging enabled:
 sbin/squid -v
Squid Cache: Version 2.5.STABLE4-20040219
configure options:  --enable-gnuregex --enable-htcp --enable-snmp --enable-storeio=ufs,null --enable-time-hack --prefix=/usr/local/squid --enable-truncate --enable-poll --enable-useragent-log --enable-refer-log

ab -c300 -n 1000000 -X schnecke:8001 http://www.wikipedia.org/favicon.ico

Server Software:        Apache/1.3.29
Server Hostname:        www.wikipedia.org
Server Port:            80

Document Path:          /favicon.ico
Document Length:        318 bytes

Concurrency Level:      300
Time taken for tests:   810.758 seconds
Complete requests:      1000000
Failed requests:        0
Broken pipe errors:     0
Total transferred:      662002648 bytes
HTML transferred:       318001272 bytes
Requests per second:    1233.41 [#/sec] (mean)
Time per request:       243.23 [ms] (mean)
Time per request:       0.81 [ms] (mean, across all concurrent requests)
Transfer rate:          816.52 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0     5    3.3      4   108
Processing:    82   238   30.7    231   639
Waiting:       28   237   30.7    230   638
Total:         82   243   29.7    236   640

Percentage of the requests served within a certain time (ms)
  50%    236
  66%    240
  75%    242
  80%    244
  90%    252
  95%    332
  98%    352
  99%    363
 100%    640 (last request)

 

httperf results (17.2.04, ~22:00 UTC)

[gwicke@zwinger gwicke]$ httperf --hog --server en.wikipedia.org --num-conn 1000 000 --ra 1 --timeout 5 --uri /upload/wiki.png
httperf --hog --timeout=5 --client=0/1 --server=en.wikipedia.org --port=80 --uri =/upload/wiki.png --rate=1 --send-buffer=4096 --recv-buffer=16384 --num-conns=10 00000 --num-calls=1
Maximum connect burst length: 1

Total: connections 3131 requests 3126 replies 3091 test-duration 3130.391 s

Connection rate: 1.0 conn/s (999.8 ms/conn, <=6 concurrent connections)
Connection time [ms]: min 7.4 avg 84.7 max 4979.7 median 11.5 stddev 430.1
Connection time [ms]: connect 31.1
Connection length [replies/conn]: 1.000

Request rate: 1.0 req/s (1001.4 ms/req)
Request size [B]: 82.0

Reply rate [replies/s]: min 0.0 avg 1.0 max 1.8 stddev 0.2 (626 samples)
Reply time [ms]: response 49.4 transfer 5.4
Reply size [B]: header 372.0 content 13819.0 footer 0.0 (total 14191.0)
Reply status: 1xx=0 2xx=3091 3xx=0 4xx=0 5xx=0

CPU time [s]: user 1115.91 system 2006.74 (user 35.6% system 64.1% total 99.8%)
Net I/O: 13.8 KB/s (0.1*10^6 bps)

Errors: total 40 client-timo 40 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0

 

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s