Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.
share|improve this answer
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). techportal.ibuildings.com/2009/12/01/profiling-with-xhprof [1]: 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.