I've been playing with Drupal fo a couple of weeks and I like the features that are available but I have some issues with the speed.

A regular php page with some sql queries takes about 0.3 seconds to run but a simple Drupal page with a basically empty database runs in 1.6 to 3 seconds. Is this what I should expect?

I've seen that Drupal is used by some large sites, so I assume that tuned properly it works well.

When I benchmarked the page it seems that the bootstrap process takes at least half the time and sometimes up to 3/4 of the time and that's mostly loading the modules. I've added some modules and will probabply add some more but they would be the ones of use for my site.

I'm on a shared hosting server so I don't expect that I can use any of the cached code options.

Is there an advantage to go with hosts that have their own Drupal setup. Do they cache the main modules for you?


robertDouglass’s picture

Especially for anonymous users.

- Robert Douglass

Lullabot | My Drupal book | My Digg RSS feed

BryanSD’s picture

Without really knowing how your host provider has setup the server, it's difficult to say how best to improve your performance. There is a number of caching features as Robert suggested that would work well for shared hosting, but if your traffic is low it could suggest there are other issues. For example, many shared hosting plans limit how many simultaneous connections you can make to the database server at one time. Some shared hosting companies also "over book" their servers with too many accounts.

In general, I've found that if you have about 25 users or less connecting to your site the performance of Drupal on a "regular" server should be fine. I've also found that if you don't really need the modules (whether core or contributed) you're better off deactivating them. These are just a few thoughts that come to mind as I watch the Kansas and Iowa State BB game...


rocnhorse’s picture

The traffic at the moment is non-existent as this is just me doing some testing.

Caching would speed it up some but wouldn't it still need to load all of the modules? That's what seems to take most of the time for the page.

The only way I see of reducing the modules is to remove functionallity that I want to use.

I've loaded it on 2 shared servers with different combanies with basically the same results. Loading the modules takes 1/2 to 3/4 of the page exicution time. (see below)

Maybe I should ask: How fast do your pages run and are you on a shared, Drupal optimized shared, VPS or dedicated server?

Full Page:		1402.490000
BootStrap:		934.720000
Bootstrap_0:		22.680000
Bootstrap_1:		6.450000
Bootstrap_2:		8.620000
Bootstrap_3:		5.820000
Bootstrap_4:		890.460000
_drupal_Bootstrap_Full.includes:		49.720000
_drupal_Bootstrap_Full.other:		0.220000
_drupal_Bootstrap_Full.modules:		827.020000
_drupal_Bootstrap_Full.modules_load:		761.940000
Wim Leers’s picture

I'm using >30 modules I think and can confirm it's quite slow (both on local testing machine as a shared server, on both WebSiteSource and DreamHost). My goal is to get pages to load in less than a second.

I'm currently testing eAccelerator (on my DreamHost account, which is also shared hosting, but they do allow this), but currently the MySQL server is very sucky, which completely voids the advantage of having a PHP opcode cache... lol

I will post back here when they've fixed the MySQL server problems.

Wim Leers’s picture

They've fixed the MySQL problems and all is running well! As a logged in user (admin actually, with the Devel module enabled, which might slow down things a little bit), I now get every page loaded in less than half a second, including all .css (I've got CSS aggregation enabled btw) and .js files AND I've got Adsense enabled.

This is just with ONE user accessing the content, but since I've enabled caching for anonymous users and have block cache installed as well, AND have eAccelerator running, only the MySQL server will get some more load, but NOT linearly with the number of users!

So 1) get a adequately fast MySQL server, 2) install eAccelerator on your webserver, 3) install the Block Cache module, enable Aggressive page caching (which will only be applied for anonymous users) and enable CSS aggregation (these last two are only available in D5), and you should get equal results.

voipfc’s picture

I have no desire to dampen your enthusiasm for Dreamhost but have a few points to make.

Dreamhost are probably the best when it comes to providing for a developer's needs, but when it comes to MySQL you are bound to be disappointed.

I am running a VPS which is underpowered by most VPS standards, yet most of my requests commands take less than 1 second.

With Dreamhost hardly anything comes below that. In fact I was experiencing the problem with Dreamhost probably at the same time as you did last night and had already decided a few days ago decided to switch development to my VPS. It is a production system I don't like to fiddle with it, where as with Dreamhost I can recompile stuff, use different cgi's etc.

Development is an interactive process and with something like Drupal you are bound to need those rapid response times.

