Identifying D6 Performance Issue with Devel and xDebug

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
ISPTraderChris's picture

I'm having some trouble diagnosing a performance issue on my D6 site. Devel returns the following information:

Executed 131 queries in 129.41 milliseconds. Queries taking longer than 5 ms and queries executed more than once, are highlighted. Page execution time was 2941.81 ms.

Clearly the issue is not with queries. Next I ran xDebug to profile the script execution for this page. Here is the summary output from xDebug:

File: c:\documents and settings\administrator\sites\acquia-drupal-site\acquia-drupal\idex.php
Self time: - (-) Cumulative Time: 374ms (100.0%)

So i'm showing 130ms from Queries, and 375ms from script execution, but I can't for the life of me figure out why my page execution time is almost 3000ms. What am I missing here that could be accounting for the remaining 2500ms? Could this be some kind of Apache/PHP overhead?

I am running the Acquia-Drupal WAMP Stack (MySQL 5.1.3, PHP 5.2.9-1, Apache 2.2.11 w/ mod_php).

Thanks in Advance

Comments

Network?

kbahey's picture

There are several possibilities:

  1. Network:

Do you have a widget or a module that tries to contact another web site?

See how relying on connections to third party servers can be detrimental to performance.

In one case, a non writable directory for caching Google's Analytics javascript caused the (test) site to contact analytics' web site on each page load and getting the .js files and trying to cache it locally.

  1. Views:

Certain views versions mask reporting queries as queries, and hence the non query time is misleading. So, enable the devel hook that views have to see if that is the case. If your views are in blocks, you can install the block timing patch from views, quicktabs and template.php.

There can be other things, but start with these and then post back if they are no help.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

I stumbled upon the following

ISPTraderChris's picture

I stumbled upon the following php.ini configuration setting in my search for an answer on this:

realpath_cache_size=1M

Apparently 'looking up' file paths within the file system is fairly resource intensive. This directive reserves a 1MB cache for storing the results of these lookups.

After making this change, I'm seeing page execution times of around 1000ms -- which I believe is reasonable.