Hi, I am about launching my drupal-Site but still need to know what I can expect about performance issues. I read about the database run on 4 Servers used by drupal could not handle just 50 users logged in at the same time, on the other hand the site here works quite well. As it seems to me that drupal works still fine with standard/core modules, but when additional functions should be add the appetite for hardware increase to dimensions I could not handle to pay for servers.

Now I would like to hear some experiences that not only say which hardware as I could read in the FAQ of this site, but with which modules installed and how many users logged in the systems slows down. It seems to me that without additional modules and with only unauthenticated users there's no problem, but if I want to build up a customized site I need this informations.

Anybody out there can telling me his/her configuration, user situation I would be very glad about. How about drupal.org, when there was a time of huge perfomance problems, now at this time with mostly core modules installed (no og, that's on another server), how many logged in users made the system suffer?
And how about other websites (user logged in users, not just news)?

Thanx a lot, Marenz

Comments

kbahey’s picture

I don't know where this 50 logged in user urban legend originated.

See my reply here with rebuttal from a 2 server site.

Additional modules will increase the load, but it depends on the specific module, and the size of its data.
--
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc.
Personal blog: Baheyeldin.com.

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

Anonymous’s picture

I answered you at http://drupal.org/node/213973#comment-709376 about this topic, I think it's very interesting and related to my question. But if anybody of the Drupal.org Server Team could bring more transparency in the conditions bring trouble to their servers last year I would be very glad. Thanx,

Anonymous’s picture

Hi, I found the post where somebody tells about his 30-50 users logged in-problem:

http://drupal.org/node/8183#comment-97065

Other posts made me think are:
http://drupal.org/node/50243
http://drupal.org/node/35909
http://drupal.org/node/137898#comment-224059
http://drupal.org/node/137898

For a community site it is important to know BEFORE I set up a Site how many logged in users cost me how much server resources. In Drupal seems to be not calculable, at least clear examples that compare resources and installed software with logged-in users are missing.

Don't understand me wrong - I am with Drupal and I enjoy the totally integrating everything system approach. I like the Forum style, that supports in my oppinion a better answering of the members. The more I am concerned about the issues above.

beryl’s picture

As other users point out, it´s important to know if the CMS system you are going to use can
pay for itself rather than having to pay for hardware instead!

For now, i have not seen ONE example of a site running a large community with
many logged in users on reasonable hardware.

If im going to choose a CMS system, i need to know that it is fast and not ONLY realiable and secure.

Why should i choose a system for it´s realiability and security if i have to spend money on hardware to run it,
then i can just as much pay the money i pay on the hardware, to tighten the security on the server and choose a simpler CMS.

sepeck’s picture

and has no 'right' answer.

The problem seems that you are looking for a magic answer that does not exist. Your site is different from my site is different from someone else' site.

The modules you use, the custom php/sql queries you run, the way you present information and how your theme operates all play a role.

http://www.workhabit.org/how-do-you-support-500-000-users-drupal

If I recall, drupal.org ran on one server (one server with both the MySQL, Web Server, Email List serv, CVS repository and 12-15 other sites) until it hit around 50,000-80,000 users. Currently it runs on more.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

jscoble’s picture

It should also be noted that server hardware itself covers a wide range of capabilities. It's like asking how much can a truck carry and will it be able to carry enough for my business. Are you talking about a pick-up, a semi or a mining truck? They are all trucks. And what are you do you want the truck to carry?

As for not seeing an example of high volume sites: what about this site, I'm sure there are more than 50 users at a time here, Onion's website, New York Oberver's, SonyBMG's, etc.

Even with the same modules, and general setup and hardware, server A may perform very differently than server B because of different tweaks done to the configuration, different webserver used, e.g. lighthttpd vs. apache, different datbase, etc. etc.

If these issues are that important to you, then consult with an expert that can provide do an assessment with you taking into consideration your needs, modules, etc. Then take their estimates as a ballpark figure since it won't really be known until it is implemented and you see what the usage patterns are really like.

Take anybody's specific reports about such things as being applicable to that specific situation/setup and not as a broad generalization of performance and capabilities.

Anonymous’s picture

Hi,

I am not expert in computers so I don't know how to monitor which sql-Queries are done. But I could find out how much at least. Here is a list of three CMS, one is drupal, another one is phorum, a php-based Forum claiming to take a fast running software most important, and the third one is a Ruby On Rails Website I programmed. OK, you can't compare them exactly but I put quite similar content in them at what they display is quite similar then. Drupal is the newest Drupal 5.7 Version, standard installation.
So let's have a look:

Number of mySQL-Queries
====================
Start page
i) drupal: 27
ii) phorum: doesnt have (all Forums displayed)
iii) RoR: 2

