guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Guile fibers server vs. varnish/lighttpd and SSL:nginx/varnish/lighttpd


From: Arne Babenhauserheide
Subject: Guile fibers server vs. varnish/lighttpd and SSL:nginx/varnish/lighttpd
Date: Sat, 15 Jul 2017 21:30:21 +0200

Hi,


I did a simple performance test of Guile fibers vs. my local setup which
(a) serves the lighttpd "it works" reply using varnish (varnish/lighttpd) and
(b) forwards that over SSL using nginx (nginx/varnish/lighttpd).

The Guile fibers server uses the following simple script:

- https://notabug.org/ArneBab/guile-base64server/src/master/server.scm#L135
- 
https://bitbucket.org/ArneBab/guile-base64server/src/aec8471fdeff/server.scm#server.scm-135

The system is an simple homeserver behind a cheap off-the-shelf
fritz-box which was already outdated when we got it around 4 years ago.
The server has two cores, clocked down to 800MHz, runs Gentoo GNU/Linux,
and is typically completely overloaded with 3-4 Freenet instances (only
the one with the WoT-plugin and Sone actually overloads it, the others
are around 10% load each).

I tested it with wrk. Here are three runs: One with 50 concurrent
requests, one with 100 concurrent requests, one with 200 concurrent
requests. With 200 concurrent requests, the latencies rise sharply.
The requests are fired from a remote box.


$ wrk -c 50 -t 3 -d 60s --timeout 15m http://d6.gnutella2.info:2342; wrk -c 50 
-t 3 -d 60s --timeout 15m http://d6.gnutella2.info:80; wrk -c 50 -t 3 -d 60s 
--timeout 15m https://d6.gnutella2.info   
Running 1m test @ http://d6.gnutella2.info:2342
  3 threads and 50 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   383.40ms  385.49ms   4.10s    91.35%
    Req/Sec    41.52      8.37    63.00     64.51%
  7508 requests in 1.00m, 1.13MB read
Requests/sec:    125.13
Transfer/sec:     19.31KB
Running 1m test @ http://d6.gnutella2.info:80
  3 threads and 50 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   500.32ms  505.07ms   6.90s    94.21%
    Req/Sec    26.70      5.40    41.00     66.59%
  4893 requests in 1.00m, 1.60MB read
Requests/sec:     81.55
Transfer/sec:     27.29KB
Running 1m test @ https://d6.gnutella2.info
  3 threads and 50 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   595.61ms  700.75ms   9.28s    92.21%
    Req/Sec    24.84      5.91    41.00     73.22%
  4303 requests in 1.00m, 1.49MB read
  Socket errors: connect 0, read 0, write 0, timeout 161
Requests/sec:     71.72
Transfer/sec:     25.36KB


$ wrk -c 100 -t 3 -d 60s --timeout 15m http://d6.gnutella2.info:2342; wrk -c 
100 -t 3 -d 60s --timeout 15m http://d6.gnutella2.info:80; wrk -c 100 -t 3 -d 
60s --timeout 15m https://d6.gnutella2.info
Running 1m test @ http://d6.gnutella2.info:2342
  3 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   927.76ms    2.86s   27.74s    97.13%
    Req/Sec    44.08     10.46    73.00     71.20%
  7867 requests in 1.00m, 1.19MB read
  Socket errors: connect 0, read 0, write 0, timeout 11
Requests/sec:    131.11
Transfer/sec:     20.23KB
Running 1m test @ http://d6.gnutella2.info:80
  3 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   605.29ms  874.02ms  11.70s    94.95%
    Req/Sec    29.18      7.80    45.00     61.41%
  5321 requests in 1.00m, 1.74MB read
  Socket errors: connect 0, read 0, write 0, timeout 18
Requests/sec:     88.68
Transfer/sec:     29.68KB
Running 1m test @ https://d6.gnutella2.info
  3 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.10s     3.19s   34.16s    97.20%
    Req/Sec    24.39      7.20    40.00     64.13%
  4320 requests in 1.00m, 1.49MB read
  Socket errors: connect 0, read 0, write 0, timeout 891
Requests/sec:     71.95
Transfer/sec:     25.36KB


$ wrk -c 200 -t 3 -d 60s --timeout 15m http://d6.gnutella2.info:2342; wrk -c 
200 -t 3 -d 60s --timeout 15m http://d6.gnutella2.info:80; wrk -c 200 -t 3 -d 
60s --timeout 15m https://d6.gnutella2.info
Running 1m test @ http://d6.gnutella2.info:2342
  3 threads and 200 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.63s     8.82s    0.96m    95.40%
    Req/Sec    43.75     10.14    78.00     71.72%
  7743 requests in 1.00m, 1.17MB read
  Socket errors: connect 0, read 0, write 0, timeout 95
Requests/sec:    129.05
Transfer/sec:     19.91KB
Running 1m test @ http://d6.gnutella2.info:80
  3 threads and 200 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     4.51s     7.28s   18.51s    78.77%
    Req/Sec    27.53      8.17    55.00     66.06%
  5106 requests in 1.00m, 1.67MB read
  Socket errors: connect 0, read 0, write 0, timeout 96
Requests/sec:     85.10
Transfer/sec:     28.50KB
Running 1m test @ https://d6.gnutella2.info
  3 threads and 200 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     4.02s    10.62s   49.52s    91.64%
    Req/Sec    23.12      7.30    39.00     68.04%
  3908 requests in 1.00m, 1.35MB read
  Socket errors: connect 0, read 0, write 0, timeout 2981
Requests/sec:     65.13
Transfer/sec:     23.02KB



Guile creates around 18% load (of 200% available on 2 cores combined).

Varnish creates around 6% load for varnish/lighttpd (lighttpd does not
create noticeable load here, it likely only gets hit one single time).

nginx creates another 6% load for nginx/varnish/lighttpd (total: 12%).


I hope these results are an interesting datapoint for you.
For all interpretations keep in mind that this box is really perpetually
overloaded (but the high load processes run with niceness 10).

Best wishes,
Arne
-- 
Unpolitisch sein
hei├čt politisch sein
ohne es zu merken

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]