View Issue Details

IDProjectCategoryView StatusLast Update
0000812XdebugFeature/Change requestpublic2016-12-11 23:51
ReporterngaurAssigned Toderick 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Product Version2.2dev 
Target VersionFixed in Version 
Summary0000812: excessive overhead while not enabled.
Description(I'm actually using 2.2.0RC1, compiled from source, but that's not in the menu in the bug reporting system)

I'm seeing per-function call overhead in php processes, including a gettimeofday process, even when no tracing or profiling is enabled. This comes with a significant performance overhead such that I cannot leave the module loaded while not actively in use.

I'd like to be able to leave the module loaded routinely, for cookie triggered use only, but currently the overhead is just too high (about 250ms extra latency per page).

Steps To ReproduceI'm concerned with a large codebase, running in fastcgi, but the problem can be demonstrated with the following minimal test case, run from the command line:

<?php
array_shift($argv);
foreach ($argv as $arg) {
  print_it( "$arg\n");
}

function print_it ($printme) {
  print $printme;
}
?>

By passing in differing numbers of command line arguments, it can be observed that the number of calls to gettimeofday increments by one for each extra call to print_it(). If the module is not enabled or triggered, no other data collection should be required, and particularly no system calls.

When not loading the xdebug module at all, this is not the case.

My xdebug.ini file as used while testing contains only the zend_extension=...xdebug.so line. Ie profiling etc is disabled.



Additional Information
I'm unclear what severity to put this in at. With respect to the functionality offered by the trigger enabling functionality, this issue is major. It negates the ability to use xdebug to examine a live server without interrupting performance for public users. That said, for many use cases, its probably irrelevant.

requiring a server restart when xdebug is wanted means its not viable at all in some environments.
TagsNo tags attached.
Operating System
PHP Version5.2.6

Activities

thasmo

2013-04-13 20:02

reporter   ~0002454

I've also noticed this when using xdebug 2.2.2 on a Ubuntu VM using VirtualBox. I've disabled *quite all* obvious xdebug settings, but web pages need like 10 times longer than without xdebug installed. The only way to gain the normal performance is to remove the xdebug zend module from the php.ini. Is this by intention? It would be nice to enable debugging/profiling/tracing on demand with e.g. "profiler_enable_trigger". Now it seems xdebug runs on every request even if all settings are disabled. Should be a bug, no? I also tried xdebug 2.2.1. Same behaviour. I'm running Ubuntu Raring 64bit on VirtualBox with php-fpm "PHP Version 5.4.9-4ubuntu2" and apc 3.1.13 enabled.

derick

2016-12-11 23:51

administrator   ~0004015

This is a general "make things faster" request, that I can't really action on. Hence, I'm closing this issue.

Issue History

Date Modified Username Field Change
2012-04-17 12:34 ngaur New Issue
2013-04-13 20:02 thasmo Note Added: 0002454
2016-12-11 23:51 derick Note Added: 0004015
2016-12-11 23:51 derick Status new => resolved
2016-12-11 23:51 derick Resolution open => no change required
2016-12-11 23:51 derick Assigned To => derick