View Issue Details

IDProjectCategoryView StatusLast Update
0000812XdebugUncategorizedpublic2020-03-12 17:01
Reporterngaur Assigned Toderick  
Status resolvedResolutionno change required 
Product Version2.2dev 
Summary0000812: excessive overhead while not enabled.

(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 Reproduce

I'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:

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 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



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.


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
2020-03-12 16:55 derick Severity major => feature
2020-03-12 17:01 derick Category Feature/Change request => Uncategorized