Something that you already know: Website speed is expected

Events happening in the community are now at Drupal community events on www.drupal.org.
mherchel's picture

This is a great article from today's NY times about how website speed is expected nowadays. It has some interesting statistics and quotes.

http://www.nytimes.com/2012/03/01/technology/impatient-web-users-flee-sl...

A couple of quotes:

These days, even 400 milliseconds — literally the blink of an eye — is too long, as Google engineers have discovered. That barely perceptible delay causes people to search less.

People will visit a Web site less often if it is slower than a close competitor by more than 250 milliseconds (a millisecond is a thousandth of a second).

“Two hundred fifty milliseconds, either slower or faster, is close to the magic number now for competitive advantage on the Web,” said Harry Shum, a computer scientist and speed specialist at Microsoft.

Anyway, no real question here. Just figured I would share since I assume most group members would be interested :)

Comments

Thats

gor's picture

Thats crazy.

http://groups.drupal.org/node/213943 loads 1.72-2.11s for me.

I see similar numbers As an

greggles's picture

I see similar numbers

  • As an authenticated user I get ~1.5 seconds page load with a warm cache.
  • As anonymous I get ~1 second with a cold cache and ~.5 seconds with a warm cache.

Any tips on ways to improve it are definitely welcome. I can provide whatever monitoring info you need from the server-side.

From my own experience - it

gor's picture

From my own experience - it is really hard to have 250mc for answer.

It requires:
- CDN for js, css, images and etc
- ping to server should as less as possible. (it is not problem for 1sec response, but it is going to be important for 1/4sec)
- MySQL Cluster with separated nodes for READ ONLY requests.
- Very important to have fast network access between Frontend, Backend and MySQL nodes.

Thats why it is crazy - no one shared hosting can meet this requirements for PHP+MySQL.

It is possible for static content only.

Check http://groups.drupal.org/CHANGELOG.txt - it takes 177ms to start download it and 592 to completely download it for me. And it is static page with 44k size!

I have page generation times

simg's picture

I have page generation times for authenticated users down to about 0.8 ms (with 125 concurrent users) !

http://groups.drupal.org/node/206138

Still more work to do to optimise javascript / css delivery, but still ...

Using AuthCache and FileCache, it should be possible to get this kind of performance on a shared server :)

I've achieved an

simg's picture

I've achieved an approximately 1000x improvement in page load times using AuthCache (D7)
(and 5x improvement in anonymous page loads)

http://groups.drupal.org/node/206138

A NY Times article is good

dalin's picture

A NY Times article is good fodder to get clients to understand the importance of performance.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

Yes, but...

jim kirkpatrick's picture

We've known this for years and whilst I agree with the broad sentiments of that article -- that faster sites get more visitors for longer -- I do think it depends on the site and the person visiting it...

For example, I will put up with up to 15s delay on Drupal.org since I NEED the information I'm loading. Don't get me wrong, I'd rather not wait! But for a site which is one of many options -- like when we search for something new and try the first few links -- I am very unforgiving/impatient because this site (according to Google's search results) is just one of many which potentially have that information.

So I would say (and have no empirical evidence to back up this hunch) that the classic 'bounce' type visitors are highly sensitive to site speed, whereas people wanting something specific or using a regularly visited site will put up with much more waiting.

Depends on your audience, YMMV etc.

I do not think drupal can get

plusfront's picture

I do not think drupal can get a good performance like that.
There are so many useless queries in a simple webpage.
And it is hard to get a performance > 50 request per second.
It always take several seconds to submit data to drupal.org

I'd agree with you if I

simg's picture

I'd agree with you if I wasn't getting around 1000 authenticated requests per second from a modest server

http://groups.drupal.org/node/206138

yes... and no

nestor.mata's picture

