Dec 7, 2011

Is Drupal 7 slow?

There are some performance issues with Drupal 7 currently on some server/server configurations.

As a start, you could try the 7.x-dev snapshot to see if there are any improvements.

  • Is your server is a shared hosting or your own server or local development environment?
  • Did you already use Drupal 6 in the same environment?
  • Did you enable the basic performance settings, like aggregating CSS/JS?
  • To do anything more, you will actually need to figure out what exactly is slow, there is often a specific bottleneck that is slowing down the whole site. As a start, you could enable devel.module and the query logging to see if there are any slow queries on that page.
  • If this is your own server, I strongly suggest to install and enable APC.

Most probably, you are hitting Avoid re-scanning module directory when multiple modules are missing. It happens if you have some missing modules in your installation.

Try to check your system table:

[php]SELECT name, filename FROM system WHERE type = 'module' AND status = 1 ORDER BY filename[/php]

And clean-up any modules that are still enabled but missing from the filesystem.

Overall, Drupal 7 is way more resource friendly and scalable then Drupal 6, other then some unfortunate regressions like this one.

Drupal 7 is optimized out of the box for large website featuring advanced cache features, reverse proxy, load balancer. You would say that this would make drupal 6 too fly, but there is noticable difference between drupal 6 and drupal 7 performace with same high end server setup.

Drupal 7 may let you down initially, but given the proper hardware and software environment, you can do wonders with drupal in terms of speed.

Drupal 7 uses too many files and like D6, it uses also too many SQL queries (in comparison with other CMS). So the first hit could take time, especially when you have a slow disk and files are not in OS cache.

In a normal situation, when cache is available, everything should be ok. There are many layer of cache: OS cache to avoid reading PHP files, opcode cache (like APC, not enabled by default) to avoid re-parsing PHP files, MySQL cache to avoid re-execute queries multiple times.

Morally, most of the time its not drupal, its probably the server at fault. Its true over the time drupal has evolved to be a resource hungry. But its only till you precise it that way. The fact is that drupal 7 is infact very resource friendly, since when it is used on a VPS with MemCache, APC installed then it flew like anything.

1 comment :

  1. johnny...

    This post is great. I realy love it!...