My server is running Apache 1.3.27. I have a perl program called ad.pl that sits in a cgi-bin directory. It is called from a remote web page like this:
This program is accessed about 6-10 times every second.
The program connects to MySQL, does a couple lookups, returns some data, and finishes. However, it seems like Apache and Perl are the bottlenecks here. If I run a ps -aux, I get about 100-150 of these Apache processes:
apache 13038 0.0 0.8 82972 4040 ? S 14:50 0:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd_app.
conf -DSSL -DSSL.default -D product_wp_module -D vwh_frontpage_module -D vwh_httpd_defines_module -D vwh_httpdmon_module -D vwh_perl_module -D vwh_php4_module
then there's about 10 MySQL processes, and then about 90 or so of these Perl processes:
admin3 24012 0.0 0.6 4296 3072 ? R 15:08 0:00 /usr/bin/perl -w ad.pl
MySQL is running on the my-medium.cnf configuration.
Can anyone offer some additional tips on speeding up Apache and Perl? (One thing that I noticed is that when PHP files run, they don't spawn a bunch of PHP executable processes like /usr/bin/php (like Perl is doing). This is a client's server, so I don't know EXACTLY how the server is set up, but I have a good idea. Thanks in advance!