lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


--- PA <petite.abeille@gmail.com> wrote:
> Out of curiosity, what ApacheBench options did you
> use?
ab -n 10000 -c 100 -k


> 
> With 10 concurrent connections performing a thousand
> requests each 
> against HTTP.lua [1] running under tcpserver [2], I
> get the following:
> 
> % ../ucspi-tcp/tcpserver -o -D -H -l -R 0 1080 lua
> TestHTTP.lua&
> 
> % ab -n 1000 -c 10 http://localhost:1080/hello
> 
> Requests per second:    81.48 [#/sec] (mean)
> 
> Using persistent connections speed up things quite a
> bit as this 
> doesn't require to start a new VM for each request:
> 
> % ab -n 1000 -c 10 -k http://localhost:1080/hello
> 
> Requests per second:    819.00 [#/sec] (mean)
Wow, this result is impressive, I failed to see such a
jump in my case though, the -k doesn't seem to earn me
much(a bit but not 10x).

I would definitely want to put your server on my
WRT54G

> 
> Compiling your lua code (e.g. luac) does help a bit,
> specially if you 
> are under a CGI type of environment.

I finally ended up with a modified setup using
lua-magnet(fastcgi based bytecode cache/launcher)
together with kepler's cgi.lua as the wrapper and now
is getting 220 request / sec. Though I need to give up
the "rings" option.

What is interesting in this setup is that each .lp
only use about 30K memory foot print which means even
I have 1000 lua script, I can still have them all
cached in RAM for less than the virtual memory
footprint of a bare django/turbogear setup.



 
____________________________________________________________________________________
Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367