PHP script profiling software

Has anyone tried installing profiling software on their accounts?

I’m fairly new at running a site on a Linux-box after having run my site on a Win98 or Win2K server for over five years.

At present traffic levels, I’m getting about 70K hits/2K visits per day. I don’t think I have that busy a site, but it isn’t bad for a hobby site.

I turned on the CPU resources reporting when it became available and I’m doing 15-18 CPU minutes pre day, about half the recommended 30-40 per-day that DH wants per user on the shared servers.

Add to that the fact that one of my scripts, when confronted with my archived data takes a surprisingly long time to run, I wanted to see if I could get the script performance profiled so I can try to tweak it where it’d do the most good.

The scripts do a fair amount of disk accessing to determine what is available, so I suspect that’s where the biggest performance hit is occurring.

I don’t recall seeing that DH has anything at hand to do profiling. From the few debuggers I briefly looked at, I’d probably have to install my own instance of PHP on my account to tap. Something I’d rather not do (mainly because I’d be leery about installing my own software on DH’s server - if it was still my own, I’d do it in a blink).

Any thoughts? Recommendations? Pitfalls?



I’m also interested in profiling in trying to reduce CPU time and speed up responsiveness.

Are there any hooks or instructions on doing this in either PHP 4 or PHP 5?

It would be cool (and would probably benefit DH too) if DH provided “debug” version of PHP (via the control panel) that developers could switch to which would allow them to run profiling etcetera, or maybe a one-click install of a profiling tool? This would allow developers to not waste shared server resources and would speed up sites that took advantage of it.