<?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>Inkzee &#187; performance</title>
	<atom:link href="http://blog.inkzee.com/index.php/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.inkzee.com</link>
	<description>How to read more in less time</description>
	<lastBuildDate>Wed, 12 May 2010 13:23:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/>		<item>
		<title>Efficent comunication protocols are critical</title>
		<link>http://blog.inkzee.com/index.php/2009/12/26/efficent-comunication-protocols-are-critical/</link>
		<comments>http://blog.inkzee.com/index.php/2009/12/26/efficent-comunication-protocols-are-critical/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 14:30:55 +0000</pubDate>
		<dc:creator>abarrera</dc:creator>
				<category><![CDATA[inkzee]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[communication protocol]]></category>
		<category><![CDATA[cpickle]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.inkzee.com/?p=78</guid>
		<description><![CDATA[As we said before, one on the problems we had when migrating to AWS was that the backend system was putting a lot of stress on the server. After a week of benchmarking we realized that the protocol we where using to communicate between the different subsystems we have was the main responsible for the [...]]]></description>
			<content:encoded><![CDATA[<p>As we <a href="http://blog.inkzee.com/index.php/2009/12/24/christmas-updates/">said before</a>, one on the problems we had when migrating to AWS was that the backend system was putting a lot of stress on the server. After a week of benchmarking we realized that the <strong>protocol</strong> we where using to <strong>communicate</strong> between the different subsystems we have was the <strong>main responsible for the load increment</strong>.</p>
<p>From day one we didn&#8217;t want to use complex and cryptic protocols so we chose <strong>xmlrpc</strong> for our communication channel. It was easy to implement, had wide support in php and python and was very easy to debug. We knew that at some point <strong>we would need to switch</strong> to a more efficient protocol, but we didn&#8217;t know it was going to be so soon.</p>
<p>After doing some <strong>extensive benchmarking</strong> we realize that the <strong>through output of the protocol was very low</strong>, not only that, if too many xmlrpc connections were spawned it would eventually consume all resources of the process (file descriptors, sockets and memory). This was a painful lesson to learn, but we did. So we <strong>switched</strong> to the most efficient protocol we could found, that is <strong>binary</strong>. To be more precise we employ <strong>python&#8217;s cPickle binary protocol</strong>. Saying that the use of this is orders of magnitude more efficient is not even close <img src='http://blog.inkzee.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>So after switching each subsystem to the new protocol we saw the load of the machines going down. As with all big changes in the backend of any system, it took a while to stabilize it. To avoid any havoc we actually put it into production subsystem by subsystem so <strong>during some time we had both protocols running at the same time</strong>.</p>
<p>And so, always remember that the choices you make will come to hunt you if not done correctly <img src='http://blog.inkzee.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inkzee.com/index.php/2009/12/26/efficent-comunication-protocols-are-critical/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Christmas updates</title>
		<link>http://blog.inkzee.com/index.php/2009/12/24/christmas-updates/</link>
		<comments>http://blog.inkzee.com/index.php/2009/12/24/christmas-updates/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 18:56:48 +0000</pubDate>
		<dc:creator>abarrera</dc:creator>
				<category><![CDATA[inkzee]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://blog.inkzee.com/?p=73</guid>
		<description><![CDATA[Hi all,
Sorry we&#8217;ve been so silent lately. It&#8217;s been a mad fall. Last post we wrote about a migration to Amazon Web Services (AWS). To be fair, the migration was a little painful. We had to set new machines with new software versions that made the system a little shaky for a while. We also [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>Sorry we&#8217;ve been so <strong>silent</strong> lately. It&#8217;s been a mad fall. <a href="http://blog.inkzee.com/index.php/2009/08/20/step-3-aws-migration/">Last post</a> we wrote about a migration to Amazon Web Services (AWS). To be fair, the <strong>migration was a little painful</strong>. We had to set new machines with new software versions that made the system a little shaky for a while. We also run into some really nasty performance issues with the new AWS instances.</p>
<p>First of all, if you have a<strong> Debian image</strong> as we had, be sure to <strong>use the correct fine tuned C libraries for Xen Virtualization</strong> (that&#8217;s what AWS runs on). We started having a huge load on the machines and after investigating we discovered we were using the wrong C library and it was really killing the server.</p>
<p>So after changing the libraries and setting up images that would autoconfigure themselves with the latest config files and code from the latest release, we setup the monitoring software. That&#8217;s when we discovered the magic of the AWS instances. When you&#8217;re the only one running stuff in your datacenter, everything runs smoothly, but when the US East Coast woke up, the performance of the machine would just drop alarmingly. The reason is that, when <strong>no one else is using the resources</strong> of the machine your VM is running, <strong>you&#8217;ll get extra resources</strong>, but when all the resources are being used, <strong>you&#8217;ll get capped</strong> to what is configured for that AWS instance. In our case, that was killing us.</p>
<p>After figuring out this, we started benchmarking the backend and looking for ways to decrease the stress. When we finally did, everything went back to normal. We had to fine tune some parameters but the worse part was done. That was our great AWS adventure that didn&#8217;t end up there. In the next posts we&#8217;ll write a little bit about different issues we had and <a href="http://blog.inkzee.com/index.php/2009/12/24/being-a-lean-startup/">things we&#8217;ve been doing lately</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inkzee.com/index.php/2009/12/24/christmas-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tokyo Tyrant and some numbers</title>
		<link>http://blog.inkzee.com/index.php/2009/06/28/tokyo-tyrant-and-some-numbers/</link>
		<comments>http://blog.inkzee.com/index.php/2009/06/28/tokyo-tyrant-and-some-numbers/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 17:13:26 +0000</pubDate>
		<dc:creator>abarrera</dc:creator>
				<category><![CDATA[inkzee]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[schema-less]]></category>
		<category><![CDATA[schemaless]]></category>
		<category><![CDATA[tokyo cabinet]]></category>
		<category><![CDATA[tokyo tyrant]]></category>

		<guid isPermaLink="false">http://blog.inkzee.com/?p=66</guid>
		<description><![CDATA[Tokyo Tyrant is the database server that uses Tokyo Cabinet as backend. It allows you to access the database remotely. It supports 3 protocols, binary, memcache and http. This is great if you have already existing infrastructure.
We needed a php class that implemented the protocol so we took a look at two of them,  [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Tokyo Tyrant</strong> is the database server that uses Tokyo Cabinet as backend. It allows you to access the database remotely. It<strong> supports 3 protocols</strong>, binary, memcache and http. This is great if you have already existing infrastructure.</p>
<p>We needed a php class that implemented the protocol so we took a look at two of them,  <a href="http://openpear.org/repository/Net_TokyoTyrant/">Net_TokyoTyrant</a> with Pete Warden&#8217;s patch and Tyrant by <a class="username" href="http://mamasam.indefero.net/u/golgote/">Bertrand Mansion</a>. The first one supports http and binary protocols, while Tyrant only supports the raw binary protocol.</p>
<p>During the first tests, Net_TokyoTyrant went crazy when inserting over 28000 records over http, so I guess there&#8217;s something wrong with that. When we switched to the binary protocol it worked as expected.</p>
<p>Here are some quick numbers:</p>
<p><strong>Net_TokyoTyrant (100000 keys)</strong></p>
<p>Time inserted: 50.3662779331 secs<br />
Time retrieved: 57.7555668354 secs<br />
Time deleted: 34.1996 secs</p>
<p><strong>Tyrant (100000 keys)</strong></p>
<p>Time inserted: 39.330272913 secs<br />
Time retrieved: 44.3433589935 secs<br />
Time deleted: 26.9360201359 secs</p>
<p><strong>The former is slightly faster</strong> so I guess we&#8217;ll go for it. Specially important is that the <strong>author keeps it up to date</strong>, which is also a plus!</p>
<p><strong>The Inkzee Team</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inkzee.com/index.php/2009/06/28/tokyo-tyrant-and-some-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Archiving news, what a wonderful thing</title>
		<link>http://blog.inkzee.com/index.php/2009/03/20/archiving-news-what-a-wonderful-thing/</link>
		<comments>http://blog.inkzee.com/index.php/2009/03/20/archiving-news-what-a-wonderful-thing/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 10:29:53 +0000</pubDate>
		<dc:creator>abarrera</dc:creator>
				<category><![CDATA[inkzee]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[partitioning]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[scalability]]></category>

		<guid isPermaLink="false">http://blog.inkzee.com/?p=41</guid>
		<description><![CDATA[Hi all,
Some days ago we rolled out a new release. Apart from fixing a bunch of minor bugs, we implemented an internal improvement. One of the problems we were running into is the huge amount of posts the system is tracking (last week was something around 650.000 posts). Problem is that accessing a single table [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>Some days ago we rolled out a new release. Apart from <strong>fixing a bunch of minor bugs</strong>, we implemented an <strong>internal improvement</strong>. One of the problems we were running into is the huge amount of posts the system is tracking (last week was something <strong>around 650.000 posts</strong>). Problem is that accessing a single table with that amount of records in it can be time expensive. The solution was simple, most of the posts that are stored are quite old (more than 3 or 4 months old) so we decided to move all those old posts to some other tables where they would be access much less. That meant that<strong> we offloaded a lot of information from the main post table</strong>, keeping the number of records there under control.</p>
<p>As usual, implementing this things isn&#8217;t as straight forward as we would like and we had to implement a specific logic so that if a user wanted to read more posts from a blog that had been archived we would return them to the user in a seamless way. It&#8217;s finally working and the <strong>site&#8217;s performance is considerably better</strong>, so we are quite happy.</p>
<p>During the next weeks we&#8217;ll be partitioning some tables so that the site goes even faster, we&#8217;ll keep you posted.</p>
<p>Thanks for your patient!</p>
<p><strong>The Inkzee Team</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inkzee.com/index.php/2009/03/20/archiving-news-what-a-wonderful-thing/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Better performance</title>
		<link>http://blog.inkzee.com/index.php/2008/08/02/better-performance/</link>
		<comments>http://blog.inkzee.com/index.php/2008/08/02/better-performance/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 00:13:03 +0000</pubDate>
		<dc:creator>abarrera</dc:creator>
				<category><![CDATA[inkzee]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cherokee]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[response]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://blog.inkzee.com/?p=16</guid>
		<description><![CDATA[Because for us, speed is one of our primary targets, we&#8217;ve just pushed a new update to our backend that enables memcache support for some parts of our code. It&#8217;s not all there yet, but the basics are there and response times will start getting better.
Right now, you&#8217;ll be able to experience a much better [...]]]></description>
			<content:encoded><![CDATA[<p>Because for us, speed is one of our primary targets, we&#8217;ve just pushed a <strong>new update</strong> to our backend that enables <strong>memcache</strong> <strong>support</strong> for some parts of our code. It&#8217;s not all there yet, but the <strong>basics</strong> are there and response times will start getting better.</p>
<p>Right now, you&#8217;ll be able to experience a <strong>much better performance</strong> when reading posts and fetching a list of titles from a given feed. During the next days we hope the response time will get better and better.</p>
<p>We&#8217;ve also <strong>migrated our webservers</strong> today from <strong>Apache</strong> to <strong>Cherokee</strong>. Although Apache is excellent in many ways, we don&#8217;t need a fully loaded Apache, so we&#8217;ve chosen Cherokee which is working fine for us.</p>
<p><strong>Thanks a lot for your patient</strong>!! And please, do sends us an email with any feedback you&#8217;ve got!</p>
<p>Have a nice weekend all!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inkzee.com/index.php/2008/08/02/better-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
