in reply to Re^2: CPU usage on external UNIX host
in thread CPU usage on external UNIX host

If you have shell access to the server, running top, vmstat, sar, mpstat (if it's a multiple CPU system) and iostat are good indicators of system performance. Details are in the manpages.

Specifically for your code, though, I'd highly suggest benchmarking your code with Devel::NYTProf, or at least Benchmark (comes with perl). That should help isolate where in your code memory is getting chewed up.

I'd also suggest some putting some logging in your code, so you can go back and troubleshoot why the memory usage from your CGI was high, and ideally, to be able to recreate the problem on a test system.

Without seeing any of your code, I can't give anything specific.

-- Burvil