[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Apache::ASP StatINC in production
From:       Joshua Chamas <joshua () chamas ! com>
Date:       1999-05-31 8:49:10
[Download RAW message or body]

Hey,

I've been having the common problem of having to restart my 
server every time I update a perl module.  Because of performance
issues, I don't use StatINC in production.

I'm looking into extending StatINC for Apache::ASP with 
a configuration option StatINCMatch which would be 
a regular expression that would match the name of libraries
in %INC to check for reloading.  

This would allow one to specify a small subset of perl libraries
to stat checking for modification times each request.  The idea 
here is that particular libraries are updated as much as scripts for
a particular ASP application, and reloading these upon modification
is as important as reloading modified includes and scripts.

I benched the impact of this config option on an ASP script:

Type				Requests/sec
----				------------
No StatINC			24		
StatINCMatch for < 10 libs	18
StatINC				6

For my purposes, a performance hit of 25% is pretty negligible,
as I don't have a high volume site, and this will save me from
having to stop & then start the www server upon changing my ASP perl libs.
This restart of the www server is awful in production, as it cuts the 
connection to the client browser promptly upon shutdown.

The above solution assumes that you haven't had much luck
with reloading modules via PerlFreshRestart On, and a graceful restart.
I had no such luck.

As an aside, the only module that I can't get to reload is Class::Struct,
but I got around this by using the module like so:

use Class::Struct;
unless(keys %Struct::NameSpace::) {
	struct(Struct::NameSpace => { #struct def })
}

Thoughts?

Joshua

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic