Suggested echo server implementation with HAProxy and Lua

General discussion about the NoScript extension for Firefox
Post Reply
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Suggested echo server implementation with HAProxy and Lua

Post by Thrawn »

I've been in contact with the HAProxy mailing list, and since version 1.6 (with Lua support), it's capable of a much more efficient echo server implementation for the ABE WAN feature.

Sample configuration:

Code: Select all

#haproxy.cfg
global
    lua-load echo.lua

frontend echo
    bind :80
    mode http
    http-request lua.echo

#echo.lua
core.register_action("echo", { "http-req" }, function (txn)
    local buffer = txn.f:src()
    txn.res:send("HTTP/1.0 200 OK\r\nServer: haproxy-lua/echo\r\nContent-Type: text/html\r\nContent-Length: " .. buffer:len() .. "\r\nConnection: close\r\n\r\n" .. buffer)
    txn:done()
end)
I've done a quick test of this with ab.

Apache+PHP at concurrency 100 typically takes 5-10ms to serve each request (tested up to 100000 total requests). However, at concurrency 1000, it frequently runs much slower (200-300ms) or hangs, even on much smaller total numbers of requests (1000-2000).

HAProxy+Lua at concurrency 100 returns 99% of requests within 2ms (most of them within 1ms). At concurrency 1000, it continues to perform the same way up to approximately 35000 total requests, after which (at least on my machine) a small percentage of requests apparently timeout and disconnect. I'm not sure whether that's a problem in HAProxy or a limitation of ab.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Suggested echo server implementation with HAProxy and Lu

Post by Thrawn »

OK, I've re-run tests in a more consistent fashion. This time, I used 30000 requests with concurrency 1000, every time, and I ran the test for each server 5 times.

Code: Select all