List 2 users
i) drupal: 27
ii) phorum: 12
iii) RoR: 6

Show user account details
i) drupal: 30
ii) phorum: 45
iii) RoR: 4

Forum Overview one Container two Forums
i) drupal: 35
ii) phorum: 24

List a Forumtopic with 6 comments
i) drupal: 52
ii) phorum: 51 (don't know what happens here to phorum, they have a seperate table that stores all read message ids for each user, probably thats the load here)

Reply-Button ("New Comment")
i) drupal: 42
ii) phorum: 22

Preview-Button
i) drupal: 57
ii) phorum: 14

Save-Button
i) drupal: 104 (what's up here with drupal saving a comment?!)
ii) phorum: 51

I also tested the same with apache ab, phorum can serve twice to four times more pages in one second (mostly around 9, drupal around 4), so it corresponds to the amounts of database requests.

Some additional thing: After I configured CCK and Views and displayed two users in a Views-Table with picture and to other fields, drupal caused "only" 35 database requests, as I thought CCK and Views would cause a lot of database requests this gave me at least some good surprise. But overall there seems to be some basement hunger of drupal.
I am very interested what causes drupal to do 27 database requests when just a page is listed and a menu. And why drupal needs double amount of requests more then phorum.
This question is important because it could give some possibilities to suffering sites for tuning, for example if the menu causes the 25 requests I would prefere to hardcode it in template or even in html then paying doble for a second server.

jscoble’s picture

Thanks for doing the comparisons and posting the results. Maybe comparing phorum to Drupal's forums would be better for comparative evaluation?

I would agree that Drupal places a heavy load on the DB and there is room for reducing the queries. This is due to various reasons that I'm sure people other than me would be able to answer better.

If you use the devel module, you can see the SQL queries being submitted and the time they take.

But more SQL statements are not necessarily a bad thing, it depends, as usual.

Yes, there will be times when site specific tuning will be needed, but that usually happens for any system under load. But different implementations and usage situations will have different performance bottlenecks, and when ever you do improve a bottleneck, another one will appear downstream.

Anonymous’s picture

I compared both forums. For this I created two forums in each of both systems, and one forum I filled with 6 comments/answers on each system, so they are equally designed.

Now I also know why after sending the comment in drupal it has SO many database queries. While Phorum (and smf also) forward to the topic list page, Drupal loads the commented discussion again. So if there are many comments on a topic drupal will load them all again, and I think that makes sense as in Drupal luckily one can answer to several levels of comments. In flat forums that's not possible and therefor not necessary to reload the discussion.

Well, but more than 100 queries are still a lot to save a comment and reload a page with 7 entries (topic and 6 comments)...

Anonymous’s picture

As jscoble gave me the idea to have a look with devel I couldn't wait what happens when I preview a single comment on a node.

I have not programed much in php yet, only RoR, so this is from RoR point of view. I would be glad if somebody knows php and drupal structure better can tell me why things are like this and if this gives possibility for faster versions in future. I found three things let me wonder a lot from RoR point of view, what happened when I pressed "preview comment":

A) 18 equally requests for fetching user object, in Rails would be one.
B) fetching node, in Rails would not be necessary as you just can pass the node-object to the next function need it. And when somebody presses on 'Preview' it's obvious it should be transfered, at least you could give the possibility to transfer to function and then prove if it's there in the function. Actually I think for loading the preview not even one database query would be necessary, as all the stuff is the same from the view before, like node, taxonomy, locale_supported_languages and so on.
C) A lot of session writing stuff, one costs even a 1/3 of second!

I can't find out about the code that's behind the queries, but from RoR that looks quite ineffecient right now, even if I think I must be wrong, there must be some reason why all the queries are done, so right now I am just curious about what's behind the queries. I just know so little about Drupal and programing php.

The more I learn about Drupal the more I am impressed by the work already done. The concept and structure is really cool, I could not invent this. So thanks a lot to the brains behind drupal. Drupal is in my opinion so great and I hope it also will be faster processing in the future.

beryl’s picture

This is exacly the comparison i was after.

I will try do do a fair comparison with all the greatest CMSés.

Im not able to test the one im most curious about though (Caravel)
Cant seem to be able to install it properly.

A note about Rails though, the Rails CMSés ive tested is much slower than drupal.
So there is something else that slows down the Rails CMS´s.

Anonymous’s picture

