nginx + lua and GC latency

Dave Bailey dave at
Sat Dec 8 21:25:12 UTC 2012


I am thinking of embedding Lua into nginx for some things where I need a
little more flexibility than my current module implementations allow.
Before I invest the time into this, I was wondering if any of you have
looked into the LuaJit GC latency.  Mike Pall has a wiki page outlining his
plans for a new GC in LuaJIT 3.0:

It sounds like he is not too thrilled with the performance of the current
(2.0) LuaJit GC, but I don't know if this means it's something I would need
to worry about, or if the latency of the current GC is fine.  Has anyone
done any profiling to measure this on nginx under "real" load (e.g. 1k-2k
req/s and 100-200+ Mbits/s bandwidth per worker, or somewhere in that
range)?  I like the flexibility that embedding LuaJit would give me, but
can't really afford GC pauses unless I know the latency is going to stay
below some reasonable value (maybe in the realm of 100 microseconds).

I am mainly interested in relatively simple Lua operations for now, such as
customized URL routing and other things that one could expect to be done
once per request.  Any info would be much appreciated.  Thanks-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx-devel mailing list