httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Mansion <bmans...@mamasam.net>
Subject Re: [mod_lua] vm management
Date Fri, 06 Feb 2009 14:40:48 GMT
On Fri, Feb 6, 2009 at 3:09 PM, Brian Akins <brian@akins.org> wrote:
> On 2/6/09 8:09 AM, "Bertrand Mansion" <bmansion@mamasam.net> wrote:
>
>> What do you call "slow" ? Do you have benchmarks ?
>
> Some round numbers:
> No Lua at all: 40k/sec
> Our hack version (based on older mod_wombat): 34k/sec
> New mod_lua: 20k
>
> Most of this it seems is from the lua states being created for every single
> request pool.  This is some lua that runs on every single request.

I was under the impression that creating new lua states was a very
inexpensive operation.
The hack version you refer to is probably not the old mod_wombat but a
custom made version with less overhead ? I remember you posting a
lua_request module source code some months ago.

>>  Do you have an
>> example of applications that could benefit from this ?
>
> Sure.  We have some lua that runs on (almost) every single request.  We do a
> fair bit of requests a second.  The build up and tear down of states - while
> cheaper than most scripting languages - is just unnecessary.  We are careful
> about variable scoping, etc.

What would happen exactly if one is not "careful about variable scoping" ?

>>Isn't this a
>> way to shoot yourself in the foot ?
>
> We already have several custom C modules, so we are more than comfortable
> with load once, run many times.
>
> Slightly OT: I had to stop using my work email for the list bcs the mailing
> list mail servers don't like our corporate mail server.  So, it looks like
> I'm just another hack.  A few folks can vouch for what I do with apache in
> my day job...

I don't want to sound rude (remember English is not my mother's
tongue), I am just trying to understand. I remember having met a lot
of problems with the old mod_wombat due to persistent states, even
with cache set to "never". In the end, I had to restart the server
each time I modified a lua source file. It seems that you suggest to
reintroduce features that would make this happen again.

-----
Bertrand Mansion
Mamasam

Mime
View raw message