ngx_lua now has (basic) subrequest support

Akins, Brian Brian.Akins at turner.com
Sat Jun 26 16:59:52 MSD 2010


On 6/25/10 9:59 PM, "agentzh" <agentzh at gmail.com> wrote:

> Are you sharing lua vm instance across all your requests in an nginx
> worker process? The 30k footprint of a lua vm per nginx worker process
> is not light-weight enough in your opinion?

Yes. Sharing the instance.

It's the CPU overhead (and the memory usage when you get a large amount of
"objects."  In profiling, Lua becomes the major CPU hog.  And, not lua doing
useful stuff, just doing "Lua-isms."  Still tons faster than everything
else.  Most of our Lua was really just thin wrappers over C libraries, so we
went straight to C and saw large improvements.  If you don't need absolute
best performance, Lua is fine and we are still looking to use it more.  I'd
love to see Lua replace php :)
 

> And yeah, there's also a ngx_tcc module in our TODO list. We'd like to
> use C as a dynamic language in nginx.conf just like lua, by means of
> TCC (Tiny C Compiler):

Well, we just dlopen the "config libraries" we build :) TCC is fast at
compiling, but the compiled code seems to be slower than gcc.
 
-- 
Brian Akins




More information about the nginx-devel mailing list