User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mojo:mojo-vs-sinatra-thin [2018-08-01 13:41] (current)
Line 1: Line 1:
 +=====Mojolicouis vs Sinatra + Thin=====
 +
 +I use the same login page code.
 +
 +Summary: 570req per sec Mojo, 312req per sec Sinatra+Thin. ​
 +I will think... =)
 +
 +====Mojo====
 +<​code>​
 +# ab -c 10 -n1000 ​ http://​localhost:​8082/​login
 +This is ApacheBench,​ Version 2.3 <​$Revision:​ 1663405 $>
 +Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://​www.zeustech.net/​
 +Licensed to The Apache Software Foundation, http://​www.apache.org/​
 +
 +Server Software: ​       Mojolicious
 +Server Hostname: ​       localhost
 +Server Port:            8082
 +
 +Document Path:          /login
 +Document Length: ​       2119 bytes
 +
 +Concurrency Level: ​     10
 +Time taken for tests: ​  1.738 seconds
 +Complete requests: ​     1000
 +Failed requests: ​       0
 +Total transferred: ​     2264000 bytes
 +HTML transferred: ​      ​2119000 bytes
 +Requests per second: ​   575.48 [#/sec] (mean)
 +Time per request: ​      ​17.377 [ms] (mean)
 +Time per request: ​      1.738 [ms] (mean, across all concurrent requests)
 +Transfer rate:          1272.34 [Kbytes/​sec] received
 +
 +Connection Times (ms)
 +              min  mean[+/-sd] median ​  max
 +Connect: ​       0    0   ​0.6 ​     0      11
 +Processing: ​    ​5 ​  ​17 ​  ​9.8 ​    ​15 ​     70
 +Waiting: ​       4   ​17 ​  ​9.8 ​    ​14 ​     70
 +Total: ​         5   ​17 ​  ​9.9 ​    ​15 ​     79
 +
 +Percentage of the requests served within a certain time (ms)
 +  50%     15
 +  66%     19
 +  75%     22
 +  80%     24
 +  90%     31
 +  95%     38
 +  98%     45
 +  99%     50
 + ​100% ​    79 (longest request)
 +</​code>​
 +
 +<​code>​
 +# ab -c 10 -n1000 ​ http://​localhost:​8081/​login
 +This is ApacheBench,​ Version 2.3 <​$Revision:​ 1663405 $>
 +Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://​www.zeustech.net/​
 +Licensed to The Apache Software Foundation, http://​www.apache.org/​
 +
 +Server Software: ​       thin
 +Server Hostname: ​       localhost
 +Server Port:            8081
 +
 +Document Path:          /login
 +Document Length: ​       2048 bytes
 +
 +Concurrency Level: ​     10
 +Time taken for tests: ​  3.197 seconds
 +Complete requests: ​     1000
 +Failed requests: ​       0
 +Total transferred: ​     2784000 bytes
 +HTML transferred: ​      ​2048000 bytes
 +Requests per second: ​   312.82 [#/sec] (mean)
 +Time per request: ​      ​31.967 [ms] (mean)
 +Time per request: ​      3.197 [ms] (mean, across all concurrent requests)
 +Transfer rate:          850.49 [Kbytes/​sec] received
 +
 +Connection Times (ms)
 +              min  mean[+/-sd] median ​  max
 +Connect: ​       0    0   ​0.1 ​     0       0
 +Processing: ​    ​4 ​  ​32 ​ 20.5     ​27 ​    129
 +Waiting: ​       4   ​31 ​ 20.5     ​27 ​    129
 +Total: ​         4   ​32 ​ 20.5     ​28 ​    129
 +
 +Percentage of the requests served within a certain time (ms)
 +  50%     28
 +  66%     33
 +  75%     40
 +  80%     46
 +  90%     62
 +  95%     74
 +  98%     89
 +  99%     97
 + ​100% ​   129 (longest request)
 +</​code>​
 +----
 +[<>]