Yes, Rails is the highest developed programing language I've seen, that means you can achive a lot with very few code, which is in the RoR-Framework even more like this. But high developed means there's a lot of code behind that's working for you, and this makes Rails so slow. The Rails Code is just Fun to write and read, RoR even more, but it's slow in processing. So RoR also has some other weak point that drupal with php doesn't have. At least people say, I can't compare because what makes drupal slow are the database queries, so how (and why) we compare how fast the code runs.

Above all I think an easy to read framework or CMS like Drupal pays the price to be slower then other systems where you need weeks to understand why the code is written like this. I tried to understand phorum, I could'nt see any structure like drupal has. But I saw Joomla 1.5 and it seems to be very nice structured. But the concept behind Joomla is not so nice, admin panel confusing, limits for taxonomy and user roles (5, can't even define rights), user rights management, at the same time it's too full of options and you just need some of them for each project, but you see around 100 options for saving a node, that's too confusing and too full of stuff in 99 % you never need. Better to load this with modules and avoid a 16 MB system (even doesn't have forum, wiki or other stuff, but 4 times bigger then drupal). Concept and handling of Drupal is just perfect so its my only choice. I just wish it could be a little faster and with less database queries. By the way Joomla also needs a lot of database queries.

So I tell you: If you want to build up a webpage efficiently, and at the same time want to customize for some extra stuff, but don't want to have stuff in it that you don't need - then Drupal is best choice. With Drupal you will have a webpage looks customized and at the same time clear and not full of unnecessary stuff, but that serves you with additional things you could need.

Crell’s picture

Rails is not a language. Ruby is a language. PHP is a language. Rails is an application framework originally written for Ruby. There are many Rails-style frameworks available for PHP, such as CakePHP and Symfony.

Drupal also has a structure, although it's not a traditional application flow. Drupal does everything with hooks; I usually describe it as "working sideways". The upshot is that you get an extraordinary amount of flexibility. The downside is that it becomes very difficult to optimize certain tasks, because you can't assume that two operations will always come together. For instance, you don't know in advance what fields you'll need to load as part of a node. There are various efforts to improve that process, but there's a limit to what you can do without removing flexibility.

Also, not all queries are created equal. Most Drupal sites have the path module enabled. The path module results in a MySQL query for *every single link on every single page*. That's easily 2/3 of your queries right there. However, they're extremely simple queries that don't take much time at all. Alternatively, if you're creating a View in Drupal then a Full Node or Teaser View will do a full node-load for every node in the View, which can easily be 5-10 queries per node. On the other hand, a List or Table View (almost) always issues only two queries, no matter how many nodes there are in the result. Those 2 queries are much more complex, though, so their individual cost is higher but the overall cost to the page is lower... assuming you have proper indexes (which by default you should).

There's also the question of the database. Just by tweaking a few settings on your MySQL database, you can double your performance or better. Add a crucial index or two, and you can double it again. That's independent of whether you're using Drupal, Joomla, Phorum, or RoR.

Of course, that's not the time that matters. The time that matters is overall page load time. That is affected by your theme as much as anything else. Enabling the CSS compressor can cut 2/3 of your HTTP requests, which in turn can cut your page load time in half. (Yes, I've seen that happen on several of my sites.) If you use a lot of images or CSS background images, even if they're very small, there's still an HTTP request for each one on each page load, even if the file is cached, to see if it's been updated. That can slow the page to a crawl.

So no, there's no solid number for how much traffic a Drupal site, or any other CMS, can handle. There's far too many variables that have nothing to do with the CMS itself. Your Apache configuration, MySQL configuration, choice of MySQL vs. Postgres, how graphics-intensive your site is, the type of server hardware you're on, whether or not you have an Opcode cache... those all play as big a factor as the PHP code itself, if not moreso. Anyone claiming a fixed maximum capacity for Drupal, or any other CMS, whatever that capacity is, simply doesn't know what they're talking about.

--
Larry Garfield
http://www.garfieldtech.com/blog
http://www.palantir.net

--
Larry Garfield
http://www.garfieldtech.com/
Thinking Functionally in PHP: https://leanpub.com/thinking-functionally-in-php

Anonymous’s picture

.... the Rails-Thing was a mistake of mind confusion, I wrote Rails and thought Ruby all the time. Thanx for the correction and sorry for the confusion my post could have given to others.

The flexiblity of drupal is great but I am really curious what happens when I preview a comment, as 18 queries for fetching user-object is really much. Andybody knows or can tell me how I can analyse this, I am really interested in that thing.