Alexander Gladysh wrote:
Yes, I have been mulling over this all weekend.

Is there a greater demand for a Unicorn/php-fpm style fastcgi process
manager? If you set luafcgid to 1 worker thread and (let's say) 5 states,
then run a couple of them - you have basically a redundant, multiplexed,
single-threaded Lua FastCGI server.

I tested it and it runs fine, just uses significantly more memory:

1 luafcgid process w/10 threads and 50 states:
5828K total, 1384K resident

10 luafcgid processes w/1 thread and 5 states each:
46760K total, 12600K resident

On a 256MB slicehost (for example), that is starting to get painful.

I'm, personally, more interested in dedicated server hardware case. So
the RAM is not THAT big issue for me.

<...>

With 10 worker threads and nginx, "ab -c 10 -n 10
http://x.x.x.x/multiplex-test.lua"; gives almost 10 rps, each one taking just
over 1 sec. If any take 2 secs or more, then the webserver is serializing
requests.

Sorry for the stupid question, but you are of course, aware, that ab
-c 10 still runs in a single thread? (I'm asking because I've figured
this out only recently.)


Not sure about how it uses threads, but it certainly runs multiple connections simultaneously (on FreeBSD-7.2 at least). That test took only 1 second to run.

%ab -V
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

I found this in the ApacheBench changelog:

==========
http://svn.apache.org/viewvc?view=revision&revision=94782
----------
Modified Wed Apr 24 17:09:59 2002 UTC (7 years, 6 months ago) by aaron
File length: 52488 byte(s)
Diff to previous 94643 (colored)

Major improvement in concurrent processing for AB:
- Enable non-blocking connects.
- Prevent quasi-blocking mode apr_recv (which would prevent AB from
  multiplexing over the entire descriptor set).
- Catch other fatal apr_recv() errors.
----------

After looking at the C code for ab, it is not multi-threaded, true. But it definitely supports concurrent connections, using an event/poll model (just like lighttpd). So it will certainly suffice for such testing.

So far, I'm not sold neither for luafcgid, nor for Lua-fpm. But that's
only because I'm still thinking to write one of them myself (or even
both). :-)

Alexander.


Open source? I hope so, then I might borrow some stuff myself ;)


_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to