<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Don&#039;t Forget to Plant It! &#187; performance</title>
	<atom:link href="http://blog.codeeg.com/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.codeeg.com</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 12:22:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Running FiveRuns TuneUp in a Separate Environment</title>
		<link>http://blog.codeeg.com/2008/10/05/running-fiveruns-tuneup-in-a-separate-environment/</link>
		<comments>http://blog.codeeg.com/2008/10/05/running-fiveruns-tuneup-in-a-separate-environment/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 01:23:24 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[FiveRuns TuneUp]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Profiling]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog2.codeeg.com/?p=168</guid>
		<description><![CDATA[FiveRuns&#8217; TuneUp is a great tool for profiling your Rails app, but by default it is always running in development. This causes two issues 1) every request is slower in development as it is always collecting profiling data, and 2) the TuneUp bar can mess with the layout of your application, especially if you&#8217;re rendering [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.fiveruns.com/products/tuneup">FiveRuns&#8217; TuneUp</a> is a great tool for profiling your Rails app, but by default it is always running in development.  This causes two issues 1) every request is slower in development as it is always collecting profiling data, and 2) the TuneUp bar can mess with the layout of your application, especially if you&#8217;re rendering content in iframes like we do with <a href="http://skribit.com">Skribit</a>.  So instead of having TuneUp always run in development mode, I&#8217;ve changed it to run only when the server is started in a new environment called &#8216;profiler&#8217;.   Here&#8217;s how I did it.</p>
<p>First, you need to tell TuneUp to only run in the profiler environment.  You do this by modifying <em>config/tuneup.rb</em> (create this file if it doesn&#8217;t already exist):</p>
<pre><code>Fiveruns::Tuneup.config do |config|
  config.environments.delete('development')
  config.environments &lt;&lt; 'profiler'
end</code></pre>
<p>Next, copy the development configuration block in <em>config/database.yml</em> and create a new block called <em>profiler</em>:</p>
<pre><code>profiler:
  adapter: mysql
  encoding: utf8
  database: YOUR_DATABASE
  username: YOUR_USERNAME
  password: YOUR_PASSWORD
  socket: /tmp/mysql.sock
</code></pre>
<p>Finally, create your profiler environment configs by copying your development configs:</p>
<pre><code>cp config/environments/development.rb config/environments/profiler.rb</code></pre>
<p>You&#8217;re all set!  Now, to run the server with TuneUp on, just run the server in the <em>profiler</em> environment:</p>
<pre><code>script/server -e profiler</code</pre>
<p>Now, I have TuneUp available to me only when I'm looking to optimize performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2008/10/05/running-fiveruns-tuneup-in-a-separate-environment/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Troubleshooting Performance Problems</title>
		<link>http://blog.codeeg.com/2008/06/10/troubleshooting-performance-problems/</link>
		<comments>http://blog.codeeg.com/2008/06/10/troubleshooting-performance-problems/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 02:27:49 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[skribit]]></category>

		<guid isPermaLink="false">http://dontforgettoplantit.wordpress.com/?p=146</guid>
		<description><![CDATA[Skribit&#8217;s downtime last Monday got me thinking about my past experience with performance tuning.  I&#8217;ve troubleshot a lot of performance problems in the past, and here are some things I&#8217;ve noticed: It&#8217;s Never Just Because Pure Load.  I&#8217;ve used this excuse many times before and still mutter it today, but I never truly believe it. [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Skribit&#8217;s downtime last Monday got me thinking about my past experience with performance tuning.  I&#8217;ve troubleshot a lot of performance problems in the past, and here are some things I&#8217;ve noticed:</p>
<p><strong>It&#8217;s Never Just Because Pure Load.</strong>  I&#8217;ve used this excuse many times before and still mutter it today, but I never truly believe it.  If you hear yourself saying this, it should be setting off red flags in the back of your head.  Look harder.  Why is it never because of load?  Because we don&#8217;t write perfect software.  Deadlines happen, we can&#8217;t always predict how users will use the site, and we sometimes we don&#8217;t know how things should be designed until later.  Basically, shit happens.  Chances are there&#8217;s something in the software that&#8217;s misbehaving under load.</p>
<p><strong>There are Long Term and Short Term Solutions.</strong>  Depending on the immediacy of the performance problems, you might want to tackle the short term solutions first.  It&#8217;s hard to fix the long term solution quickly and correctly when you have unhappy customers.</p>
<p><strong>Know the Performance Problems You&#8217;re Solving.</strong>  Don&#8217;t just guess at what the problem might be, try to figure out how to identify it.  Check the logs and maybe the resulting data created.  Try to predict how your site should behave when the problem is occurring and prove it out.  Even if this takes some time, you want to make sure your changes fix the problem, and that if performance problem still exists afterwards at least you know you&#8217;ve correctly fixed one problem.</p>
<p><strong>Caching is Great for Hammering out Performance Issues.</strong>  I usually use caching as the first line of defense against load.  Others like to tweak database indices, code, and/or configuration first, but my experience has been that caching gives you the most bang for your buck.  However, caching is like cleaning up your room by stuffing everything into your closet &#8211; if you don&#8217;t go back and clean things up later, things will eventually come crashing down.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2008/06/10/troubleshooting-performance-problems/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
