msk_0984 has asked for the wisdom of the Perl Monks concerning the following question:

Respected Monks,

Firstly thank you very much for all the support provided through which we could learn and develop our technical standards.

Actually we are in the process of developing a Web-based Application using Perl and CGI, which should display a complete health status of the systems in the client env.

So, initially we have developed few web-based applications to monitor each system individually and also few multi-threaded applications

In case of multi-threaded application, I have a scenario to distribute a file to all the remote systems ( Keep env in sync )

- Using Multi Threading connect to all systems

- Take a backup of the existing file

- Replace it with the new one

- Check if the modifications does not raise any error.

Have used Perl v5.8.5 on FC 4 Linux and Solaris 9 Boxes tested the application. The application works fine but it takes time, since we use around 10 - 15 hosts.

Used Perl module Net::SSH::Expect and threads, Threads::Shared modules to connect to all the remote hosts using multi-threading ability.

Since the client is now asking for a Dashboard to show all the system health status, we are planning to use the multi-threading concept itself. But we need to make the processing more faster. The client is happy with everything but he needs more responsiveness. The application needs to be faster enough.

Please help me or let me know is there any way to enhance the performance and make the application process faster. The application would take atleast 1 or 1.5 min to process. Some times we need to increase the Apache timeout from 120 secs to 180 secs which is not a feasible solution.

Thanks In Advance

Sushil Kumar
  • Comment on Enhance the Web-Application processing time

Replies are listed 'Best First'.
Re: Enhance the Web-Application processing time
by marto (Cardinal) on Apr 15, 2009 at 11:53 UTC
Re: Enhance the Web-Application processing time
by Corion (Patriarch) on Apr 15, 2009 at 11:17 UTC

    For providing a status update, see Watching Long Processes Through CGI. Also, just prepare the machine status every 10 minutes and store it. That way the customer always sees a status while you can fetch the current status.

Re: Enhance the Web-Application processing time
by mr_mischief (Monsignor) on Apr 15, 2009 at 14:23 UTC

    You might want to use an established monitoring system for the dashboard part. Some of them can be made to monitor just about anything, since they can do SNMP or take custom plug-ins.

    Argus comes to mind as a very flexible one written in Perl. Others (not all written in Perl) like Big Brother, Big Sister, Nagios, and mon come to mind as well.