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 10:29:35 GMT
On 2013/01/21, at 19:03, Daniel Gruno <rumble@cord.dk> wrote:

> On 01/21/2013 07:32 AM, 松本 亮介 wrote:
>> Hi Daniel.
>> 
>> Thank you for your comment. 
>> 
>>> I have tried to compile and install mod_mruby on my own machine to test
>>> it, but there are too many compiler errors for it to work :( In
>>> particular, you have a lot of declarations after statements in your
>>> code, which is not C90 compliant, and needs fixing. There are also some
>> 
>> Did you built mruby? If you don't build murky,  you try to build by bellow commands.
>> 
>> - mruby and mod_mruby build
>> git clone git://github.com/matsumoto-r/mod_mruby.git
>> cd mod_mruby
>> git submodule init
>> git submodule update
>> cd murby
>> rake
>> cd ..
>> ./configure --with-apxs=/usr/local/apache2222/bin/apxs --with-apachectl=/usr/local/apache2222/bin/apachectl
>> make
>> make install
>> 
>> - mod_mruby settings
>> cp -p test/test.mrb /usr/local/apache2222/htdocs/.
>> vi /usr/local/apache2222/conf/httpd.con
>> (snip)
>> LoadModule mruby_module       modules/mod_mruby.so
>> AddHandler mruby-script .mrb
>> (snip)
>> /usr/local/apache2222/bin/apachectl start
>> 
>> - mod_mruby test
>> http://youraddress/test.mrb
>> <snip>
> 
> Hi again,
> 
> I did manage to finally get mod_mruby running on my test server, after a
> lot of tweaking of your source code. In general, you should always
> compile your development modules using _maintainer mode_. This can be
> achieved when you configure the httpd source by running ./configure
> --enable-maintainer-mode. This should also make apxs run using
> maintainer mode, which will alert you to anything about the code which
> doesn't sit right with httpd and the standards we have laid out.

Thank you for your idea. I try to implement it.

> 
> As for how the module runs, I'll include mod_mruby in my talk a bit,
> showing how mod_lua compares to it as well as mod_php and mod_perl on
> httpd 2.4 (yes, mod_perl can be built for 2.4 ;) ).
> 
> While it shows a good performance - considering Ruby is generally a slow
> language - it does have serious performance issues once you start upping
> the concurrency on 2.4. At only 30 concurrent clients, I am getting a
> lot of disconnects and segmentation faults from mod_mruby, making it
> plummet down to 150 requests per second for a simple hello world script,
> and at 500 concurrent clients, it's as low as 50 requests per second,
> possibly because it crashes the server, which then has to re-spawn new
> workers all the time. I've uploaded a log of GDB at
> http://apaste.info/dsFz which you can possibly use to figure out why
> it's behaving like it does. There also seems to be a lot of other
> exceptions raised when just calling it with 1 client (mrb_exc_raise).

Sorry about that. Your apache mpm is worker, but now mod_mruby work properly
 on prefork mpm. In my future plans, mod_mruby will support thread model like 
event or worker mpm. I'm studying thread models to support event_mpm. 
Thank you for GDB log and I refer to it.

I have checked mod_mruby which work stable on Apache 2.4.2 preform mpm.

> 
> I hope you figure these things out, as mod_mruby is a welcome addition
> to the http server :). If you can get it to run stable on 2.4/2.5 before
> ApacheCon, I'd love to try it out again and get some proper performance
> tests going.
> 
> With regards,
> Daniel.

I'ts awesome! 

With regards,
Ryosuke.


----
MATSUMOTO Ryosuke < matsu1229 at gmail.com >
http://blog.matsumoto-r.jp/


Mime
View raw message