It was thus said that the Great Akins, Brian once stated:
> On 6/7/10 9:16 AM, "Dan Poirier" <poir...@pobox.com> wrote:
> > Did you profile httpd?  I'm wondering if you had a few non-trivial hooks
> > in lua, if it would be a significant part of the CPU consumption, or
> > would it be swamped by the rest of the processing that always goes on
> > for a request?
> 
> 
> Increasingly, httpd is just there to provide a base to run Lua stuff for us.
> You'd be surprised how easily problems get solved with a few if's and else's
> instead of mounds of rewrite rules.
> 
> At "normal" load it doesn't really matter - the trade off is worth it
> ("speed" vs simplicity).  However, as the servers get more and more loaded,
> Lua takes a rather large percentage of the CPU. And it's the "Lua stuff" not
> the part that does work.  The constant string hashing, metatable lookups,
> etc.

  If your platform is x86, have you considered testing with LuaJIT?  It
compiles Lua code directly into x86 code and is a drop-in replacement for
lua (just link against libluajit instead of liblua).  The few tests I've
done have been impressive [1].

  -spc

[1]     http://boston.conman.org/2010/02/03.2

Reply via email to