0

Anyone maybe know is there Linux (debian) tool for testing PHP application performance? I want to check in witch places my PHP/MySQL script need optimization.

PsychoX
  • 175
  • 3

1 Answers1

0

If you want to profile your scripts and tweak performance under test conditions, have a look at xdebug.

For HTTP optimization, you could do a lot worse than firebug.

However that does not replace the need to tune the application as a whole - if you've got a script taking 30 seconds to complete which only gets run once a month - then its less of a priority then one which takes 5 seconds and is fired of 1000 times per hour.

AFAIK there's no free off-the-shelf solution - I added %D to my apache logs and use some custom code around that to identify problems areas (prioritized based on product of frequency and duration for each URL). I also use a modified version of this mysql log parser for my SQL code.

I'm currently in the process of evaluating Yahoo Boomerang and graphite for capturing large volumes of performance data.

There are commercial offerings - but

  • PHP support is limited
  • they are usually very expensive.
symcbean
  • 19,931
  • 1
  • 29
  • 49
  • 1
    xhprof (available in pecl) is a great addition to the tools you named, here is a tutorial on how to use it (the documentation is scarce). http://techportal.ibuildings.com/2009/12/01/profiling-with-xhprof/ [1]: http://pecl.php.net/package/xhprof – Shadok Sep 28 '11 at 12:58
  • For MySQL, unless the author of the code is an experienced DBA, just running EXPLAIN will probably help quite a bit. Check the Slow Query Log, and go from there. – Jason Antman Sep 28 '11 at 20:59
  • @Shadok: nice one – symcbean Sep 30 '11 at 11:32