Batara Kesuma wrote:
> I will try to move all standard modules to startup.pl. Do I need to delete
> the standard modules from the scripts after I moved them to startup.pl? I
> mean, after I moved:
> use MyModule;
>
> to startup.pl, do I need to delete it from the scripts? Or Perl Run will
> automatically figure out that it has already been loaded and simply ignore
> the one in the scripts?
>

No, no, you shouldn't delete anything at all. Perl uses the %INC hash to track what was loaded already. Perhaps it'll benefit you to read a good perl book or at least this document:
http://perl.apache.org/docs/general/perl_reference/perl_reference.html


I have this setting on my httpd.conf:
<IfModule prefork.c>
StartServers 8 MinSpareServers 5
MaxSpareServers 20
ServerLimit 300 MaxClients 300
MaxRequestsPerChild 1000
</IfModule>


Any idea on how can I tweak this setting?

Please read: http://perl.apache.org/docs/1.0/guide/performance.html in particular http://perl.apache.org/docs/1.0/guide/performance.html#Performance_Tuning_by_Tweaking_Apache_Configuration

Since you are running prefork mpm, most of these mod_perl 1 notes apply to your mod_perl 2 setup.

I would also run "top -d 1" while your webserver is running without
mod_perl to see what scripts are causing the load.  Do you have a
database running on the same system?  Do you know if it might be doing
more work?


The database server is on another machine, but I think I should try to
preload DBI module, and see the result.

I just noticed that the load was going down after I restarted httpd. Is
this because of my scripts have bugs? I think I have some DBI connect
without disconnect in my scripts. I will try to fix this and see how is
the result.

You can always monitor this using the database tools. Also consider using Apache::DBI. it's all the document I've mentioned above.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Reply via email to