Upgrade to Pro — share decks privately, control downloads, hide ads and more …

High Performance for Small Sites - Stanford Drupal Camp 2012

High Performance for Small Sites - Stanford Drupal Camp 2012

Presentation from Stanford Drupal Camp, May 5th, 2012.

Much of Drupal high performance work focuses on sites like examiner.com that must scale massively to accommodate millions of users, and pursues the "hits-per-second" metric.

However, many Drupal site admins have smaller, low-traffic sites that run on shared hosting, and don't warrant the overhead of a dedicated server, Varnish, Acquia, or Pantheon. These sites run slowly for various reasons, and "seconds-per-hit" is a more meaningful metric.

I start with a high-level overview of how to assess and prioritize your performance problems, where they're coming from, and why they may (or may not) matter.

I also walk through debugging a poorly-performing site from the front end to the back end, and discuss performance improvements such as:

Drupal core performance settings
CSS and JS aggregation
Views and Panels caching
Boost
Authcache

I also cover testing and profiling tools such as devel, ApacheBench, and YSlow, and the built-in tools in browsers like Safari and Chrome.

jbickar

May 05, 2012
Tweet

Other Decks in Technology

Transcript

  1. High  Performance  for  Small  Sites     John  Bickar,  Stanford

     Web  Services     Slides:  h8p://ayl.lv/hpss     1
  2. Small  VPS   What  is  a  “small  site?”   Shared

     hosCng   Limited/no  access  to  Linux/Apache  layer   Cannot  install  Varnish,  memcache,  etc.  
  3. What  is  a  “small  site?”   If  you  run:  

      $ sudo apt-get install varnish   And  it  returns,  “user  not  sufficiently  super,”  you   might  have  a  small  site.  
  4. “That’s  great!”   “Can  we  add…”   Events   Contact

     form   Restricted  content   Room  reservaCons   Seventeen  more  roles   Publishing  workflow   Ten  more  content  types   Slap  Chop   George  Foreman  grill   Custom  breadcrumbs   Custom  .tpl.php   Custom  web  app   Mobile  device  detecCon   Field-­‐level  permissions   GI  Joe  with  the  kung-­‐fu  grip   Discussion  forums  
  5. May  5th,  2012   21 IniCal  Assessment   HosCng  OpCons

      Traffic   Resources   PrioriCes  
  6. May  5th,  2012   22 Assessing  Performance   Bo8lenecks  

    When?   Where?   What?   Who?   Why?  
  7. May  5th,  2012   23 General  Tips   Delete  unnecessary

     modules   Disable  unnecessary  modules  
  8. May  5th,  2012   27 General  Tips   Use  them

      Drupal  core  performance  se`ngs   admin/se`ngs/performance  (D6)   admin/config/development/performance  (D7)  
  9. May  5th,  2012   28 TesCng  Tools   YSlow  

    Inspector  in  Chrome,  Safari   ApacheBench  
  10. May  5th,  2012   29 Advanced  Performance  -­‐  Caching  

    Cache  Rules  Everything  Around  Me   Cache  gets  stale  
  11. May  5th,  2012   30 Advanced  Performance  -­‐  Caching  

    cron   32 * * * * curl -sS http://www.example.com/foo > \ /dev/null
  12. May  5th,  2012   31 Advanced  Performance  -­‐  Caching  

    Views  caching   Panels  caching   Boost   AuthCache  
  13. May  5th,  2012   39 Summary   Know  thy  users

          Keep  Calm   And   DRUPAL  ON   Know  thy  content   Know  thy  traffic  
  14. Appendix   Linkies:   •  h8p://techcommons.stanford.edu/topics/web-­‐development/benchmarking-­‐site-­‐performance-­‐apachebench   •  h8p://techcommons.stanford.edu/topics/drupal/boost  

      •  h8p://techcommons.stanford.edu/topics/drupal/improving-­‐drupal-­‐performance-­‐and-­‐speed-­‐leland-­‐servers     •  h8p://techcommons.stanford.edu/tags/performance