Skip to main contentdfsdf

    • Boost

       

      Boost is a page cache which works in a similar way to aggressive page caching in that it attempts to serve cached data without running the bootstrap. However, it is able to go one step further and avoid PHP being run as the redirect takes place in rewrite rules located in .htaccess. If the static file exists then it is served as the response. The end result is super fast response without running PHP or the bootstrap. This frees up the server to handle more requests from logged in users.

       

      Boost is an attractive module because it is easy to install, has a lot of configuration options which give good control over cache building and invalidation. It is highly recommended.

    • Varnish

       

      The Varnish HTTP Accelerator Integration module integrates Drupal with Varnish, a reverse proxy which sits in front of Apache, PHP and Drupal. Varnish stores cached content in RAM and avoids the overhead of Apache and the Drupal bootstrap. As such it offers very high performance for anonymous users on cached pages and is the preferred option for many sites where scaling is paramount.

       

      Varnish requires either a patch to core to add HTTP headers, PressFlow or Drupal 7. Most people are therefore running Varnish in conjunction with PressFlow.

    3 more annotations...

    • When running in an unoptimized configuration relatively simple pages can consume a lot of RAM, a fair amount of CPU and issue a large number of database queries. On medium sized sites it can be difficult to run in some shared server environments if the host is concerned about CPU and RAM. It is therefore important to attempt to get the most from your installation given your skill level and the resources available to you.
    • Performance refers to the speed of the system. Basically, how long does it take to produce a page? Performance is a result of how long it takes to render a page (i) on the server and (ii) on the client side in the browser. It is important now to forget the client side of the equation as big gains can be made here if all else is running smoothly.

       

      Scalability refers to the ability of the system to handle more requests. ie. as the load increases on a system how is it placed to handle it. What is the throughput of the site under heavy load? For anonymous users and logged in users? How stable is the system? Are there faults or errors? How many resources are consumed?

    • YSlow

       

      A Firefox addon which gives you an overview of the request/response cycle for a single web page. It provides a summary of all requests and offers suggestions as to how things can be improved. This tool is mainly used for optimising the rendering time of a page. See Drupal Page Rendering for more details on the client side. However, in terms of server side performance it does report the download time for the actual ‘doc’ requested which indicates how fast a page is being built on the server.

    • Devel Module

       

      The Devel module is an essential tool to have on your dev machine. Devel is your first port of call on the server side when troubleshooting a site. You can use it to discover where problems are occurring before diving in to test further and debug. If you are suspicious that things aren’t quite right it can help you out with slow queries, slow pages and RAM consumption.

    6 more annotations...

    • Characteristic Optimize No problems  Size many nodes few nodes  Activity high traffic low traffic  Users logged in anonymous  Page browsing dispersed concentrated  Contention many writes few writes  Content heavy light  Functionality rich poor  Audience dispersed concentrated
    • RAM and CPU throttled

       

      Drupal is a system which can be heavy on system resources, especially RAM, and so running it on shared hosting can be a challenge in some situations. In many cases a relatively minimal Drupal install will exceed maximum limits enforced by your hosting company. In these cases you will receive a polite letter telling you to fix your site or else you can upgrade to a dedicated server. Don’t worry. See Out of the box for some quick and easy wins on shared hosting plans.

       

      Servers set up like this often have oversold the box you are hosted on and you will be at the mercy of other users who might be exceeding their allotment. Your performance will be adversely affected in these cases. YMMV.

    • Limited control

       

      The major downside of shared servers is the limited control you have over the hosting environment, leaving you with relatively few options to improve performance. Luckily Drupal has some handy features built in which make it possible to improve speed, memory and CPU. These are dealt with in more detail below.

    2 more annotations...

    • Drupal comes with a number of in-built caches which store the results of expensive calculations (strings) in the database so that they can be retrieved quickly later on. There are six caches enabled by default: cache, cache_block, cache_menu, cache_filter, cache_form and cache_page. Contributed modules are able to create their own caches for storing data which is handy for module designers. This default cache system provides improved performance across the whole app.
    • Aggregate and compress JS and CSS

       

      Drupal’s modular system means that pages can have a large number of CSS and JS includes which results in a lot of client server communication – slowing the page draw time down. The problem can be alleviated by merging the files and then compressing them. This results in less includes and faster downloads. Up to 90% of download time can be attributed to downloading CSS, JS and images so it makes sense to aggregate and compress if possible.

    2 more annotations...

    • Server tuning considerations
       
      Drupal documentation covering the basics.
       
      Tuning LAMP systems, Part 1: Understanding the LAMP architecture
       
      Intermediate article covering LAMP.
       
      Tuning LAMP systems, Part 2: Optimizing Apache and PHP
       
      Intermediate article covering Apache and PHP.
       
      Tuning LAMP systems, Part 3: Tuning your MySQL server
       
      Intermediate article covering MySQL.
    • Opcode cache

       

      Opcode caches cache the compiled form of a PHP script in shared memory to avoid the overhead of parsing and compiling the code every time the script runs. This saves RAM and reduces script execution time.

    10 more annotations...

    • Solr

       

      Enter the Apache Lucene project and Apache Solr.

       
       
      Welcome to Lucene!
       
      Lucene “provides Java-based indexing and search technology, as well as spellchecking, hit highlighting and advanced analysis/tokenization capabilities.”
       
      Welcome to Solr
       
      “Solr is the popular, blazing fast open source enterprise search platform from the Apache Lucene project. Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, and rich document (e.g., Word, PDF) handling. Solr is highly scalable, providing distributed search and index replication, and it powers the search and navigation features of many of the world’s largest internet sites”
    •  

      Another option for those users looking to switch away from the in-built search is Google Custom Search – a search service offered by Google where Google indexes your data and stores the results on their servers. You are able to search the data via a simple form on your site. Google Custom Search is free for individuals, who don’t mind ads with their results, with a business version starting at $100 pa. The Google Custom Search Module integrates it into Drupal by providing a block with the form.

    2 more annotations...

      • Pressflow

         

        Pressflow is a distribution which attempts to bring many of the improvements discussed above (SQL improvements, Varnish) into a single package. Pressflow is a standard Drupal install which has had its core modified to fix bottlenecks and facilitate the use of advanced caching features. FourKitchens don’t regard Pressflow as a fork since many of the initiatives found in Pressflow are contributed back into the development of the head of Drupal. 

        So long as you haven’t hacked core yourself then using Pressflow is a simple matter of swapping out core drupal and replacing it with Pressflow.

         

        In a nutshell Pressflow allows the following:

         
           
        • Support for database replication
        •  
        • Support for Squid and Varnish reverse proxy caching
        •  
        • Optimization for MySQL
    • Project Mercury

       

      Project Mercury is an innovative project from Chapter Three which wraps up a tricked out PressFlow installation in to a preconfigured Amazon Machine Image (AMI) for use on Amazon EC2 instances.

       
       
      The Pantheon Project Blazes Ahead
       
      Hot of the press: Mercury will also be available for deployment on other servers, not just EC2. Further there will be a Mercury On Demand service at Rackspace.
       
       

      The goal of this project is to make Drupal as fast as possible for as many people as possible. To that end, we are developing a pre-built Amazon Machine Image (AMI) which will allow anyone with an Amazon Web Services account to spin up an EC2 instance and see how all this works in real-time. The ultimate goal is a production-ready release that can be used for deploying real websites.

  • 2 more annotations...

    • Improving Drupal’s page loading performance
       
      Wim Leers covers all the bases on how to improve loading performance.
       
      High Performance Web Sites: Essential Knowledge for Front-End Engineers
       
      Steve Souders, Chief Performance Yahoo! and author of YSlow extension, covers the Yahoo recommedations in this book.
       
      High Even Faster Web Sites: Performance Best Practices for Web Developers
       
      Another Steve Souders book covering Javascript (AJAX), Network (Image compression, chuncked encoding) and browser (CSS selectors, etc).
    • Combined Files

       

      The Out of The Box section covered the inbuilt CSS and JS aggregation and file compression. The use of “combined files” is a significant factor in Drupal’s relatively good score in the YSlow tests. Make sure you have this enabled.

    4 more annotations...

      • All Sites

         
           
        • Get the best server for your budget and requirements.
        •  
        • Enable CSS and JS optimization in Drupal
        •  
        • Enable compression in Drupal
        •  
        • Enable Drupal page cache and consider Boost
        •  
        • Install APC if available
        •  
        • Ensure no slow queries from rouge modules
        •  
        • Tune MySQL for decent query cache and key buffer
        •  
        • Optimize file size where possible
        •  
         

        Server: Low resources

         
           
        • Boost stops PHP load and Bootstrap
        •  
        • Sensible module selection
        •  
        • Avoid node load in views lists
        •  
        • Smaller JVMs possibly if running Solr
        •  
        • Nginx smaller than Apache
        •  
        • mod_fcgid has smaller footprint over mod_php
        •  
         

        Server: Farm

         
           
        • Split off Solr 
        • Split off DB server, watch the latency
        •  
        • With Cache Router select Memcache over APC for shared pools
        •  
        • Master + slaves for DB
        •  
        • Load balancing across web servers
        •  
         

      • Size: Many Nodes

         
           
        • Buy more RAM for database indexes
        •  
        • Index columns, especially for views
        •  
        • Thoroughly check slow queries
        •  
        • Warm up database
        •  
        • Swap in Solr for search
        •  
        • Solr to handle taxonomy pages
        •  
         

        Activity: Many requests

         
           
        • Boost or
        •  
        • Pressflow and Varnish
        •  
        • Nginx over Apache
        •  
        • InnoDB on cache tables
        •  
         

        Users: Mainly logged in

         
           
        • View/Block caching
        •  
        • CacheRouter (APC or Memcache)
        •  
         

        Contention: Many Writes

         
           
        • InnoDB
        •  
        • Watchdog to file
        •  
         

        Content: Heavy

         
           
        • Optimized files
        •  
        • Well positioned server
        •  
        • CDN
        •  
         

        Functionality: Rich

         
           
        • Well behaved modules
        •  
        • Not too many modules
        •  
        • View/Block caching
        •  
         

        Page browsing: Dispersed

         
           
        • Boost over Varnish if RAM is tight
        •  
         

        Audience: Dispersed

         
           
        • CDN
    • DBpedia is a community effort to extract structured information from Wikipedia and to make this information available on the Web. DBpedia allows you to ask sophisticated queries against Wikipedia, and to link other data sets on the Web to Wikipedia data. We hope this will make it easier for the amazing amount of information in Wikipedia to be used in new and interesting ways, and that it might inspire new mechanisms for navigating, linking and improving the encyclopaedia itself.
    • Get amped for mobile

       

      In the past it has been easy to not even consider mobile when designing a site or an application. However, there are so many compelling reasons these days to treat your mobile site as a key component of your web strategy. Mobile devices are becoming increasingly popular, more of your users will be accessing your site through a phone or tablet. They will expect a good experience from your site or else will not return. Watching a user attempt to browse your unoptimised desktop app on a mobile device is an embarrassing experience for you and frustrating for the user.

       
       
      Drupal in a tablet world [Dries Buytaert]
       
      Dries opens up a discussion about the future of Drupal for mobile and tablets. “This all begs the question: in a world of tablets and mobile handheld devices, what do we need to do so that Drupal will be a go-to platform? How can Drupal contribute so as to be a player in the ever-expanding ecosystem of tablets and mobile phones?”
       
      Everything you ever wanted to know about mobile, but were afraid to ask [Tomi T Ahonen]
       
      A long article which covers the myths and misconceptions about mobile. Very useful for getting your head around just what a remarkable medium it is.
    • Rethinking the Mobile Web by Yiibu
       
      Slideshow covering the old and new ways of doing mobile. “Progressive enhancement” and “Responsive web design” techniques discussed.

    2 more annotations...

    • RESTful design of URLS

       

      REST defines the architecture of the World Wide Web. One of the principles of REST is that a single URI represents a resource and that resource is conceptually different from the representations returned to the client.

       
       
      Representational State Transfer
       
      “Representational State Transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. The term Representational State Transfer was introduced and defined in 2000 by Roy Fielding in his doctoral dissertation.[1][2] Fielding is one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification versions 1.0 and 1.1″
    • Caching, the fly in the ointment

       

      We’ve just seen that serving different representations from a single URI is a good thing from many perspectives: mobile first, progressive enhancement, REST and SEO. However, there is one reason why we may we may decide to go down the path of using two domains instead of one: caching.

       

      Caching mechanisms, such as Drupal Core and Boost, used the fully qualified domain name of a URI to determine caching keys. This allows the cache to quickly serve content to different clients without knowing the criteria which decides the representation received by the client, ie. the cache just has to know about the URI, it doesn’t need to decipher the user agent. Currently, if different representations are served for the same resource then the cache will likely become populated with a mix of different representations, leading to chaos. For this reason it is generally accepted that having a separate mobile site on a sub domain is a good way to go. ie. we would have two sites:

    1 more annotation...

    • This article is a followup on how to configure memcache for Drupal, and how multiple bins help with performance.

       

      Each bin in memcached correspond to one or more cache table in Drupal.

       

      To do this, we first setup a start script for memcache that would start each bin with the correct size. This would go into /usr/local/bin/memcache.sh:

    • #!/bin/sh case "$1" in  start) /usr/local/bin/memcached -d -u root -m 64 -p 11211  /usr/local/bin/memcached -d -u root -m 320 -p 11212  /usr/local/bin/memcached -d -u root -m 128 -p 11213  ;;  stop) killall memcached  ;; esac

    1 more annotation...

    • Wondering why your views run so slow? Why after switching to InnoDB, MySQL isn't running any better? This module has the answers!

       

      Indexes

       

      It will show what CCK columns get used in a view filter or relationship and give you the option to add an index on it so the views query will run faster. Also can add indexes to core modules that could use one.

    • Correctly configure Block Visibility settings

       

      Drupal's block system allows you to place content in specific theme regions. But beware: even if you do not output a block in your theme, it will still be generated by the Drupal stack! That's because any enabled block's generation is determined by the block's visibility settings, not by the theme's region output.

       
        
       
         
        
       

      Disable 'Rebuild theme registry on every page'

       

      This is disabled by default, but double-check to make sure. Often theme developers activate this feature to test their developments. But on live production sites this setting should be turned off at all times. Find the setting via Site Building > Themes > Settings and then click on your Theme to find the setting.

       
        
       
         
         Disable the statistics module
       

      Disable the statistics module

       

      Drupal's statistics module has a disadvantage: extra MySQL queries per page load. Even when using the Boost module, boost_stats.php can still call these MySQL queries. Of course, it is up to you whether you need these Drupal stats. Most people will use Google Analytics as an alternative.

       

      Other alternatives are server tools like Munin or Cacti.

    • Enable core caching features

       

      Often overlooked by Drupal beginners, but still worth mentioning: do not forget to enable core caching at Administer > Site Configuration > Performance (/admin/settings/performance). To avoid issues with Drupal modules, simply select Cache Mode: Normal. And enable Page Compression.

       
        
       
         
         Enable native module caches (e.g. Views, Panels, Feeds)
       

      Enable native module caches (e.g. Views, Panels, Feeds)

       

      Several Drupal modules bring their own caching system and caching tables. For example: Views, Panels and SWF Tools. Each have their own configuration options. On production servers, it is wise to enable them.

       
        
       
         
        
       

      Install ImageCache to generate thumbnails

       

      ImageCache is a module that can generate image thumbnails on the fly, to exactly fit your dimensions. The thumbnails is only generate once, so should not influence performance. The benefit however is to the end user: visitors will download smaller images instead of the full unscaled version.

       
        
       
         
         Increase minimum cache lifetime on high traffic sites
       

      Increase minimum cache lifetime on high traffic sites

       

      Drupal's core caching system allows to set minimum cache lifetimes. This means content will not be refreshed until after a certain time. For example, on busy sites, you would set the Minimum Cache Life to 1 hour. That means visitors do not see changes on your site more often than 1 hour. But it greatly helps to improve cache-efficiency and reduces your server load.

    11 more annotations...

    • Omega has the most features of any of these HTML5 base themes and is one of the most popular. My experience with Omega is that it is an extremely well put together theme. There is a bit of a learning curve due to the vast number of configuration options, but once you have figured out how all of the settings relate to each other, most of the layout can be configured in the browser. It is my opinion that Omega is great for new themers, design shops that can systematize their process based on it, and anyone who would rather configure in the browser instead of writing CSS & PHP code.
    • I think Omega will likely become the dominant player in Drupal 7 HTML5 base themes. It is in active development and has its own microsite with detailed documentation. The unique features that really set it apart are the Context integration, Responsive layout (can adapt to different size displays), and Drush support. On top of that there is a UI sub-module in development that will allow drag & drop configuration of Omega layouts.
1 - 20 of 23 Next ›
20 items/page
List Comments (0)