httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akins, Brian" <>
Subject Re: C as config
Date Mon, 07 Jun 2010 21:42:42 GMT
On 6/7/10 9:16 AM, "Dan Poirier" <> 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,

So, just as a test I converted a large amount of Lua into C.  It was easy
enough and was a huge improvement.

So, just for Paul's benefit - we generate .so's from C ;)

Brian Akins

View raw message