Performance improvement of Drupal 5 against 4.7

Drupal 5 has been released for a while. It comes with lots of changes in APIs as well as in the core engine. One of the reason to drive changing the core engine of Drupal is performance. If you remember the performance comparision of Ruby on Rails, Django and Symfony (read here) last year, the performance result was Django, Ruby on Rails and Symfopy, respectively. Django was outperformed because Python is generally run faster than the rest. Moreover, PHP is always the slowest one even with any kind of accelerator.

Anyway, Drupal may break above results. It's just a matter of time. Drupal 6 is one of the promising CMS I imagine.

Dries performed a benchmark to compare the performance of Drupal 4.7 and Drupal 5 in some criteria. Both test sites are initialized as follow.

  • 2,000 users
  • 5,000 nodes
  • 5,000 path aliases
  • 10,000 comments
  • 250 vocabulary terms
  • 15 vocabularies

Actually, Drupal 5 site was exactly copied from the Drupal 4.7 site and then upgraded to Drupal 5 for this benchmark. The results are very interesting. Dries benchmarked both system in various scenarios.

  • Drupal 4.7 no cache
  • Drupal 5 no cache
  • Drupal 4.7 cache
  • Drupal 5 normal cache
  • Drupal 5 aggressive cache

For more information about cache in Drupal 5, read below brief explanation by Dries.

Furthermore, a Drupal 5 installation has two caching modes: normal database caching and aggressive database caching. The normal database cache is suitable for all websites and does not cause any side effects. The aggressive database cache causes Drupal to skip the loading (init) and unloading (exit) of enabled modules when serving a cached page. This results in an additional performance boost but can cause unwanted side effects if you skip loading modules that shouldn't be skipped.

As a result, Drupal 5 no cache may be slightly slower than Drupal 4.7. However, Drupal 5 normal cache will run roughly 2 times faster than Drupal 4.7 cache and about 6 times faster than no cache mode. Moreover, Drupal 5 aggressive cache will be faster than Drupal 4.7 cache about 3 times.

If we notice the number in more details, the first page of Drupal 5 is served about 150 requests per second and more than 200 requests per second in aggressive cache mode. It outperformed Django comparing to the benchmark last year. Anyway, this is an unfaired comparison because they are performed on different machines and different contents.

Don't trust me.

Tags: , , , ,

Er...

the performance result was Django, Ruby on Rails and Symfopy, respectively. Django was outperformed because Python is generally run faster than the rest.

Huh? Did Django win or didn't it?

hard to say which one is the fastest

These benchmarks are not fair at all because of many factors.

  1. Content rendering - content/block
  2. Templates
  3. URL - simple/complex (native or alias)
  4. Sizes - table/tableless

Actually, IMHO, these benchmarks just indicate the performance of Python, Ruby and PHP. Comparing these web frameworks are not easy like that. We have to use the same contents or similar algorithms implemented in different styles and different frameworks. In other words, the output of the page must be similar and it must be the same URL. Otherwise, the benchmark will not reflect the whole framework but only some part of them, e.g., URL dispatching and tempates.

Post new comment