I'm designing a huge media site. It would need to have about 20 views on the homepage and should attract about 100,000 visitors daily. The site is hosted on a dedicated server. Other than setting up Drupal caching and Boot module, should I be doing anything else to optimize performance? Should I be worried about using Views?

  • 2
    How many of those will be anonymous users and how many will be registered? Making a site perform for anon users is rather easy, doing it for authenticated users is much harder as they can't use the page cache/boost etc.
    – Berdir
    Jun 14, 2011 at 10:24
  • About 5k are registered... don't know that they sign in every time they visit the site though. So what might one do to improve performance for registered users? Perhaps server solutions?
    – Jane
    Jun 14, 2011 at 10:32

2 Answers 2


Performance is very subjective and varies widely from site to site, depending on how much custom code you have, how many logins you have, and what your expected usage patterns are.

The first thing you should do is figure out what your expected usage patterns are going to be, put them in a spreadsheet and estimate how many concurrent visitors you'll have on various pages, etc (for example, how many logins will happen at one time, which pages have the highest traffic, are your users authenticated or not).

The second thing you should do is prepare some kind of load test using something like LoadStorm, or even something very basic like JMeter. Set up some scenarios that mimic or exceed your expected traffic patterns. Then run the tests.

When you start load testing you will very quickly see where the bottlenecks in your site are. You can take cachegrind dumps of your site while you are load testing to see where the performance bottlenecks are using the XDebug profiler. You can also watch your database performance (CPU/memory and disk I/O are easy things to keep an eye on).

Once you've done all that, you can look into the following:

Drupal has a decent listing of caching modules/options and how they perform for authenticated and unauthenticated users here.


20 Views on one page sounds excessive. Views isn't great on performance. I have pages with 5 views and they are not fast.

Even with the views results cached loading the views into memory and processing them can still take time. Obviously when the page is cached this issue goes away, but on a busy site the time it takes for a cached page to be built can be an issue.

Caching and tuning can help a little. But you still need to get the page to display in a reasonable time if it is uncached. You may find you can write custom blocks to do the work of the views with a much lighter overhead. It is worth trying it to see what difference it makes.

Using XHprof can help you see what is taking the most time on a page load.

What are effective optimization techniques for Views 3? explains the issues I was having with views

  • Thanks Jeremy... that's a little scary, the vast majority of my visitors will be anonymous, so I guess that leaves the issue of the few thousand who will be signed in. Does writing your own SQL queries optimize performance at all? I may look into that solution but we can't get rid of the 20 queries on the front page altogether, that's for sure.
    – Jane
    Jun 14, 2011 at 11:27
  • 1
    The queries themselves should be fine. You may find two things. Views itself is quite an overhead, and the queries that views produces are not as fast as they could be. So switching to just using queries can help. The views/blocks can be cached, so even for logged in users you don't have to worry too much once the cache is built. Jun 14, 2011 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.