Re: Squid 3.2 performance question

From: Alexander Komyagin <komyagin_at_altell.ru>
Date: Thu, 22 Mar 2012 15:04:02 +0400

Hi all!

I've done some more testing for 3.1.15, 3.2.0.8, and 3.2.0.16 in order
to check if intercept mode is really matters. I've used ApacheBench for
this, sending 10000 requests (100 concurrent). Logs are attached
("intercept results 3.*" files).

From these we can conclude that:
 - Intercept mode doesn't really matter;
 - RSBAC-Net downgrades 3.1's performance 3x times, while 4x times for
3.2.0.8 and 3.2.0.16;
 - from ab's perspective 3.2.0.8 behaves similarly to 3.2.0.16 (however,
httperf would not agree with this).

According to httperf results I sent earlier (100 connects/s (total -
1000 connections) and 10 requests per connection), RSBAC-Net only
slightly downgrades 3.2.0.8's performance, but has a huge affect on
3.2.0.16.

So I made one more check with httperf to see if requests count matters
(see attached "request study"): with one request per connection 3.2.0.16
is doing very well.

IMHO, some small problem(s) was introduced in squid 3.2, that causes
downgrade of performance with RSBAC-Net comparing to 3.1, probably on
connection basis (since for 3.2.0.8 and 3.2.0.10 ApacheBench results are
the same). But in 3.2.0.10 this problem grown up and expanded on
per-request basis (since httperf results differ), slowing things down,
blocking and hence preventing squid to process concurrent
connections/requests effectively.

Hope this helps to clarify the problem.

-- 
Best wishes,
Alexander Komyagin

For "httperf --client=0/1 --hog --server x.x.x.x --rate=100
--num-conns=1000 --timeout=5 --num-calls=10" the results are:

Without RSBAC-Net:
          CONNS| REQS| REPLS|CONNS/s| REQS/s|REPLS/s|
All : 1000| 10000| 10000| 100| 999| 999|

With RSBAC-Net:
          CONNS| REQS| REPLS|CONNS/s| REQS/s|REPLS/s|
3.1 : 1000| 10000| 10000| 100| 999| 999|
3.2.0.7,8:1000| 10000| 10000| 93| 935| 935|
>3.2.0.10:1000| 8220| 8220| 67| 554| 554|
2 workers:1000| 8780| 8780| 65| 577| 577|

+++++++++++++++++3.1 (+RSBAC +intercept):

ab -n 10000 -c 100 http://10.0.100.1:80/index.html

