Re: Q: How to improve CGI performance for this?



customers simultaneosly, and is causing problems with my shared hosting
provider (reportedly 25% CPU load at some times).

<Snip possible causes of action>

The first thing to do is to identify if there is any one (or more) parts of your app that can be improved, in terms of speed. To do that you need a profiler.

Once you improved those parts you can then determine if maybe you need to go with an "always loaded" solution to avoid the startup/shutdown penalty of your script running. I think that would be mod-perl but you'll need someone other than I to advise on that.

I'd advise against just jumping ship to PHP/Python/Ruby in the hope that a different interpreted language will be faster (it may be in some areas, but be slower in others) - you won't find out until you've put a lot of effort in.

If you are on Windows (you didn't say) you can use Perl Performance Validator to get a performance profile of your application. No need to modify your app. PPV is targeted at ActiveScipt's Perl implementation.

http://www.softwareverify.com/perlPerformanceValidator/index.html

Stephen
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk/software.html
Computer Consultancy, Software Development
Windows C++, Java, Assembler, Performance Analysis, Troubleshooting
.



Relevant Pages

  • Re: program runs almost twice as slow on 2 CPU machine when 1 CPU
    ... I would suspect interrupts... ... it would be a good idea for you to learn what interrupts are ... stopped dead in its tracks when CPU load, ... case 1, run two app concurenlly, both app takes 12 minutes ...
    (microsoft.public.win32.programmer.kernel)
  • Re: more on timing problems
    ... > to the CPU load: during an application startup phase I've got many ... > errors, but then, event if the app is consuming a lot of CPU time the ...
    (microsoft.public.development.device.drivers)
  • PerformanceCounter (CPU load) staggers for 20 seconds
    ... PerformanceCounter.NextValue to measure CPU load as a percentage. ... In production code I'm calling PerformanceCounter.NextValue from a separate ... but it still seems to "freeze" ALL currently running threads of my ... app - nice 20 second delay :-) ...
    (microsoft.public.dotnet.framework)