in reply to Re^3: A Perl Daemon
in thread A Perl Daemon
Good point. The reason mod_perl does not meet my needs is because the code these scripts will be running does a lot of forking. The scripts do a lot of qx()'ing and system()'ing and such. And while I have tried to influence those writing these scripts not to do this, the problem persists. After all there are some good reasons to qx(). I tried mod_perl for quite some time and while much much faster I was getting strange behavior from Apache. Once I moved to CGI the strange behavior (i.e. defunct processes, unkillable children(hung on sockets), out of semaphore space errors, etc) cleared up completely. That is why I begrudgingly moved off of mod_perl.
My base problem here is that I have a number of scripts that use a large complex of code. That complex of code is so large that this perl -MBigModuleTree -e 1 takes an average of 1.1 seconds. Yeah, it is pretty bad. So I am looking for a way to preload the BigModuleTree.pm thus reducing the time it takes to execute these scripts and also hopefully bringing the load down on the box.
Hope this clears things up a bit.