<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Eschew Obfuscation: Ruby on Rails Caching Benchmarks</title>
    <link>http://blog.maxdunn.com/articles/2006/09/12/ruby-on-rails-caching-benchmarks</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Max Dunn's Blog</description>
    <item>
      <title>Ruby on Rails Caching Benchmarks</title>
      <description>&lt;p&gt;I have been working on optimizing my &lt;a href="http://www.maxdunn.com"&gt;Ruby on Rails wiki&lt;/a&gt; so that it can stand up under heavy load. The first step I took was to implement caching so that the pages don&amp;#8217;t need to be re-rendered each time. This is especially important in my wiki since each page can have 6 different sections that need to be rendered:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;header&lt;/li&gt;
		&lt;li&gt;menu&lt;/li&gt;
		&lt;li&gt;footer&lt;/li&gt;
		&lt;li&gt;left column&lt;/li&gt;
		&lt;li&gt;middle column&lt;/li&gt;
		&lt;li&gt;right column.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;I did some quick benchmarks that might be useful for others that are optimizing their RoR apps:&lt;/p&gt;


	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Caching Method &amp;nbsp; &lt;/th&gt;
			&lt;th&gt; Page Load Time &amp;nbsp;&lt;/th&gt;
			&lt;th&gt;Pages per Second &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;None&lt;/td&gt;
			&lt;td&gt;620ms&lt;/td&gt;
			&lt;td&gt;1.6&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;Action&lt;/td&gt;
			&lt;td&gt;270ms&lt;/td&gt;
			&lt;td&gt;3.7&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;Page&lt;/td&gt;
			&lt;td&gt;18ms&lt;/td&gt;
			&lt;td&gt;55&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;p&gt;These times were produced with the web load testing program &lt;a href="http://grinder.sourceforge.net/"&gt;The Grinder&lt;/a&gt; on my Averatec &lt;span class="caps"&gt;AMD 2800&lt;/span&gt;+ laptop using WEBrick running Windows XP and Rails in development mode.&lt;/p&gt;


	&lt;p&gt;The main conclusion is that while utilizing Action caching doubled the performance, using Page caching increased the performance over 30 times!&lt;/p&gt;</description>
      <pubDate>Tue, 12 Sep 2006 17:56:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:1dc7614a-b102-403c-87de-35072014427a</guid>
      <author>Max Dunn</author>
      <link>http://blog.maxdunn.com/articles/2006/09/12/ruby-on-rails-caching-benchmarks</link>
      <category>Ruby on Rails</category>
    </item>
  </channel>
</rss>

