httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 松本 亮介 <matsu1...@gmail.com>
Subject Re: mod_mruby to provide an alternative to mod_lua
Date Mon, 21 Jan 2013 18:49:20 GMT
On 2013/01/21, at 22:17, MATSUMOTO Ryosuke <matsu1229@gmail.com> wrote:

> On 2013/01/21, at 22:03, Daniel Gruno <rumble@cord.dk> wrote:
> 
>> On 01/21/2013 01:59 PM, 松本 亮介 wrote:
>>> Hi Daniel,
>>> 
>>> I tested benchmark of mod_mruby.
>>> 
>>> test case are: <snip>
>> 
>> My main concern here is; is it thread-safe (or even thread-aware)?
>> Most people will be using 2.4 with the event MPM, which is threaded, not
>> the prefork MPM. I have no problems doing concurrency on the prefork
>> MPM, it's with the worker/event MPM that things start to go wrong.
>> 
> 
> mod_mruby is very fast in the prefork MPM, but is not thread-safe. 
> I try to implement thread-safe to mod_mruby. It's challenging!!
> 
> Thank you for your reply.
> 
> With regards,
> Ryosuke.
> 

Hi Daniel,

I have implemented thread-safe to mod_mruby. 

https://github.com/matsumoto-r/mod_mruby

So, mod_mruby work fine on worker and event MPM.  You can try this before ApacheCon.
I try it out again, and get some performance of mod_mruby.

1. benchmark on event MPM

$ ab -c 100 -n 100000 http://127.0.0.1/hello.mrb
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Finished 100000 requests


Server Software:        Apache/2.4.3
Server Hostname:        127.0.0.1
Server Port:            80

Document Path:          /hello.mrb
Document Length:        19 bytes

Concurrency Level:      100
Time taken for tests:   7.529994 seconds
Complete requests:      100000
Failed requests:        0
Write errors:           0
Total transferred:      16900000 bytes
HTML transferred:       1900000 bytes
Requests per second:    13280.22 [#/sec] (mean)
Time per request:       7.530 [ms] (mean)
Time per request:       0.075 [ms] (mean, across all concurrent requests)
Transfer rate:          2191.64 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       3
Processing:     1    6   1.4      7      12
Waiting:        1    6   1.4      7      12
Total:          1    6   1.4      7      15

Percentage of the requests served within a certain time (ms)
  50%      7
  66%      7
  75%      7
  80%      7
  90%      9
  95%      9
  98%      9
  99%     10
 100%     15 (longest request)


2. benchmark on worker MPM

$ ab -c 100 -n 100000 http://127.0.0.1/hello.mrb
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Finished 100000 requests


Server Software:        Apache/2.4.3
Server Hostname:        127.0.0.1
Server Port:            80

Document Path:          /hello.mrb
Document Length:        19 bytes

Concurrency Level:      100
Time taken for tests:   9.578192 seconds
Complete requests:      100000
Failed requests:        0
Write errors:           0
Total transferred:      16902873 bytes
HTML transferred:       1900323 bytes
Requests per second:    10440.38 [#/sec] (mean)
Time per request:       9.578 [ms] (mean)
Time per request:       0.096 [ms] (mean, across all concurrent requests)
Transfer rate:          1723.29 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   0.9      1       4
Processing:     1    8   0.9      8      29
Waiting:        0    3   1.2      3      29
Total:          1    9   1.2      9      29

Percentage of the requests served within a certain time (ms)
  50%      9
  66%     10
  75%     10
  80%     10
  90%     10
  95%     11
  98%     11
  99%     11
 100%     29 (longest request)


Mime
View raw message