Brief comparison of Drupal 6, Drupal 7 and Pressflow with the help of XHprof


The reports mentioned below have no particular practical value for web development because in real-life (modules installed, content created, users registrated etc) results are supposed to be completely different. That's why the given article is just an apt illustration of a profiler's real work ...

To demonstrate this I have installed 3 versions of CMF Drupal:

1) Drupal 6.20

2) Drupal 7.0

3) Pressflow 6.20.97

Then I launched the web server benchmark with the help of siege utility, thrice:

root@server:/# siege '' -d10 -r10 -c10
root@server:/# siege '' -d10 -r10 -c10
root@server:/# siege '' -d10 -r10 -c10

10 times of 10 compatible queries for each installation with interval of 1-10 sec in between.

In order to see the average data of all the three XHprof launches, we'll create total.php file in the directory of our html-interface that will parse identificators of launches and will redirect us to the actual average report:

if (!$_GET['namespace']) { 
  exit('there is no namespace in $_GET parameter.'); 

$namespace = (string)$_GET['namespace']; 
$path = ini_get('xhprof.output_dir'); 
$dir  = dir($path); 
$pattern = "/^([0-9a-z]{13})\.{$namespace}$/i"; 
while ($file = $dir->read()) { 
  if (preg_match($pattern, $file, $matches)) { 
    $files[] = $matches[1]; 

header(sprintf('Location: /xhprof_html?source=%s&run=%s', $namespace, implode(',', (array)$files)));

Now when we go to <xhprof_domain>/total.php?namespace=<name> we'll be given information about all XHprof launches for the specific namespace.

We've got the following results in our test (clickable):

             Drupal 6                                    Drupal 7                                Pressflow

Screeshots (clickable) of graphic interface are given below. The whole thing looks very complicated yet unlikely to render any practical use but it looks nice, like an insight into the inner scheme of Drupal work =)

             Drupal 6                                      Drupal 7                               PressFlow

It's better to use the data of graphic interface in case of profiling of small part of code.


As we see Pressflow showed the best results (average time of page generation is 109 milliseconds), on the second place almost without breakaway is Drupal 6.20 (114 milliseconds), and on the far third place is Drupal 7.0 (238 msec).

Though in reality Pressflow will show much better results in comparison with basic Drupal.

Another interesting point is that there are no "critical" points in Drupal 7.0 (i.e. red elements are absent).

And yes, experiment was repeated three times on different servers and Drupal 7 was behind with more than double breakaway...

5 votes, Rating: 5

Read also


CCK-formatters make up the code and are thus...


Popups have come so much into fashion, of late, and thus appealed to customers' sentiment that the public are starting growing more and more convinced: an ideal site has to be in popups. Whareas...


In the previous post I gave an example of Ctools modal API as being operated with a single form.In this one you'll be given an...

Very often there is a need to develop a site with multi-language support - possibility to translate site content on different languages. It's quite simple to do this task on Drupal, and such modules...

JavaScript code, just using php and DrupalForm API, based on the state of the second (or even on the basis of several elements), after any user's...

Need a quote? Let's discuss the project

Are you looking for someone to help you with your Drupal Web Development needs? Let’s get in touch and discuss the requirements of your project. We would love to hear from you.

Join the people who have already subscribed!

Want to be aware of important and interesting things happening? We will inform you about new blog posts on Drupal development, design, QA testing and more, as well news about Drupal events.

No charge. Unsubscribe anytime