I must disagree, Drupal can get that performance, is just not gonna get it by itself.
We need to do serious work in order to get there.
CDN and/or caching files on a reverse proxy (varnish) would release the server from processing static files (usually about 80-95% of the requests from the browser)
Caching in several ways... anonymous users... there is no reason why not to cache most of the complete pages... Boost would do the job here, authenticated users auth cache can help where is suitable to be used, setting up the cache configuration for views and blocks would also help a lot, custom code REALLY use cache, is easy.
ESI and/or AJAX loading over cached pages can do a nice trick too.
There is a lot of work to do, and every project is different, but is not that hard to release the server from processing static files, and then caching many pages, or caching several parts of the pages, also analyzing the hot spots of the site to improve the performance or cache exactly that and at the end we may easily end up with 90% of dynamic requests cached, reducing hundreds of database requests per page or just throwing out a cached static file and no code processing at all.
Besides that... using code optimizers will help, improving database configuration (expend a good time doing this), changing the caches, etc.

Not easy, requires work and knowledge (or research and testing), but is doable.

Best regards,

agreed. Much of the serious

simg's picture

agreed. Much of the serious work has already been done.

http://drupal.org/project/authcache

benchmarks published here. http://groups.drupal.org/node/206138

drupal can't do this

b8x's picture

this speed unattainable for Drupal, because Drupal spends 250 ms for the kernel boot! and there are no options.

250ms??That is like saying

nestor.mata's picture

250ms??
That is like saying that cars go from 0 to 60Mph in 1 minute.... which one? some does, some doesn't
The elapsed time is a result of several situations.

On Drupal basic bootstrap with only basic modules installed we have several things happening: Code files load to memory, syntax validation and interpretation, code execution, query database, format output and finally sending the output over the net, and I mean without using any Drupal cache.... but then it comes down that each of this steps can be optimized or even skipped.
Is not the same if you use Apache, or Nginx or other server, you get better times with each different options... not the same if you use PHP module, or CGI or fastcgi or any other option, we are getting different times by just doing this, also, what if we disable some of the modules of the web server, we get improvement.

Then, what if we have some code optimizer? Well, we could cache the code in memory and in some sort of compiled version of it, that would make us skip reading all the files and validating them (lot of IO less and less processor).

Then, we could reduce the number of queries by getting some Drupal standar cache.
Also, we can improve the performance of our database server.
Also, it comes the hardware, better and faster hard drives, faster memory, faster CPU.
Plus, all the hardware and servers configuration, by know how to configure your server, you are getting a lot more performance.

Then, what if we change the standard Drupal cache and use some other memory or filesystem cache for different options.

And what if we go further now and use some advanced techniques, like ESI or AJAX loading some areas and caching most of the output.
Boost will avoid processing anything at all and queries for anonymous users, and authcache will skip most of the bootstrap process.

As you can see here, hardware, configuration and technologies used will make a big difference in the response time, all depends on the knowledge, time invested in improving performance and the money to pay for better hardware.

So, can Drupal do better than 250ms... ohh yes, but again, maybe not by it self, you need to put some love there :)

more real

b8x's picture

What happens when It boot, I know, but the themes are not the point. I do not like the theory when it is not applicable in practice. In practice, I have a 250 ms - download speed of the core Drupal with the modules without which the normal site can not be done. I'm talking about the real situation with the real site. Speed ​​in this case is always greater than even 500 ms. Cash I do not think the answer, as this solution is a half-hearted.
I am talking about the fact that comparing the Drupal site with a site on the pure php difference is significant. I think if the page on the site is loaded more than 1.5-2 seconds, you can throw in the trash. This site will never be the first in the tops. Why Drupal developers dissemble? Why do not they just say .. Drupal module system ..... etc. But no one says that it is the brakes system. For example, with a popular module Hierarchical Select site impossibly slow, but because this is considered to be the best existing solution to bring the dependent drop-down lists, so I wrote the script and it works 10 times faster. The more I go deep into modules, the more I realize that they are very redundant.

In practice?

nestor.mata's picture

