Re: [Pas-dev] Apache, mod_perl and Preloading?
Status: Beta
Brought to you by:
mortis
From: Kyle R . B. <mo...@vo...> - 2003-05-02 15:53:29
|
> > Are not PSP files mostly content? Or at least commonly mostly content? > > Well, yes. But most of the psp's I've written are small. So the memory > usage was reasonable. A psp with a bunch of huge tables with a ton of > content could get out of hand quickly. I can see why you're going down the > preload path. Even with smaller psps, the code they compile into should still be shared. > > Ah. So pre-compilation and disabling dynamic-recompliation and StatInc > > should be _good_ things? > > Yes. Very good things. Good. > > Wouldn't the pre-compile/pre-load provide both a performance boost and > > a memory reduction (for the child processes)? There is an obvious > > overhead associated with pre-loading infrequently hit parts of the > > site/codebase, but unless the bulk of your site is mostly infrequently > > hit stuff, then pre-loading should be a win (both cpu and memory) right? > > THis is where it gets interresting. There's really one way to tell. > Benchmarks :) Yes. I don't have the time or resources to do proper benchmarks right now though. > > Hrm...that's an interesting possibility. Combiend with earlier > > proposals of compile-time (psp compile time) expansion of psp code > > into static content, that could provide more winnage... > > Well, yes. Sort of. Depending.... I have a funny feeling we're about to > reinvent SSI :) Nope. This has nothing to do with SSI or it's aproach IMO. > Cool, let me know how it goes. I just checked in a build-startup.pl that uses File::Find on the pas.documentRoot in the configuration file, and compiles all psp files that don't start with an underscore (that's just a convention that we've been using for included psp files, which might not result in a valid .pm file after compilaion). If your codebase compiles properly, that code compmiles every psp file at Apache startup and pre-loads it. I need to move the conditional recompile check logic out of the request handler and into the psp compiler...so it can get reused by the build-startup.pl Other than that, it looks like it works. One thing is that the .pm files generated from the .psp files end up being owned by root. Kyle -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |