<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>pingVision</title>
  <subtitle>Interactive Design + Development for Drupal websites</subtitle>
  <link rel="alternate" type="text/html" href="http://pingv.com/blog/greg/200705/performance-and-scalability-roundup"/>
  <link rel="self" type="application/atom+xml" href="http://pingv.com/node/3679/atom/feed"/>
  <id>http://pingv.com/node/3679/atom/feed</id>
  <updated>2007-05-15T21:01:18-05:00</updated>
  <entry>
    <title>Performance and Scalability Roundup</title>
    <link rel="alternate" type="text/html" href="http://pingv.com/blog/greg/200705/performance-and-scalability-roundup" />
    <id>http://pingv.com/blog/greg/200705/performance-and-scalability-roundup</id>
    <published>2007-05-15T21:01:18-05:00</published>
    <updated>2007-05-15T21:01:18-05:00</updated>
    <author>
      <name>Greg</name>
    </author>
    <category term="Drupal" />
    <category term="Linux" />
    <category term="Performance" />
    <content type="html"><![CDATA[ <h3>Performance and Scalability Theory</h3>
<p>Back during the Open Source CMS Conference (<a href="http://pingv.com/tag/oscms-summit">discussion on pingV.com</a>) we attended a fundraiser/seminar hosted by Lullabot about Performance and Scalability.  The presentation was really great.  Some of it I knew already, some was new to me, but seeing it all presented together really helped solidify the concepts in my mind.  </p>
<h3>The Performance Need</h3>
<p>Shortly afterward we were engaged on a project that needed to really snap.  The <a href="http://pingv.com/image/portfolio-gallery/website-portfolio/make-earth-day-every-day">Make Earth Day Every Day</a> project really needed their server to respond quickly.  They also need it to handle large numbers of visitors - Earth Day was coming up!  So, I put all my old and new performance tuning knowledge to work.</p>
<h3>Performance/Scalability Tuning in Practice</h3>
<p>While most of these techniques apply to dedicated servers or VPS, some of the ideas are useful for shared hosts as well.</p>
<p>First, I used the Apache Benchmark tool to test out the servers and see how they would perform as a baseline.  It's important to be methodical, do tests, make a small tweak, do more tests, and record the results along the way.  <strong>You can't manage what you don't measure.</strong>   With the default installation, the sites handled 5.5 requests per second.  The Drupal cache wasn't enabled, so my first step was to do that.  Immediately the performance went to 23 requests per second.</p>
<p>Using the vmstat diagnostic tools I learned about in the session I noticed that the CPUs on the web server were maxed out.  So, I installed the <a href="http://pecl.php.net/package/APC">APC opcode cache</a> which drastically reduces the amount of processing and memory required for each page load.  Without any further configuration requests per second went to 215.</p>
<p>Various other small tweaks (removing unnecessary Apache modules, and tweaks to the database configuration file) resulted in a gain of another 5 requests per second.</p>
<p>So, the final count is from 5 requests per second to over 220 requests per second.  Given the nature of the site we expected users to spend a minute or more on each page which should allow for more than 13,000 simultaneous users.  </p>
<p>There is much more valuable information in the output from the Apache Benchmark tool than just the requests per second, but it is an easy metric to use to help explain the magnitude of difference possible with some work in performance tuning.</p>
<h3>Performance/Scalability Documentation Round Up</h3>
<p>I've talked mostly about the seminar at OSCMS2007 given by Lullabot and the <a href="http://www.lullabot.com/articles/performance_and_scalability_seminar_slides">slides are available online</a>.  But really there are lots of great articles on tuning from the Drupal community both in the <a href="http://drupal.org/node/2601">Drupal.org Handbook</a> and on various other sites like <a href="http://2bits.com/articles/drupal-performance-tuning-and-optimization-for-large-web-sites.html">the 2bits.com book of Performance Tuning and Optimization for Large Sites</a>.</p>
<p>Among all of these locations you can find lots of great information to help you tune your site for optimum performance.</p>
     ]]></content>
  </entry>
</feed>