All I said is practice, not theory, all I said are things we are all doing and is working, not something I think it could be done, that is practice.
Pure PHP agains Drupal? Sure, nobody is going to argue that, 100 lines of codes is by default going to be way faster than 1 000 000 lines of code (unless those lines are bad performances), but on the other side, write all that Drupal and it's module do from scratch... well... that takes time and therefore money, somebody will have to pay a lot more hours to achieve that, in general terms.
Drupal is not the solution for everything, neither any other framework or technology, we are not saying that do everything on Drupal.
Some time ago I did a survey system that requires the best performance, so I wrote the survey engine in PHP and use Drupal to administrate the system, users, etc, the result, a great well done, high performance, multi server survey system with a robust administration in little time, not using only Drupal, but a well designed solution.
Every problem has a different solution, and sometimes you can expend more time in something doing something in a more lower level solution with better performance and saving some time using a robust framework and mix them together.
Again, the response time, as an example, I pay $30 per month for hosting (a combination of 3 virtual servers) and I get (from google crawler stats) the lowest time 132ms, average time 507ms and the highest ever 867ms, I can live with that, if I would require better performance I can definitely achieve it, with no doubt, that should be a practice example, isn't?

Modules with low performance? off course, but this is a community, here is where you jump in, and fix the module to have a better performance, they are waiting for your skills to improve it, not everyone program as great as you, help them :)

In resume, from my stand point:
Modules with low performance, yes they are, but you could help them improve and still save time by not implementing all from scratch.
Drupal for everything, off course not, but if you take it, you will be saving a lot of time of the project, saving a lot of money.
Drupal can achieve great performance, hell yes, but it require some love and time on it, there is a lot of people who could help you achieve it, but, it seems you are never going to believe this not even seeing it, so, I will not try to convince you, you can just not use Drupal and be happy, using Drupal is optional :)

Enjoy

I'd recommend that everyone

dalin's picture

I'd recommend that everyone see the video for the session that Larry Garfield gave at DrupalCon last week:
http://denver2012.drupal.org/program/sessions/flexible-fast-friendly-bal...

Sure you can make things super fast, but you have to sacrifice something else to get it. Programming is always a balance and not every site needs things balanced in the same way.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

I think such a comment like

b8x's picture

I think such a comment like yours, should be in a conspicuous place in the advertising Drupal. both for the beginner, as I once was, it was difficult to understand the problems of Drupal in the beginning, and of course I was annoyed that CMS is presented as suitable for everything. I was glad to see your figures, they are useful and well understood.

The module thing is very

Jamie Holly's picture

The module thing is very common. I've taken over sites before and found the original builder used views for 2 or maybe 3 things and they had no ambition to do anything else that needed views. That was overkill and could easily fit into a couple of dozen lines in a custom module.

Cache is always a good solution to slowness. I once hacked a Wordpress installation to where it could do 100% of the queries from APC's cache so long as the cache wasn't stale. This really increased the performance.

For speed like this another big factor is the theme. Are their blocking issues on the page that cause it to load slower, ie; 3rd party widgets, ads, etc.? Having all your javascript load properly and remove any render blocking issues. For example, I got one site I run for a client that loads everything from their server's in about 200ms (Drupal, CSS and JS), yet takes almost 12 seconds to fully load because of things like embeds and 3rd party widgets.

Comparing a Drupal site to pure PHP really isn't fair. The problem is a pure PHP site is going to be coded custom to tailor what that site wants, whereas Drupal has to be made modular enough and with enough customization available to satisfy most people. I've re-coded a couple of sites in the past from Drupal and even Wordpress into a more custom solution in CodeIgniter (and recently one into Lithium). I could have gained more performance by not using any framework and writing it all from scratch, but who really wants to pay for all that work?


HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.

it just happened that I get

b8x's picture

it just happened that I get paid only if my site is fast, less than 500 ms or I will not work.
The idea is not only in the fact that pure php better, just do not have the flexibility to existing features, there is no way to cut the code Base band, so they do not perform unnecessary code.

Wow that sounds like a really

dalin's picture

Wow that sounds like a really unfortunate and unprofessional situation that you're in. You may want to read The Clean Coder by Robert C. Martin for ideas on how to improve your situation.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: