Last active
January 21, 2016 18:32
-
-
Save matsumotory/6930672 to your computer and use it in GitHub Desktop.
ngx_mruby vs lua-nginx-module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ /usr/local/apache/bin/ab -c 100 -n 100000 http://127.0.0.1/lua | |
Server Software: nginx/1.4.3 | |
Server Hostname: 127.0.0.1 | |
Server Port: 80 | |
Document Path: /lua | |
Document Length: 13 bytes | |
Concurrency Level: 100 | |
Time taken for tests: 7.197 seconds | |
Complete requests: 100000 | |
Failed requests: 0 | |
Write errors: 0 | |
Total transferred: 16900000 bytes | |
HTML transferred: 1300000 bytes | |
Requests per second: 13894.30 [#/sec] (mean) | |
Time per request: 7.197 [ms] (mean) | |
Time per request: 0.072 [ms] (mean, across all concurrent requests) | |
Transfer rate: 2293.10 [Kbytes/sec] received | |
Connection Times (ms) | |
min mean[+/-sd] median max | |
Connect: 0 0 0.3 0 12 | |
Processing: 2 7 0.8 7 25 | |
Waiting: 1 7 0.8 7 25 | |
Total: 5 7 0.8 7 25 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ /usr/local/apache/bin/ab -k -c 100 -n 100000 http://127.0.0.1/lua | |
Server Software: nginx/1.4.3 | |
Server Hostname: 127.0.0.1 | |
Server Port: 80 | |
Document Path: /lua | |
Document Length: 13 bytes | |
Concurrency Level: 100 | |
Time taken for tests: 2.691 seconds | |
Complete requests: 100000 | |
Failed requests: 0 | |
Write errors: 0 | |
Keep-Alive requests: 99006 | |
Total transferred: 17395030 bytes | |
HTML transferred: 1300000 bytes | |
Requests per second: 37156.92 [#/sec] (mean) | |
Time per request: 2.691 [ms] (mean) | |
Time per request: 0.027 [ms] (mean, across all concurrent requests) | |
Transfer rate: 6311.97 [Kbytes/sec] received |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ /usr/local/apache/bin/ab -c 100 -n 100000 http://127.0.0.1/mruby | |
Server Software: nginx/1.4.3 | |
Server Hostname: 127.0.0.1 | |
Server Port: 80 | |
Document Path: /mruby | |
Document Length: 13 bytes | |
Concurrency Level: 100 | |
Time taken for tests: 5.148 seconds | |
Complete requests: 100000 | |
Failed requests: 0 | |
Write errors: 0 | |
Total transferred: 12900000 bytes | |
HTML transferred: 1300000 bytes | |
Requests per second: 19423.42 [#/sec] (mean) | |
Time per request: 5.148 [ms] (mean) | |
Time per request: 0.051 [ms] (mean, across all concurrent requests) | |
Transfer rate: 2446.90 [Kbytes/sec] received |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ /usr/local/apache/bin/ab -k -c 100 -n 100000 http://127.0.0.1/mruby | |
Server Software: nginx/1.4.3 | |
Server Hostname: 127.0.0.1 | |
Server Port: 80 | |
Document Path: /mruby | |
Document Length: 13 bytes | |
Concurrency Level: 100 | |
Time taken for tests: 1.991 seconds | |
Complete requests: 100000 | |
Failed requests: 0 | |
Write errors: 0 | |
Keep-Alive requests: 99001 | |
Total transferred: 13395005 bytes | |
HTML transferred: 1300000 bytes | |
Requests per second: 50227.56 [#/sec] (mean) | |
Time per request: 1.991 [ms] (mean) | |
Time per request: 0.020 [ms] (mean, across all concurrent requests) | |
Transfer rate: 6570.30 [Kbytes/sec] received |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /lua { | |
content_by_lua 'ngx.say("hello lworld")'; | |
} | |
location /mruby { | |
mruby_content_handler_code 'Nginx.rputs "hello mworld\n"'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@matsumoto-r It's hugely important - did you use Lua or LuaJIT?