Welcome to the Geeks & God Static Archive. Read more »

Drupal forum performance

Anonymous's picture


I have migrated a large (~2 million comments, ~80K threads) forum from vBulletin to Drupal 5.8.

I'm using advanced forum. The performance is "very bad". I do not have a lot of experience with Drupal, so I'm trying to figure out the best way to go about fixing the performance problem. It looks like the problem is that Drupal made forums fit into it's architecture (of nodes, comments, and taxonomy), but for a modern forum, that architecture doesn't perform well.

I'm considering creating several tables to track data about the forums (e.g. post counts, last post, etc.) and using something like hook_nodeapi to track this.

Any suggestions? Maybe modules I should look into using?

Thanks for any help,


Joined: 09/05/2008
Not a particularly informed opinion...

This is not the world's most informed opinion, but if you are only do the migration now, I'd strongly suggest you look at upgrading to Drupal 6 rather than using Drupal 5.

Hang on, you said 5.8. I bet you mean 6.8, since Drupal 5 is up to 5.14.

May seem like an obvious question, but have you got caching etc turned on? Makes a huge difference... Administration > Performance...

G&G Podcast Host
Matt Farina's picture
Joined: 06/01/2006
2 Thoughts

First, when you talk about performance you didn't specify where the problem is. Whey you mean the performance is 'very bad' are you talking about a drain on your server, the server is taking a long time to generate a page, your mysql server is getting hit hard, it's taking a long time for pages to render, or some combination of these. When it comes to performance there are a lot of factors. For example, a page can be generated quickly by a server but it's setup causes the page to take a long time to render in a browser. Other times the server take a long time because of the setup. Can you be more descriptive.

Second, what environment are you hosting this in? Shared host (hope not), VPS, dedicated? Do you have drupals caching setup? Do you have an opcode cache? Memcache? MySQL Query cache? All of these make a difference with performance and most are not related to drupal.

With some more detail I can, hopefully, give you some better insight.

Matt Farina
Geeks and God Former Co-Host

Anonymous's picture
More Info

Matt - Great questions.

Here's a little more about my setup:

I'm running two linux (Ubuntu) servers - one web (apache 2.2) and one DB (MySQL 5.0). Each server has ~8GB RAM so the hardware should not be the issue (although it may not be configured correctly at the moment).

Here is a snipped from the MySQL config:

key_buffer = 256M
max_allowed_packet = 8M
table_cache = 512
sort_buffer_size = 8M
read_buffer_size = 4M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 128M
thread_cache_size = 8
query_cache_size = 64M
query_cache_limit = 1M
max_connections = 400

The slow query log shows many forum related queries. I have not had time yet to dig through these but at first glance there are many queries finding the last commenter on a thread.

Sorry, I've gotta run (wife is ready to go).

I'll keep you guys posted as I find out more.


G&G Podcast Host
Matt Farina's picture
Joined: 06/01/2006
Is Query Cache On?

Is the query cache on? Do you have query_cache_type = 1 in the conf file?

To see if it's running type this into mysql at it's command prompt:


If you have a chance can you post the slow queries, the times they are taking, and maybe and EXPLAIN of them from your server. If anything, we can find a way to speed up performance in general.

Matt Farina
Geeks and God Former Co-Host