Concurrency Level: 100
Time taken for tests: 9.259 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5200000 bytes
HTML transferred: 1770000 bytes
Requests per second: 1079.99 [#/sec] (mean)
Time per request: 92.593 [ms] (mean)
Time per request: 0.926 [ms] (mean, across all concurrent requests)
Transfer rate: 548.43 [Kbytes/sec] received

Connection Times (ms)
              min mean[+/-sd] median max
Connect: 0 0 0.3 0 2
Processing: 17 91 131.5 47 576
Waiting: 11 78 119.0 45 572
Total: 17 91 131.5 48 576

Percentage of the requests served within a certain time (ms)
  50% 48
  66% 50
  75% 50
  80% 50
  90% 216
  95% 555
  98% 572
  99% 573
 100% 576 (longest request)

+++++++++++++++++3.1 (+RSBAC -intercept)

ab -n 10000 -c 100 -X 10.0.0.89:3128 http://10.0.100.1:80/index.html

Concurrency Level: 100
Time taken for tests: 9.112 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5200000 bytes
HTML transferred: 1770000 bytes
Requests per second: 1097.51 [#/sec] (mean)
Time per request: 91.115 [ms] (mean)
Time per request: 0.911 [ms] (mean, across all concurrent requests)
Transfer rate: 557.33 [Kbytes/sec] received

Connection Times (ms)
              min mean[+/-sd] median max
Connect: 0 0 0.2 0 2
Processing: 19 91 168.7 36 709
Waiting: 16 82 161.8 33 699
Total: 19 91 168.7 37 709

Percentage of the requests served within a certain time (ms)
  50% 37
  66% 37
  75% 37
  80% 38
  90% 228
  95% 668
  98% 686
  99% 697
 100% 709 (longest request)

===============3.1 (-RSBAC +intercept)

Concurrency Level: 100
Time taken for tests: 3.318 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5200000 bytes
HTML transferred: 1770000 bytes
Requests per second: 3013.92 [#/sec] (mean)
Time per request: 33.179 [ms] (mean)
Time per request: 0.332 [ms] (mean, across all concurrent requests)
Transfer rate: 1530.51 [Kbytes/sec] received

Connection Times (ms)
              min mean[+/-sd] median max
Connect: 0 0 0.2 0 2
Processing: 12 33 43.1 31 873
Waiting: 8 28 43.1 26 872
Total: 12 33 43.2 32 874

Percentage of the requests served within a certain time (ms)
  50% 32
  66% 33
  75% 34
  80% 35
  90% 38
  95% 41
  98% 43
  99% 44
 100% 874 (longest request)

===============3.1 (-RSBAC -intercept)

Concurrency Level: 100
Time taken for tests: 4.059 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5200000 bytes
HTML transferred: 1770000 bytes
Requests per second: 2463.39 [#/sec] (mean)
Time per request: 40.594 [ms] (mean)
Time per request: 0.406 [ms] (mean, across all concurrent requests)
Transfer rate: 1250.94 [Kbytes/sec] received

Connection Times (ms)
              min mean[+/-sd] median max
Connect: 0 0 0.2 0 2
Processing: 13 40 36.9 40 755
Waiting: 10 35 36.6 33 747
Total: 13 40 36.9 40 756

Percentage of the requests served within a certain time (ms)
  50% 40
  66% 43
  75% 45
  80% 46
  90% 50
  95% 52
  98% 55
  99% 56
 100% 756 (longest request)

+++++++++++++++++3.2.0.8 (+RSBAC +intercept):

ab -n 10000 -c 100 http://10.0.100.1:80/index.html

Concurrency Level: 100
Time taken for tests: 18.769 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5210000 bytes
HTML transferred: 1770000 bytes
Requests per second: 532.79 [#/sec] (mean)
Time per request: 187.690 [ms] (mean)
Time per request: 1.877 [ms] (mean, across all concurrent requests)
Transfer rate: 271.08 [Kbytes/sec] received

Connection Times (ms)
              min mean[+/-sd] median max
Connect: 0 0 0.2 0 2
Processing: 5 187 273.5 52 811
Waiting: 4 185 272.3 52 811
Total: 7 187 273.5 53 811

Percentage of the requests served within a certain time (ms)
  50% 53
  66% 53
  75% 53
  80% 310
  90% 779
  95% 793
  98% 806
  99% 809
 100% 811 (longest request)

+++++++++++++++++3.2.0.8 (+RSBAC -intercept)

ab -n 10000 -c 100 -X 10.0.0.89:3128 http://10.0.100.1:80/index.html

Concurrency Level: 100
Time taken for tests: 18.344 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5210000 bytes
HTML transferred: 1770000 bytes
Requests per second: 545.14 [#/sec] (mean)
Time per request: 183.438 [ms] (mean)
Time per request: 1.834 [ms] (mean, across all concurrent requests)
Transfer rate: 277.36 [Kbytes/sec] received

Connection Times (ms)
              min mean[+/-sd] median max
Connect: 0 0 0.2 0 2
Processing: 5 183 293.9 42 859
Waiting: 5 181 292.6 42 858
Total: 7 183 293.9 43 859

Percentage of the requests served within a certain time (ms)
  50% 43
  66% 43
  75% 43
  80% 153
  90% 821
  95% 843
  98% 849
  99% 851
 100% 859 (longest request)

+++++++++++++++++3.2.0.16 (+RSBAC +intercept):
//for 1 worker config and 2 workers config results are the same

ab -n 10000 -c 100 http://10.0.100.1:80/index.html

Concurrency Level: 100
Time taken for tests: 17.620 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5220000 bytes
HTML transferred: 1770000 bytes
Requests per second: 567.55 [#/sec] (mean)
Time per request: 176.197 [ms] (mean)
Time per request: 1.762 [ms] (mean, across all concurrent requests)
Transfer rate: 289.32 [Kbytes/sec] received

Connection Times (ms)
              min mean[+/-sd] median max
Connect: 0 0 0.2 0 2
Processing: 12 173 273.9 29 885
Waiting: 7 166 268.0 28 884
Total: 14 173 273.9 29 885

Percentage of the requests served within a certain time (ms)
  50% 29
  66% 30
  75% 135
  80% 331
  90% 736
  95% 860
  98% 870
  99% 875
 100% 885 (longest request)

+++++++++++++++++3.2.0.16 (+RSBAC -intercept)
//for 1 worker config and 2 workers config results are the same

ab -n 10000 -c 100 -X 10.0.0.89:3128 http://10.0.100.1:80/index.html

Concurrency Level: 100
Time taken for tests: 16.620 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5220000 bytes
HTML transferred: 1770000 bytes
Requests per second: 601.70 [#/sec] (mean)
Time per request: 166.196 [ms] (mean)
Time per request: 1.662 [ms] (mean, across all concurrent requests)
Transfer rate: 306.73 [Kbytes/sec] received

Connection Times (ms)
              min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 7 166 264.1 29 884
Waiting: 6 159 258.2 28 883
Total: 9 166 264.1 29 884

Percentage of the requests served within a certain time (ms)
  50% 29
  66% 29
  75% 137
  80% 321
  90% 684
  95% 860
  98% 869
  99% 870
 100% 884 (longest request)

===============3.2.0.16 (-RSBAC +intercept) - 1 worker

Concurrency Level: 100
Time taken for tests: 4.120 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5220000 bytes
HTML transferred: 1770000 bytes
Requests per second: 2426.96 [#/sec] (mean)
Time per request: 41.204 [ms] (mean)
Time per request: 0.412 [ms] (mean, across all concurrent requests)
Transfer rate: 1237.18 [Kbytes/sec] received

Connection Times (ms)
              min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 8 41 1.9 41 42
Waiting: 8 40 2.1 40 41
Total: 10 41 1.7 41 43

Percentage of the requests served within a certain time (ms)
  50% 41
  66% 41
  75% 41
  80% 41
  90% 41
  95% 41
  98% 41
  99% 42
 100% 43 (longest request)

===============3.2.0.16 (-RSBAC -intercept) - 1 worker

Concurrency Level: 100
Time taken for tests: 4.125 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5220000 bytes
HTML transferred: 1770000 bytes
Requests per second: 2424.43 [#/sec] (mean)
Time per request: 41.247 [ms] (mean)
Time per request: 0.412 [ms] (mean, across all concurrent requests)
Transfer rate: 1235.89 [Kbytes/sec] received

Connection Times (ms)
              min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 9 41 1.9 41 43
Waiting: 8 40 2.1 40 42
Total: 11 41 1.8 41 43

Percentage of the requests served within a certain time (ms)
  50% 41
  66% 41
  75% 41
  80% 41
  90% 41
  95% 41
  98% 42
  99% 42
 100% 43 (longest request)

----------------------3.2.0.16 (-RSBAC +intercept) - 2 workers
//just to make sure workers are great

Concurrency Level: 100
Time taken for tests: 2.361 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5220000 bytes
HTML transferred: 1770000 bytes
Requests per second: 4235.30 [#/sec] (mean)
Time per request: 23.611 [ms] (mean)
Time per request: 0.236 [ms] (mean, across all concurrent requests)
Transfer rate: 2159.01 [Kbytes/sec] received

Connection Times (ms)
              min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 6 23 5.2 23 152
Waiting: 4 22 5.1 22 151
Total: 6 23 5.2 23 153

Percentage of the requests served within a certain time (ms)
  50% 23
  66% 24
  75% 24
  80% 24
  90% 24
  95% 24
  98% 28
  99% 32
 100% 153 (longest request)

+++++++++++++++++++++++++++++++++++++++++++++++Squid 3.2.0.8 + RSBAC

httperf --hog --timeout=5 --client=0/1 --server=10.0.100.1 --port=80 --uri=/ --rate=100 --send-buffer=4096 --recv-buffer=16384 --num-conns=1000 --num-calls=1
Maximum connect burst length: 1

Total: connections 1000 requests 1000 replies 1000 test-duration 9.991 s

Connection rate: 100.1 conn/s (10.0 ms/conn, <=1 concurrent connections)
Connection time [ms]: min 0.8 avg 1.0 max 1.6 median 0.5 stddev 0.1
Connection time [ms]: connect 0.2
Connection length [replies/conn]: 1.000

Request rate: 100.1 req/s (10.0 ms/req)
Request size [B]: 63.0

Reply rate [replies/s]: min 100.0 avg 100.0 max 100.0 stddev 0.0 (1 samples)
Reply time [ms]: response 0.9 transfer 0.0
Reply size [B]: header 349.0 content 177.0 footer 0.0 (total 526.0)
Reply status: 1xx=0 2xx=1000 3xx=0 4xx=0 5xx=0

CPU time [s]: user 1.91 system 8.08 (user 19.1% system 80.9% total 100.0%)
Net I/O: 57.6 KB/s (0.5*10^6 bps)

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

+++++++++++++++++++++++++++++++++++++++++++++++Squid 3.2.0.16 + RSBAC ( 1 request per connection )

httperf --hog --timeout=5 --client=0/1 --server=10.0.100.1 --port=80 --uri=/ --rate=100 --send-buffer=4096 --recv-buffer=16384 --num-conns=1000 --num-calls=1
Maximum connect burst length: 1

Total: connections 1000 requests 1000 replies 1000 test-duration 9.991 s

Connection rate: 100.1 conn/s (10.0 ms/conn, <=1 concurrent connections)
Connection time [ms]: min 0.9 avg 1.0 max 1.9 median 1.5 stddev 0.1
Connection time [ms]: connect 0.1
Connection length [replies/conn]: 1.000

Request rate: 100.1 req/s (10.0 ms/req)
Request size [B]: 63.0

Reply rate [replies/s]: min 100.0 avg 100.0 max 100.0 stddev 0.0 (1 samples)
Reply time [ms]: response 0.9 transfer 0.0
Reply size [B]: header 350.0 content 177.0 footer 0.0 (total 527.0)
Reply status: 1xx=0 2xx=1000 3xx=0 4xx=0 5xx=0

CPU time [s]: user 1.84 system 8.14 (user 18.5% system 81.5% total 100.0%)
Net I/O: 57.7 KB/s (0.5*10^6 bps)

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

+++++++++++++++++++++++++++++++++++++++++++++++Squid 3.2.0.16 + RSBAC ( 10 requests per connection )

httperf --hog --timeout=5 --client=0/1 --server=10.0.100.1 --port=80 --uri=/ --rate=100 --send-buffer=4096 --recv-buffer=16384 --num-conns=1000 --num-calls=10
Maximum connect burst length: 1

Total: connections 1000 requests 8260 replies 8260 test-duration 15.379 s

Connection rate: 65.0 conn/s (15.4 ms/conn, <=425 concurrent connections)
Connection time [ms]: min 8.5 avg 3017.1 max 7335.2 median 3017.5 stddev 1715.3
Connection time [ms]: connect 534.7
Connection length [replies/conn]: 10.000

Request rate: 537.1 req/s (1.9 ms/req)
Request size [B]: 63.0

Reply rate [replies/s]: min 505.6 avg 536.9 max 578.9 stddev 37.8 (3 samples)
Reply time [ms]: response 231.9 transfer 16.4
Reply size [B]: header 350.0 content 177.0 footer 0.0 (total 527.0)
Reply status: 1xx=0 2xx=8260 3xx=0 4xx=0 5xx=0

CPU time [s]: user 0.44 system 14.94 (user 2.8% system 97.1% total 100.0%)
Net I/O: 309.5 KB/s (2.5*10^6 bps)

Errors: total 174 client-timo 174 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0
Received on Thu Mar 22 2012 - 11:05:49 MDT

This archive was generated by hypermail 2.2.0 : Thu Mar 22 2012 - 12:00:06 MDT