Hateburo: kazeburo hatenablog

Operations Engineer / Site Reliability / 運用系小姑 / Perl Monger

Starlet and Monoceros reached 100kreqs/sec

Preforking Plack::Handler, Starlet and Monoceros reached 100kreq/sec on my "Hello World" benchmark.

Starlet

$ plackup -s Starlet -E produnction --max-workers 40 --max-reqs-per-child 50000 \
            -max-keepalive-reqs 10000 -e 'sub{[200,[],["Hello World"]]}'
$ ./wrk -c 32 -t 8 -d 5 'http://x.x.x.x:5000/'
Running 5s test @ http://x.x.x.x:5000/
  8 threads and 32 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   301.15us  275.23us   5.10ms   93.20%
    Req/Sec    13.94k     4.07k   24.67k    68.37%
  522853 requests in 5.00s, 68.81MB read
Requests/sec: 104596.67
Transfer/sec:     13.77MB

Monoceros

$ plackup -s Monoceros -E produnction --max-workers 40 --max-reqs-per-child 50000 \
            -max-readahead-reqs 10000 -e 'sub{[200,[],["Hello World"]]}'
$ ./wrk -c 32 -t 8 -d 5 'http://x.x.x.x:5000/'
Running 5s test @ http://x.x.x.x:5000/
  8 threads and 32 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   307.28us  620.04us 105.67ms   99.85%
    Req/Sec    13.41k     1.51k   18.67k    71.66%
  502953 requests in 5.00s, 67.15MB read
Requests/sec: 100597.58
Transfer/sec:     13.43MB

Softwares and Hardwares

$ carton install
Installing modules using cpanfile
You have EV (4.15)
You have HTTP::Parser::XS (0.16)
You have Starlet (0.20)
You have Monoceros (0.23)
You have Guard (1.022)
You have Plack (1.0029)

A benchmark tool and web servers were executed at different hosts.
Two hosts are connected via 1Gbps ethernet and a switch.
Both server have two Xeon L5630 2.13GHz (4core/8thread) CPU