~  ᐅ ab -n 30000 -c 1000 -H 'Host: echo-local' http://127.0.0.1/echo.php
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking echo-local (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
Completed 30000 requests
Finished 30000 requests


Server Software:        Apache/2.4.12
Server Hostname:        echo-local
Server Port:            80

Document Path:          /echo.php
Document Length:        0 bytes

Concurrency Level:      1000
Time taken for tests:   14.364 seconds
Complete requests:      30000
Failed requests:        0
Total transferred:      4980000 bytes
HTML transferred:       0 bytes
Requests per second:    2088.62 [#/sec] (mean)
Time per request:       478.785 [ms] (mean)
Time per request:       0.479 [ms] (mean, across all concurrent requests)
Transfer rate:          338.59 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   11 104.5      0    1002
Processing:     1   66 852.1      5   14352
Waiting:        1   66 852.1      5   14352
Total:          3   78 861.4      5   14361

Percentage of the requests served within a certain time (ms)
  50%      5
  66%      5
  75%      5
  80%      5
  90%      5
  95%      6
  98%    206
  99%   1399
 100%  14361 (longest request)
~  ᐅ ab -n 30000 -c 1000 -H 'Host: echo-local' http://127.0.0.1/echo.php
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking echo-local (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
apr_socket_recv: Connection reset by peer (104)
Total of 29693 requests completed
~  ᐅ ab -n 30000 -c 1000 -H 'Host: echo-local' http://127.0.0.1/echo.php
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking echo-local (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
Completed 30000 requests
Finished 30000 requests


Server Software:        Apache/2.4.12
Server Hostname:        echo-local
Server Port:            80

Document Path:          /echo.php
Document Length:        0 bytes

Concurrency Level:      1000
Time taken for tests:   51.019 seconds
Complete requests:      30000
Failed requests:        0
Total transferred:      4943148 bytes
HTML transferred:       0 bytes
Requests per second:    588.01 [#/sec] (mean)
Time per request:       1700.641 [ms] (mean)
Time per request:       1.701 [ms] (mean, across all concurrent requests)
Transfer rate:          94.62 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   11  91.4      3    1005
Processing:     2  241 2791.0      7   51002
Waiting:        0   10  29.8      7     416
Total:          5  252 2792.3     10   51019

Percentage of the requests served within a certain time (ms)
  50%     10
  66%     11
  75%     11
  80%     11
  90%     12
  95%     13
  98%    208
  99%   1417
 100%  51019 (longest request)
~  ᐅ ab -n 30000 -c 1000 -H 'Host: echo-local' http://127.0.0.1/echo.php
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking echo-local (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
Completed 30000 requests
Finished 30000 requests


Server Software:        Apache/2.4.12
Server Hostname:        echo-local
Server Port:            80

Document Path:          /echo.php
Document Length:        0 bytes

Concurrency Level:      1000
Time taken for tests:   6.428 seconds
Complete requests:      30000
Failed requests:        0
Total transferred:      4980000 bytes
HTML transferred:       0 bytes
Requests per second:    4667.16 [#/sec] (mean)
Time per request:       214.263 [ms] (mean)
Time per request:       0.214 [ms] (mean, across all concurrent requests)
Transfer rate:          756.59 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        2    6  22.4      5    1006
Processing:     4   63 365.1     11    6406
Waiting:        3   61 365.3      8    6406
Total:          9   69 366.8     16    6421

Percentage of the requests served within a certain time (ms)
  50%     16
  66%     16
  75%     17
  80%     17
  90%     18
  95%    207
  98%    431
  99%   3219
 100%   6421 (longest request)
~  ᐅ ab -n 30000 -c 1000 -H 'Host: echo-local' http://127.0.0.1/echo.php
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking echo-local (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
apr_socket_recv: Connection reset by peer (104)
Total of 29654 requests completed
And an extra with 150000 requests (sum of the previous tests):

Code: Select all

~  ᐅ ab -n 150000 -c 1000 -H 'Host: echo-local' http://127.0.0.1/echo.php
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking echo-local (be patient)
Completed 15000 requests
Completed 30000 requests
Completed 45000 requests
Completed 60000 requests
Completed 75000 requests
Completed 90000 requests
Completed 105000 requests
Completed 120000 requests
Completed 135000 requests
Completed 150000 requests
Finished 150000 requests


Server Software:        Apache/2.4.12
Server Hostname:        echo-local
Server Port:            80

Document Path:          /echo.php
Document Length:        0 bytes

Concurrency Level:      1000
Time taken for tests:   62.774 seconds
Complete requests:      150000
Failed requests:        0
Total transferred:      24859662 bytes
HTML transferred:       0 bytes
Requests per second:    2389.52 [#/sec] (mean)
Time per request:       418.494 [ms] (mean)
Time per request:       0.418 [ms] (mean, across all concurrent requests)
Transfer rate:          386.74 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   14 127.0      5    7016
Processing:     3   85 1658.9     11   55481
Waiting:        0   21 115.8      9    7032
Total:          8   99 1664.6     16   55481

Percentage of the requests served within a certain time (ms)
  50%     16
  66%     16
  75%     17
  80%     17
  90%     18
  95%    211
  98%    220
  99%    854
 100%  55481 (longest request)
~  ᐅ 
HAProxy+Lua

Code: Select all

~  ᐅ ab -n 30000 -c 1000 http://127.0.1.1:1610/   
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.1.1 (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
Completed 30000 requests
Finished 30000 requests


Server Software:        haproxy-lua/echo
Server Hostname:        127.0.1.1
Server Port:            1610

Document Path:          /
Document Length:        9 bytes

Concurrency Level:      1000
Time taken for tests:   0.711 seconds
Complete requests:      30000
Failed requests:        0
Total transferred:      3510000 bytes
HTML transferred:       270000 bytes
Requests per second:    42182.05 [#/sec] (mean)
Time per request:       23.707 [ms] (mean)
Time per request:       0.024 [ms] (mean, across all concurrent requests)
Transfer rate:          4819.63 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       9
Processing:     0    1   1.7      1     208
Waiting:        0    0   1.7      0     208
Total:          0    1   1.7      1     217

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      1
  95%      1
  98%      1
  99%      1
 100%    217 (longest request)
~  ᐅ ab -n 30000 -c 1000 http://127.0.1.1:1610/
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.1.1 (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
Completed 30000 requests
Finished 30000 requests


Server Software:        haproxy-lua/echo
Server Hostname:        127.0.1.1
Server Port:            1610

Document Path:          /
Document Length:        9 bytes

Concurrency Level:      1000
Time taken for tests:   0.752 seconds
Complete requests:      30000
Failed requests:        0
Total transferred:      3510000 bytes
HTML transferred:       270000 bytes
Requests per second:    39900.14 [#/sec] (mean)
Time per request:       25.063 [ms] (mean)
Time per request:       0.025 [ms] (mean, across all concurrent requests)
Transfer rate:          4558.90 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.6      0      16
Processing:     0    1   1.6      1     199
Waiting:        0    0   1.6      0     199
Total:          1    1   1.8      1     213

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      1
  95%      1
  98%      1
  99%      1
 100%    213 (longest request)
~  ᐅ ab -n 30000 -c 1000 http://127.0.1.1:1610/
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.1.1 (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
Completed 30000 requests
Finished 30000 requests


Server Software:        haproxy-lua/echo
Server Hostname:        127.0.1.1
Server Port:            1610

Document Path:          /
Document Length:        9 bytes

Concurrency Level:      1000
Time taken for tests:   0.732 seconds
Complete requests:      30000
Failed requests:        0
Total transferred:      3510000 bytes
HTML transferred:       270000 bytes
Requests per second:    40995.48 [#/sec] (mean)
Time per request:       24.393 [ms] (mean)
Time per request:       0.024 [ms] (mean, across all concurrent requests)
Transfer rate:          4684.05 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0      10
Processing:     0    1   1.6      1     197
Waiting:        0    0   1.6      0     197
Total:          0    1   1.7      1     207

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      1
  95%      1
  98%      1
  99%      1
 100%    207 (longest request)
~  ᐅ ab -n 30000 -c 1000 http://127.0.1.1:1610/
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.1.1 (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
Completed 30000 requests
Finished 30000 requests


Server Software:        haproxy-lua/echo
Server Hostname:        127.0.1.1
Server Port:            1610

Document Path:          /
Document Length:        9 bytes

Concurrency Level:      1000
Time taken for tests:   0.744 seconds
Complete requests:      30000
Failed requests:        0
Total transferred:      3510000 bytes
HTML transferred:       270000 bytes
Requests per second:    40327.24 [#/sec] (mean)
Time per request:       24.797 [ms] (mean)
Time per request:       0.025 [ms] (mean, across all concurrent requests)
Transfer rate:          4607.70 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.5      0      13
Processing:     0    1   1.6      0     197
Waiting:        0    0   1.6      0     197
Total:          0    1   1.7      1     209

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      1
  95%      1
  98%      1
  99%      1
 100%    209 (longest request)
~  ᐅ ab -n 30000 -c 1000 http://127.0.1.1:1610/
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.1.1 (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
Completed 30000 requests
Finished 30000 requests


Server Software:        haproxy-lua/echo
Server Hostname:        127.0.1.1
Server Port:            1610

Document Path:          /
Document Length:        9 bytes

Concurrency Level:      1000
Time taken for tests:   0.911 seconds
Complete requests:      30000
Failed requests:        0
Total transferred:      3510000 bytes
HTML transferred:       270000 bytes
Requests per second:    32941.55 [#/sec] (mean)
Time per request:       30.357 [ms] (mean)
Time per request:       0.030 [ms] (mean, across all concurrent requests)
Transfer rate:          3763.83 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0      11
Processing:     0    1   2.0      1     200
Waiting:        0    0   2.0      0     200
Total:          0    1   2.1      1     210

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      1
  95%      1
  98%      1
  99%      1
 100%    210 (longest request)
~  ᐅ 
And 150000:

Code: Select all

~  ᐅ ab -n 150000 -c 1000 http://127.0.1.1:1610/
This is ApacheBench, Version 2.3 <$Revision: 1638069 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.1.1 (be patient)
Completed 15000 requests
Completed 30000 requests
Completed 45000 requests
Completed 60000 requests
Completed 75000 requests
Completed 90000 requests
Completed 105000 requests
Completed 120000 requests
Completed 135000 requests
apr_socket_recv: Connection reset by peer (104)
Total of 149866 requests completed
Summary: HAProxy+Lua takes a fraction of the time (1ms vs 5-15ms), and has a lower rate of disconnections/timeouts (although still some, at connection volumes over 30000).
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Suggested echo server implementation with HAProxy and Lu

Post by Thrawn »

OK, looks like ab is not really a reliable enough tool at the kind of concurrency I want to test.

I've re-tried with siege, using concurrency 500 at varying numbers of total requests, and have obtained some more consistent, usable results.

Apache+PHP:

Code: Select all

Trans,  Elap Time,  Data Trans,  Resp Time,  Trans Rate,  Throughput,  Concurrent,    OKAY,   Failed
--concurrent=500
 500000,      27.66,           0,       0.02,    18076.64,        0.00,      305.26,  500000,       0
 500000,      19.76,           0,       0.02,    25303.64,        0.00,      436.86,  500000,       0
 500000,      19.89,           0,       0.02,    25138.26,        0.00,      434.78,  500000,       0
 500000,      25.99,           0,       0.02,    19238.17,        0.00,      342.75,  500000,       0
 499999,      37.63,           0,       0.02,    13287.24,        0.00,      222.39,  499999,       1
 749999,      37.84,           0,       0.02,    19820.27,        0.00,      343.39,  749999,       1
 750000,      30.21,           0,       0.02,    24826.22,        0.00,      433.47,  750000,       0
 750000,      31.20,           0,       0.02,    24038.46,        0.00,      446.63,  750000,       0
 749999,      36.88,           0,       0.02,    20336.20,        0.00,      367.93,  749999,       1
 750000,      31.53,           0,       0.02,    23786.87,        0.00,      427.14,  750000,       0
1000000,      39.26,           0,       0.02,    25471.22,        0.00,      461.43, 1000000,       0
1000000,      39.46,           0,       0.02,    25342.12,        0.00,      456.17, 1000000,       0
 999979,      40.07,           0,       0.02,    24955.80,        0.00,      422.34,  999979,      21
1000000,      40.12,           0,       0.02,    24925.22,        0.00,      456.94, 1000000,       0
 999979,      39.59,           0,       0.02,    25258.37,        0.00,      416.96,  999979,      21
1499997,      60.59,           0,       0.02,    24756.51,        0.00,      464.05, 1499997,       3
1500000,      59.55,           0,       0.02,    25188.92,        0.00,      467.73, 1500000,       0
1499990,      59.91,           0,       0.02,    25037.39,        0.00,      455.65, 1499990,      10
1500000,      60.20,           0,       0.02,    24916.94,        0.00,      458.54, 1500000,       0
1500000,      60.39,           0,       0.02,    24838.55,        0.00,      468.18, 1500000,       0

--concurrent=750
2249978,      95.52,           0,       0.03,    23555.05,        0.00,      688.53, 2249978,      22
2249998,      95.60,           0,       0.03,    23535.54,        0.00,      700.56, 2249998,       2
HAProxy+Lua, 1 process:

Code: Select all

Trans,  Elap Time,  Data Trans,  Resp Time,  Trans Rate,  Throughput,  Concurrent,    OKAY,   Failed
--concurrent=500
 500000,      28.98,           4,       0.01,    17253.28,        0.14,      164.61,  500000,       0
 500000,      27.32,           4,       0.01,    18301.61,        0.15,      170.11,  500000,       0
 500000,      27.39,           4,       0.01,    18254.84,        0.15,      159.64,  500000,       0
 499970,      32.20,           4,       0.01,    15527.02,        0.12,      129.63,  499970,      30
 500000,      14.40,           4,       0.01,    34722.22,        0.28,      329.47,  500000,       0
 749985,      31.74,           6,       0.01,    23629.02,        0.19,      209.15,  749985,      15
 749955,      32.81,           6,       0.01,    22857.51,        0.18,      174.32,  749955,      45
 750000,      29.08,           6,       0.01,    25790.92,        0.21,      253.69,  750000,       0
 749989,      31.56,           6,       0.01,    23763.91,        0.19,      194.78,  749989,      11
 749965,      32.46,           6,       0.01,    23104.28,        0.18,      191.89,  749965,      35
 999975,      32.20,           8,       0.01,    31055.12,        0.25,      276.73,  999975,      25
 999994,      33.50,           8,       0.01,    29850.57,        0.24,      285.38,  999994,       6
 999969,      33.38,           8,       0.01,    29957.13,        0.24,      260.23,  999969,      31
 999947,      33.63,           8,       0.01,    29733.78,        0.24,      242.28,  999947,      53
 999999,      31.27,           8,       0.01,    31979.50,        0.26,      317.10,  999999,       1
1499983,      38.05,          12,       0.01,    39421.37,        0.32,      390.14, 1499983,      17
1499989,      36.71,          12,       0.01,    40860.50,        0.33,      407.91, 1499989,      11
1499996,      42.09,          12,       0.01,    35637.82,        0.29,      373.48, 1499996,       4
1499940,      48.67,          12,       0.01,    30818.58,        0.25,      270.53, 1499940,      60
1499928,      39.12,          12,       0.01,    38341.72,        0.31,      312.84, 1499928,      72

--concurrent=750
2249943,      65.67,          19,       0.02,    34261.35,        0.29,      525.41, 2249943,      57
HAProxy+Lua, 2 processes (each bound to 1 core):

Code: Select all

Trans,  Elap Time,  Data Trans,  Resp Time,  Trans Rate,  Throughput,  Concurrent,    OKAY,   Failed
--concurrent=500
 500000,      10.61,           4,       0.01,    47125.36,        0.38,      329.42,  500000,       0
 500000,      14.17,           4,       0.01,    35285.82,        0.28,      253.66,  500000,       0
 500000,      10.87,           4,       0.01,    45998.16,        0.37,      332.58,  500000,       0
 500000,      27.08,           4,       0.01,    18463.81,        0.15,      136.43,  500000,       0
 500000,      14.01,           4,       0.01,    35688.79,        0.29,      246.17,  500000,       0
 750000,      27.30,           6,       0.01,    27472.53,        0.22,      202.30,  750000,       0
 749979,      31.67,           6,       0.01,    23681.05,        0.19,      171.51,  749979,      21
 750000,      26.96,           6,       0.01,    27818.99,        0.22,      215.44,  750000,       0
 750000,      26.88,           6,       0.01,    27901.79,        0.22,      214.13,  750000,       0
 750000,      15.16,           6,       0.01,    49472.30,        0.40,      388.68,  750000,       0
1000000,      27.33,           8,       0.01,    36589.83,        0.29,      313.00, 1000000,       0
 999991,      31.45,           8,       0.01,    31796.21,        0.25,      260.17,  999991,       9
1000000,      27.13,           8,       0.01,    36859.57,        0.29,      309.87, 1000000,       0
 999991,      31.50,           8,       0.01,    31745.75,        0.25,      246.82,  999991,       9
1000000,      29.23,           8,       0.01,    34211.43,        0.27,      289.80, 1000000,       0
1500000,      30.78,          12,       0.01,    48732.94,        0.39,      427.32, 1500000,       0
1500000,      31.29,          12,       0.01,    47938.64,        0.38,      426.87, 1500000,       0
1500000,      30.28,          12,       0.01,    49537.65,        0.40,      417.86, 1500000,       0
1500000,      30.57,          12,       0.01,    49067.71,        0.39,      427.68, 1500000,       0
1500000,      31.49,          12,       0.01,    47634.17,        0.38,      419.04, 1500000,       0

--concurrent=750
2250000,      48.34,          19,       0.01,    46545.30,        0.39,      671.14, 2250000,       0
2250000,      49.68,          19,       0.01,    45289.86,        0.38,      666.21, 2250000,       0
tl;dr HAProxy 1-core < PHP < HAProxy 2-core
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Post Reply