They are still okay for most of my other needs and I still remain with them.
I suggest you save yourself the trouble of depending on Dreamhost at this stage. They offer as good a development environment as one can get, but if MySQL performance is critical you really have to reconsider.

If you Drupal needs are fairly demanding I suggest you get a good VPS to take you through the development cycle faster for the few months required, then switch to dreamhost later.

BryanSD’s picture

I've been an advocate of using a VPS and eAccelerator with Drupal sites for some time now. There isn't much I would disagree with your statement. However, I do understand the frustrations of those dealing with performance issues on shared hosting sites such as Dreamhost. Let's face it, if someone can run most other content management systems through their hosting account without any problems then Drupal is going to stick out there like a sore thumb.

The Handbook has some good suggestions for improving Drupal performance but assumes that you have control over your server. Perhaps those of us that have been around Drupal for awhile need to provide some guidance n the handbooks of what can be done for those that are limited to shared hosting accounts.


Nancy Nangeroni’s picture

I'm another user on shared hosting. In this case, I've got 2 independent Drupal 4.7 installations on the account, one of which is at least 5x slower than the other. Both use nearly the same module set, and changing modules didn't affect speed much anyway. Traffic shouldn't be a factor; neither is particularly busy (the slower generally has 1-3 other users online, the faster, 0). I used caching to eke what performance I could out of the slower site, but I'm somewhat perplexed. The biggest difference is the size of the two databases; the slower is about 5.5MB, the fast one 0.5MB. Is MySQL the likely culprit here? The larger database has many tables from modules I've tried and removed; ought I to delete these manually?

Thanks for your help; sorry if this is tedious.

BryanSD’s picture

I'm sorry no one has responded sooner. The factor here may not necessarily be the shared hosting of your Web pages or MySQL, but more than likely how the database server is configured. The majority of Web hosting companies how your site on one server and how the database on a separate server. Depending on how they have configured the servers along with the connections between the servers is likely the culprit here. Hosting companies may also limit how many connections to the database server can be made at one time.


Nancy Nangeroni’s picture

Thanks, Bryan, for responding. I'm sure you're right. I'm going to try upgrading the installation to 5.1 in the next few days, hopefully that will help. I'll try contacting tech support for my host, but I'm not optimistic there.


johnChristian’s picture

I am hosting my Drupal site on Siteground -- any other Sitegrounders out there feel my pain? Bryan, can you recommend a hosting company that offers an integrated web/data server solution for Drupal?


- John

What's the oldest book you've ever read?

BryanSD’s picture

Not really. At the moment, I'm in the hunt myself for a new hosting company also: http://drupal.org/node/164140 .

I tried something different over the summer, using a budget host plan. I've actually had some good luck with it too! You can read it on my blog at http://cmsreport.com/node/940. I was planning on moving to ResellerZoom.com (HostingZoom.com) this month but having some problems running Drupal sites there (they are a little stingy with their CPU/memory limits). In fact as I write this I currently have the DNS pointing to my RZ account ( so if it's slow...you know why).

I've heard good things about Site5.com but I don't like that they're still on MySQL 4 and not MySQL 5. So it goes...


solidad’s picture

I am hosting my site on siteground as well and kinda feel like I got suckered into their low price plan thing. Just a word of warning to anyone looking at siteground...They offer a low price, but they cripple alot of developer stuff. Can't do multi-sites without paying for that functionality among other things. I am going to be on the lookout for a new host once my site(s) are more complete. The only plus i can say is that their customer support is surprisingly good and at least pretty quick. Or I have been lucky all this time..Who knows....

kourosh.afsari’s picture

Hi guys, I'm using Dreamhost Dedicated server. but my Drupal 7 site's running quite slow, specially for logged in users... Did you guys find any solutions/tips ??

Christopher James Francis Rodgers’s picture

I notice that you posted your issue some time back.

Please be aware that you posted your topic
in the 'Deprecated' (no longer used) section of the forums.

That is likely why you never got any replies.

Please note that this "topic" had been "Deprecated"
and will not be seen by typical forum users.

The "Deprecated section of the Forums"
is not actively used and is intended as a library archive
collection of old posts.

The only notice it will get is via notifications
to this topic's 'followers'.

Please "Post new Forum topic" in one of the active forums.

In your case I recommend that you post in the forum
-- Post installation http://drupal.org/forum/22

All the best; intended.
-Chris (great-grandpa.com)
"The number one stated objective for Drupal is improving usability." ~Dries Buytaert *