<?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>MySQL Expert, Linux, EC2 &#38; Scalability Consulting NYC &#187; Sean Hull</title> <atom:link href="http://www.iheavy.com/author/admin/feed/" rel="self" type="application/rss+xml" /><link>http://www.iheavy.com</link> <description>Heavyweight Internet Group +1-212-533-6828</description> <lastBuildDate>Mon, 30 Jan 2012 02:24:43 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>Great Interactive Map of NYC Startups</title><link>http://www.iheavy.com/2011/11/28/great-interactive-map-of-nyc-startups/</link> <comments>http://www.iheavy.com/2011/11/28/great-interactive-map-of-nyc-startups/#comments</comments> <pubDate>Mon, 28 Nov 2011 18:51:45 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Business]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Startups]]></category> <category><![CDATA[nycstartups]]></category> <category><![CDATA[techstartups]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=2074</guid> <description><![CDATA[Business Insider posted this spectacular interactive google map of our amazing Startup Ecosystem here in New York City.  Wow! Check out the full list of NYC Startups in the original article. View NYC Startups in a larger map]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F11%252F28%252Fgreat-interactive-map-of-nyc-startups%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2Fvdg152%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Great%20Interactive%20Map%20of%20NYC%20Startups%20%23nycstartups%20%23techstartups%22%20%7D);"></div><p>Business Insider posted this spectacular interactive google map of our amazing Startup Ecosystem here in New York City.  Wow!</p><p>Check out the full list of NYC Startups in the <a
href="http://www.businessinsider.com/nyc-startup-map-2011-11&amp;utm_campaign=visibli&amp;utm_source=nyctech&amp;utm_medium=twitter" target="_blank">original article</a>.</p><p><iframe
src="http://maps.google.com/maps/ms?vpsrc=0&amp;ctz=300&amp;ie=UTF8&amp;hl=en&amp;oe=UTF8&amp;msa=0&amp;msid=215172461931797238423.0004ae04d898b3f6f909e&amp;t=m&amp;source=embed&amp;ll=40.727976,-73.994808&amp;spn=0.056605,0.037187&amp;output=embed" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="425" height="350"></iframe><br
/> <small>View <a
style="color: #0000ff; text-align: left;" href="http://maps.google.com/maps/ms?vpsrc=0&amp;ctz=300&amp;ie=UTF8&amp;hl=en&amp;oe=UTF8&amp;msa=0&amp;msid=215172461931797238423.0004ae04d898b3f6f909e&amp;t=m&amp;source=embed&amp;ll=40.727976,-73.994808&amp;spn=0.056605,0.037187">NYC Startups</a> in a larger map</small></p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/11/28/great-interactive-map-of-nyc-startups/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Book Review &#8211; Effective MySQL</title><link>http://www.iheavy.com/2011/11/03/book-review-effective-mysql-optimizing-sql/</link> <comments>http://www.iheavy.com/2011/11/03/book-review-effective-mysql-optimizing-sql/#comments</comments> <pubDate>Thu, 03 Nov 2011 21:00:22 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Book Review]]></category> <category><![CDATA[Database Management]]></category> <category><![CDATA[Database Operations]]></category> <category><![CDATA[Scalability]]></category> <category><![CDATA[explain plan]]></category> <category><![CDATA[indexing]]></category> <category><![CDATA[mk-query-digest]]></category> <category><![CDATA[mysql tuning]]></category> <category><![CDATA[oracle press]]></category> <category><![CDATA[query profiling]]></category> <category><![CDATA[sql query tuning]]></category> <category><![CDATA[sql statements]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1924</guid> <description><![CDATA[Effective MySQL: Optimizing SQL Statements by Ronald Bradford No Nonsense, Readable, Practical, and Compact I like that this book is small; 150 pages means you can carry it easily.  It's also very no nonsense.  It does not dig too deeply into theory unless it directly relates to your day-to-day needs.  And those needs probably cluster [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F11%252F03%252Fbook-review-effective-mysql-optimizing-sql%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FvNhSXl%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Book%20Review%20-%20Effective%20MySQL%20%23explain%20plan%20%23indexing%20%23mk-query-digest%20%23mysql%20tuning%20%23oracle%20press%20%23query%20profiling%20%23sql%20query%20tuning%20%23sql%20statements%22%20%7D);"></div><h1>Effective MySQL: Optimizing SQL Statements</h1><h1>by Ronald Bradford</h1><p><strong>No Nonsense, Readable, Practical, and Compact</strong></p><p><img
class="alignleft size-full wp-image-1931" style="margin: 10px;" title="Effective MySQL" src="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/11/Effective-MySQL.jpg" alt="Effective MySQL" width="165" height="250" />I like that this book is small; 150 pages means you can carry it easily.  It's also very no nonsense.  It does not dig too deeply into theory unless it directly relates to your day-to-day needs.  And those needs probably cluster heavily around optimizing SQL queries, as those pesky developers are always breaking things <img
src='http://d1wcmuriwzc7sn.cloudfront.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p><p>Jokes aside, this new book out on Oracle Press is a very readable volume. Bradford has drawn directly from real-world experience to give you the right bite size morsels you need in your day-to-day MySQL activities.<span
id="more-1924"></span></p><h2><strong>Highlights</strong></h2><p>Chapter one, The Five Minute DBA gives you the basic methodology if you don't already know it.  Enable the slow query log, analyze it, and use the explain facility.  Then index as appropriate, or eliminate queries if you can.</p><p>Chapter two digs a little deeper into the basics, introducing explain extended, table statistics and storage engines.  You'll also learn how to use show session &amp; global status, as well as session &amp; global variables.  You'll also have your first look at MySQL's data dictionary - INFORMATION_SCHEMA.</p><p>Chapter three is where it starts to get meaty.  You probably know that MySQL has b-tree indexes, but did you know that it has b+tree indexes, or hash indexes?</p><p>Chapter four digs into indexes further with single &amp; multi-column indexes using them for sorting and joining.  You'll also find out about covering indexes which are multi-column matching the where clause, but also including columns needed in the SELECT predicate.  Do you have duplicate or unused indexes?  You'll learn why they matter to performance and how to eliminate them with tools like mk-duplicate-key-checker.</p><p>Chapter five continues along the same lines, with more coverage of indexes.  Learn to identify when you are using a covering index, fulfilling the entire query by only accessing the index.  You'll also learn about partial indexes, how they can reduce the size of index storage and retrieval while still getting your data for you.</p><p>Chapter six covers configuring the server itself, hitting on the system variables such as the innodb buffer pool (innodb_buffer_pool_size) and key buffer (key_buffer_size) as well as the query cache.  You'll also learn how to set the four main session memory settings - sort buffer (sort_buffer_size) and join buffer ( join_buffer_size) as well as the lesser known read buffers (read_buffer_size and read_rnd_buffer_size).</p><p>Chapter seven is all about the process of tuning and optimizing MySQL.  Rolling all the previous sections into marching orders, and prescriptive advice, he takes you through step by step how to apply the principles.  You'll get an introduction to <a
title="Maatkit Tools" href="http://www.maatkit.org/">mk-query-digest</a> (though strangely without attribution to <a
href="http://www.xaprb.com/blog/">Baron Schwartz</a>), the great maatkit tool for query analysis and aggregation, as well as the microsecond precision patch, which allows your mysql shell client to display more exact timing data.  For the patch he links back to an article on his own site which <a
title="not found page for microsecond precision patch" href="http://effectivemysql.com/articles/microsecond-precision-patch">seems to be not found</a>.  The author of the <a
title="get high precision times with your stock mysql client shell" href="http://www.flamingspork.com/blog/2011/02/08/timing-queries-in-the-21st-century-with-ld_preload-and-sed/">high precision mysql timer patch</a> is <a
href="http://www.flamingspork.com/blog/">Stewart Smith</a>.</p><p>I personally got the most out of Chapter eight, full of self-described hidden performance tips.  From identifying unused or duplicate indexes, to replacing inefficient data types with better ones, why it's important to use NOT NULL where possible or how to store IP addresses efficiently, this chapter has a lot of goodies.  For those still struggling with SQL statement tuning, there are a few patterns that are described, offering advice on how to rewrite a subquery as an inner join,</p><h4><strong>What you might not know</strong></h4><ul><li>MySQL includes Oracle's index organized tables by a different name</li><li>Too many indexes can dramatically impact INSERT &amp; UPDATE performance</li><li>Many DDL operations can be done online - see <a
title="Schlomi Noach's great openark toolkit" href="http://code.openark.org/forge/openark-kit">oak-online-alter-table (Shlomi Noach)</a></li><li>Datatypes matter - use enum, int unsigned, timestamp &amp; not null where possible</li><li>Covering indexes are your friend, duplicate &amp; unused indexes are not!</li><li>A replication slave can have different storage engines or indexes from the master. These can support different uses - such as data warehousing or non-transactional requirements.</li><li>While <strong>a_string LIKE '%end of my sentence.'</strong> won't use an index, you can index reverse_string, then use <strong>reverse_string LIKE REVERSE '%end of my sentence.'</strong> and MySQL <em>will</em> use this index.  You've simulated an advanced Oracle feature, reverse key indexes!</li></ul><h2><strong>A few small gripes</strong></h2><p>If I were to add a few complaints it would be to say that some of the examples were rather simplistic.  In many cases tuning SQL is not as simple as just adding the right index.  For instance there was no good discussion of the dreaded "using temporary, using filesort" that we see a lot in MySQL explains when sorting has to be done, but will not fit in memory.  Or what about tmpdir=/dev/shm, how will that improve things?  What about UNION versus UNION ALL where appropriate.  Why does DISTINCT do a sort?</p><p>The book was also missing a discussion of triggers, stored procedures, when or if the query cache can cause problems and so forth.  Also the article link mentioned about chapter seven isn't the only missing link.  I followed links to <a
href="http://effectivemysql.com/book/optimizing-sql-statements/">optimizing sql  statements</a> and it seems to go to a generic holding page.  Also the main link <a
href="http://effectivemysql.com/book/">effectivemysql.com/book</a> leads to an outline of an as yet unreleased <a
href="http://www.amazon.com/Effective-Backup-Recovery-Osborne-ORACLE/dp/0071788573/ref=sr_1_1?ie=UTF8&amp;qid=1320343610&amp;sr=8-1">title on Backup and Recovery</a>.</p><h2><strong>All in all, well worth your money</strong></h2><p>However, other than these few gripes the book overall is a very welcome addition to the small family of MySQL books.  Get a copy quick before they're all gone!</p><p>&nbsp;</p><p>&nbsp;</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/11/03/book-review-effective-mysql-optimizing-sql/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>5 Tips to Cache Websites and Boost Speed</title><link>http://www.iheavy.com/2011/11/01/5-tips-cache-websites-boost-speed/</link> <comments>http://www.iheavy.com/2011/11/01/5-tips-cache-websites-boost-speed/#comments</comments> <pubDate>Tue, 01 Nov 2011 19:00:49 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Scalability]]></category> <category><![CDATA[Website Basics]]></category> <category><![CDATA[caching]]></category> <category><![CDATA[cdn]]></category> <category><![CDATA[cloudfront]]></category> <category><![CDATA[memcache]]></category> <category><![CDATA[varnish]]></category> <category><![CDATA[w3 total cache]]></category> <category><![CDATA[wordpress]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1885</guid> <description><![CDATA[Often when we think about speeding up and scaling, we focus on the application layer itself.  We look at the webserver tier, and database tier, and optimize the most resource intensive pages. There's much more we can do to speed things up, if we only turn over the right stones.  Whether you're using WordPress or [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F11%252F01%252F5-tips-cache-websites-boost-speed%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FsYtAml%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%225%20Tips%20to%20Cache%20Websites%20and%20Boost%20Speed%20%23caching%20%23cdn%20%23cloudfront%20%23memcache%20%23varnish%20%23w3%20total%20cache%20%23wordpress%22%20%7D);"></div><p><a
href="http://www.iheavy.com/2011/11/01/5-tips-cache-websites-boost-speed/speedy-vs-roadrunner/" rel="attachment wp-att-1897"><img
class="alignleft size-full wp-image-1897" title="speedy vs roadrunner" src="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/11/speedy-vs-roadrunner.jpeg" alt="" width="244" height="204" /></a>Often when we think about speeding up and scaling, we focus on the application layer itself.  We look at the webserver tier, and database tier, and optimize the most resource intensive pages.</p><p>There's much more we can do to speed things up, if we only turn over the right stones.  Whether you're using WordPress or not, many of these principals can be applied.  However we'll use WordPress as our test case.</p><p><span
id="more-1885"></span></p><h2>Test Your Website speed</h2><p>There are web-based speed testing tools that will help with this step.  Take a look at <a
href="http://www.webpagetest.org/" target="_blank">Webpagetest</a> , <a
href="http://fpt.pingdom.com/" target="_blank">Pingdom</a> tools and Google's Chrome plugin Pagetest which integrates right into your browser.  If you're using firefox, take a look at <a
href="http://developer.yahoo.com/yslow/" target="_blank">YSlow</a> .</p><p>If you've already got the WordPress plugin W3 Total Cache installed, that also integrates with Google Speed Test through an API key.  That integrates right into your WordPress dashboard.</p><h2>1. Reduce objects</h2><p>The first thing you can do to improve page performance and response is to make the page simpler.  Fewer images, fewer posts, fewer plugins, fewer widgets and so forth all contribute to a speedier page.  Obviously you don't want to forfeit functionality, but if you are loading 20 posts, you might want to reduce them to five or ten.   If you are calling out to third party APIs to load badges, twitter counts or SKYPE buttons, consider each and its affect on webpage load times.</p><p>If you have access to the underlying HTML, your application should try to reduce the number of DOM objects that are created.  These are created as the HTML is parsed.  Simpler structure here means faster page load times.</p><h2>2. Compress objects</h2><p>Your page is full of objects.  Many of them such as images, can be compressed.  This saves server storage space, and is a smaller object to copy across the network to the end users browser.  The web page test will show you a list of objects that are good candidates for compression.</p><h2><strong>3. Employ page &amp; object caching</strong></h2><p>An object cache will store name/value pairs in memory for your application.  Essentially the webserver tier will cache data that it reads from the database to avoid additional round trips and network overhead.   For most of us, we'll want to get memcache installed in our webserver tier.</p><p>For a page cache, take a look at Varnish.  This can also be installed by package manager.  A page cache is like a tiny hyper efficient webserver.  It can sit on the webserver itself or on it's own server if you have many webservers in your environment.</p><p>Lastly if you have not already, grab the W3 Total Cache plugin for WordPress.  This plugin integrates directly with these two types of caches.  Simply click the Performance tab, select General Settings, and scroll to the object cache and varnish sections.</p><h2>4. Browser caching</h2><p>Browser caching is a tricky one.  You might think this is totally in the hands of the end user.  As it turns out, however the objects your webserver sends back to clients specifies various caching information in the HTTP headers.</p><p>Since we're encouraging you to test things yourself, fire up your command line terminal, and use "curl" to take a look at the headers of a file on your webserver.  Here's an example:</p><pre><span style="color: #333399;">$ curl -I http://www.iheavy.com/files/pros.gif</span></pre><pre><span style="color: #333399;">HTTP/1.1 200 OK</span></pre><pre><span style="color: #333399;">Date: Tue, 01 Nov 2011 04:58:55 GMT</span></pre><pre><span style="color: #333399;">Server: Apache/2.2.3 (CentOS)</span></pre><pre><span style="color: #333399;">Last-Modified: Wed, 24 Aug 2011 01:06:09 GMT</span></pre><pre><span style="color: #333399;">ETag: "1649b1fb-5562-4ab35eadfe240"</span></pre><pre><span style="color: #333399;">Accept-Ranges: bytes</span></pre><pre><span style="color: #333399;">Content-Length: 21858</span></pre><pre><span style="color: #333399;">Content-Type: image/gif</span></pre><p>&nbsp;</p><p>Now we'll go ahead and enable W3 Total Cache in wordpress, then rerun the same curl command again:</p><p>&nbsp;</p><pre><span style="color: #333399;">$ curl -I http://www.iheavy.com/files/pros.gif</span></pre><pre><span style="color: #333399;">HTTP/1.1 200 OK</span></pre><pre><span style="color: #333399;">Date: Tue, 01 Nov 2011 05:01:27 GMT</span></pre><pre><span style="color: #333399;">Server: Apache/2.2.3 (CentOS)</span></pre><pre><span style="color: #333399;">Last-Modified: Wed, 24 Aug 2011 01:06:09 GMT</span></pre><pre><span style="color: #333399;">ETag: "5562-4ab35eadfe240"</span></pre><pre><span style="color: #333399;">Accept-Ranges: bytes</span></pre><pre><span style="color: #333399;">Content-Length: 21858</span></pre><pre><span style="color: #333399;">Cache-Control: max-age=31536000, public, must-revalidate, proxy-revalidate</span></pre><pre><span style="color: #333399;">Expires: Wed, 31 Oct 2012 05:01:27 GMT</span></pre><pre><span style="color: #333399;">Vary: User-Agent</span></pre><pre><span style="color: #333399;">Pragma: public</span></pre><pre><span style="color: #333399;">X-Powered-By: W3 Total Cache/0.9.2.3</span></pre><pre><span style="color: #333399;">Content-Type: image/gif</span></pre><pre></pre><pre></pre><p>The main line we're interested here is the cache-control line.  Notice that the object has an expiration of 31536000.  Turns out that is the number of seconds in one week.  This tells the browser to keep these objects in its own cache and not refetch from the webserver each time.  That's a tremendous speedup.</p><h2>5. Employ a CDN</h2><p>If you haven't heard of CDN before, it stands for content delivery network.  Dropbox, the filesharing service is essentially a CDN service with a handsome user interface built on top of it.  Akamai is another famous CDN solution, one of the most mature, and respected available.  If you're on Amazon you might look at CloudFront, their CDN solution.</p><p>What is a CDN exactly?  Consider your pressing need for some basic groceries.  Maybe you need juice, a sandwich, beer or cigarettes.   If you're walking around the city, you'll find a deli on every corner.  That's the quickest way to get those items, a short walk and a short line.  When you need bigger items, you might make a weekly trek to Whole Foods.  From the perspective of food and beverage manufacturers you certainly want to get your products into the delis.  They are your grocery distribution networks, if you will.</p><p>W3 Total Cache supports Amazon CloudFront, simply enter your private and secret keys, and save.  Then upload all of your content up to S3 and you'll be benefiting from a CDN in no time.</p><h2><strong>Test again</strong></h2><p>Now that you've had a chance to look at all these caching opportunities, and hopefully implemented many of them in WordPress, rerun your Google Speed Test.</p><div
id="attachment_1887" class="wp-caption alignleft" style="width: 377px"><a
href="http://www.iheavy.com/2011/11/01/5-tips-cache-websites-boost-speed/screen-shot-2011-11-01-at-1-23-45-am/" rel="attachment wp-att-1887"><img
class="size-full wp-image-1887 " title="Google Page Test - Score of 91" src="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/11/Screen-shot-2011-11-01-at-1.23.45-AM.png" alt="google page test screenshot" width="367" height="269" /></a><p
class="wp-caption-text">Google Page Test - Score of 91</p></div><p>We were able to raise our score from the mid-70's to 91 after tweaking various pieces of the site.  We haven't even implemented image sprites yet.</p><p>Hopefully this time around you'll see some objects loaded via CDN, more objects compressed, and proper expirations on most if not all content on your site.</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><h2><strong>CDN &amp; caching are closer than you think</strong></h2><p>Most internet sites can make great gains in faster response time by looking in the right places.  Application and server rearchitecting give you a lot, but usually involve more complex and ongoing effort by developers.  However the basic caching improvements we described above will make a big difference as well.  CDN and caching technology is a lot more within reach than you think it is.</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/11/01/5-tips-cache-websites-boost-speed/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Oracle Announces Paid MySQL Add-ons</title><link>http://www.iheavy.com/2011/09/21/oracle-announces-paid-mysql-addons/</link> <comments>http://www.iheavy.com/2011/09/21/oracle-announces-paid-mysql-addons/#comments</comments> <pubDate>Wed, 21 Sep 2011 13:00:30 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Cloud Migrations]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Database Migrations]]></category> <category><![CDATA[Database Operations]]></category> <category><![CDATA[commercial mysql]]></category> <category><![CDATA[commercial mysql extensionsamazon rds]]></category> <category><![CDATA[drizzle]]></category> <category><![CDATA[mariadb]]></category> <category><![CDATA[oracle mysql announcement]]></category> <category><![CDATA[oracle rds]]></category> <category><![CDATA[percona]]></category> <category><![CDATA[state of mysql]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1509</guid> <description><![CDATA[ Oracle starts charging for MySQL Add-ons Exciting news, Oracle just announced commercial MySQL extensions that they'll be offering paid extensions to the core MySQL free product. To be sure, this has raised waves of concern among the community, but on the whole I suspect it will be a good thing for MySQL.  This brings more commercial [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F09%252F21%252Foracle-announces-paid-mysql-addons%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FnDPNjE%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Oracle%20Announces%20Paid%20MySQL%20Add-ons%20%23commercial%20mysql%20%23commercial%20mysql%20extensionsamazon%20rds%20%23drizzle%20%23mariadb%20%23oracle%20mysql%20announcement%20%23oracle%20rds%20%23percona%20%23state%20of%20mysql%22%20%7D);"></div><h1> Oracle starts charging for MySQL Add-ons</h1><p>Exciting news, Oracle<a
href="http://blogs.oracle.com/MySQL/entry/new_commercial_extensions_for_mysql"> just announced commercial MySQL extensions </a>that they'll be offering paid extensions to the core MySQL free product.</p><p>To be sure, this has raised waves of concern among the community, but on the whole I suspect it will be a good thing for MySQL.  This brings more commercial addons to the table, which only increases the options for customers.  Many will continue to use the core database product only, and avoid license hassles while others will surely embark on a hybrid approach if it solves their everyday business problems.<span
id="more-1509"></span></p><p>Speaking of licensing, back in May, Amazon <a
href="https://forums.aws.amazon.com/ann.jspa?annID=1031">announced that it's RDS or Relational Database Service would now offer Oracle as an option</a>.  For those familiar with negotiating Oracle licensing, and the concomitant headache, this is certainly a welcome addition.  It also marks a dramatic break from the previous per-cpu or per-seat licensing models, and Oracle's embrace of the cloud model of instant provisioning.  Interesting all around!</p><p>For those concerned about MySQL as a whole going commercial, there are three large companies continuing to support and distribute the core database including <a
href="http://www.percona.com/">Percona</a>, <a
href="http://montyprogram.com/">Monty Program AB</a> (MariaDB) and Brian Aker's fork <a
href="http://www.drizzle.org/">Drizzle</a>.  These distros have strong community support, and that strength will only grow.</p><p>&nbsp;</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/09/21/oracle-announces-paid-mysql-addons/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>3 Biggest MySQL Migration Surprises</title><link>http://www.iheavy.com/2011/08/29/3-biggest-mysql-migration-surprises/</link> <comments>http://www.iheavy.com/2011/08/29/3-biggest-mysql-migration-surprises/#comments</comments> <pubDate>Mon, 29 Aug 2011 19:48:28 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Database Migrations]]></category> <category><![CDATA[Database Operations]]></category> <category><![CDATA[mysql anomalies]]></category> <category><![CDATA[mysql explain plan]]></category> <category><![CDATA[mysql gotchas]]></category> <category><![CDATA[mysql joins]]></category> <category><![CDATA[mysql master slave data differences]]></category> <category><![CDATA[mysql migration gotchas]]></category> <category><![CDATA[mysql performance]]></category> <category><![CDATA[mysql query tuning]]></category> <category><![CDATA[mysql replication differences]]></category> <category><![CDATA[mysql replication failure]]></category> <category><![CDATA[mysql replication integrity checking]]></category> <category><![CDATA[mysql replication issues]]></category> <category><![CDATA[mysql single index per table]]></category> <category><![CDATA[mysql sorting queries]]></category> <category><![CDATA[mysql sql tuning]]></category> <category><![CDATA[mysql subqueries]]></category> <category><![CDATA[tuning mysql joins]]></category> <category><![CDATA[tuning mysql queries]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1320</guid> <description><![CDATA[3 ways your MySQL migration project can shake you up Once a development or operations team gets over the hurdle of open-source, and start to feel comfortable with the way software works outside of the enterprise world, they will likely start to settle in and feel comfortable.  Best not to get too cushy though for [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F29%252F3-biggest-mysql-migration-surprises%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FruVKZM%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%223%20Biggest%20MySQL%20Migration%20Surprises%20%23mysql%20anomalies%20%23mysql%20explain%20plan%20%23mysql%20gotchas%20%23mysql%20joins%20%23mysql%20master%20slave%20data%20differences%20%23mysql%20migration%20gotchas%20%23mysql%20performance%20%23mysql%20query%20tuning%20%23mysql%20replication%20differences%20%23mysql%20replication%20failure%20%23mysql%20replication%20integrity%20checking%20%23mysql%20replication%20issues%20%23mysql%20single%20index%20per%20table%20%23mysql%20sorting%20queries%20%23mysql%20sql%20tuning%20%23mysql%20subqueries%20%23tuning%20mysql%20joins%20%23tuning%20mysql%20queries%22%20%7D);"></div><h1>3 ways your MySQL migration project can shake you up</h1><p>Once a development or operations team gets over the hurdle of open-source, and start to feel comfortable with the way software works outside of the enterprise world, they will likely start to settle in and feel comfortable.  Best not to get too cushy though for there are more surprises hiding around the corner.  Here are a few of the biggest ones.<span
id="more-1320"></span></p><p><strong>1. Replication Is Not Perfect</strong></p><p>Yes, you've installed MySQL, setup a slave, and got it replicating properly.  You check the slave and it's 0 seconds behind the master.  What's more you monitor the error log file, and have a check in place to alert you if something happens there.  Job completed, good job!</p><p>Not so fast.  Unfortunately this is not the end of the story.  Many MySQL replication slaves are not consistent with their masters, but they drift apart silently.  Really?  Yes really.  But there are tools to help you.  Maatkit includes a checksum tool that will build checksums for all of your tables, and populate a table with that data.  Your checksum data then flows through replication to the slave.  From there you can perform a check on the slave to see if there are any differences.  Such a check is easy to wire into nagios or other monitoring software, to alert you as soon as a difference materializes in your slave database.</p><p>With vigilant data integrity checking in place, your MySQL slave is robust enough to perform backups off of.  But beware if you're not using tools to check and relying only on the error log.  This is unfortunately not sufficient.</p><p><strong>2. Queries With Bad Performance</strong></p><p>MySQL's optimizer is still fairly rudimentary.   There are some classes of queries that MySQL does not handle well.  If I were to provide a general rule it would be to stick to fairly simple queries, with at most a few joins.  Simpler lookups are sure to be fast.  Also less complex and convoluted queries are easier to understand, optimize and tune later on if they require it.</p><p><strong>Subqueries</strong></p><p>Although MySQL supports these, they often optimize badly, and perform terribly.  Review an explain plan to be sure you're optimal.  Replace such a query with a join where possible.</p><p><strong>Joins</strong></p><p>MySQL only supports the nested loops algorithm to do joins.  Merge join and hash join, two alternate and very efficient algorithms have not yet been implemented in MySQL unfortunately.  Be aware, run explain and profile your slow queries.</p><p><strong>Using Temporary; Using Filesort</strong></p><p>When MySQL has to do sorting, it does so in one of two ways.  If the dataset is small it'll use a quicksort, and do it in memory.  In this case you'll see just "using filesort".  However if  you see "Using Temporary; Using Filesort" in an EXPLAIN plan output, it means MySQL is using a two-pass algorithm to do a sort, creating a temporary table because it won't all fit in memory.   Sometimes a composite or multi-column index can help with these situations.  You may also affect this behavior by setting sort_buffer_size and join_buffer_size at the session level, then rerunning the explain.</p><p>Newer versions of MySQL such as 5.6 have gotten much smarter about this, as the optimizer is always being tweaked and improved.  Check your query plans in dev &amp; test before migrating your production database.</p><p><strong>Single Index Usage</strong></p><p>Although MySQL supports very efficient b-tree indexes, it cannot always use multiple indexes, or merge indexes together for more efficient path to data.  Although there are some exceptions, figure at each stage of a query and on each table MySQL will likely choose only one index.  When you're not satisfied with this, you may choose to build a covering or multi-column index.  Keep in mind these will only serve that one particular query, or a query against the leading edge column.  Also keep in mind that the more indexes you have built on a table, the less performant inserts, updates and deletes will be against this table.  All of those operations will require index maintenance so you must balance read performance (indexes on more columns) with write performance (requiring index maintenance and updating).</p><p><strong>3. Where Are The Transactional Tables?</strong></p><p>Yes MySQL does offer row-level locking, ACID compliance, and repeatable read and other isolation levels and referential integrity.  In fact it's implementation of the buffer cache to support reading and writing blocks from disk is modeled on Oracle's own algorithm.  So why are you getting all of that?</p><p>As it turns out MySQL supports various Storage Engines, unlike other databases which have all of this rolled into the kernel, and only support transactional tables.  This can be thought of as a feature although in reality it is more of a anomaly of how MySQL has evolved, and where it's roots lie.  As such the default storage engine is MySQL which is not transactional.  All changes are effectively auto-commit, and it only supports table level locking.</p><p>If you haven't checked already, verify what table types you have as follows:</p><p>mysql&gt; select table_schema, engine, count(*) from information_schema.tables group by table_schema, engine;</p><p>Outside of system tables, your application tables should all be InnoDB.  You can modify an existing table to be transactional as follows:</p><p>mysql&gt; alter table mytable engine=innodb;</p><p>You should also set storage_engine variable to default to Innodb.  Finally you may also choose to set the sql_mode NO_ENGINE_SUBSTITION which will force MySQL to flag an error whenever the storage engine you choose is not available.  This prevents it from creating a table with a storage engine other than your choice.</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/29/3-biggest-mysql-migration-surprises/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>5 Things That Are Toxic to Scalability</title><link>http://www.iheavy.com/2011/08/26/5-things-are-toxic-to-scalability/</link> <comments>http://www.iheavy.com/2011/08/26/5-things-are-toxic-to-scalability/#comments</comments> <pubDate>Fri, 26 Aug 2011 18:15:26 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Database Operations]]></category> <category><![CDATA[Scalability]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[application metrics]]></category> <category><![CDATA[asynchronous]]></category> <category><![CDATA[business metrics]]></category> <category><![CDATA[capacity planning]]></category> <category><![CDATA[decoupling]]></category> <category><![CDATA[feature flags]]></category> <category><![CDATA[master master database]]></category> <category><![CDATA[master master mysql]]></category> <category><![CDATA[master slave mysql master slave replication]]></category> <category><![CDATA[metrics collection]]></category> <category><![CDATA[mysql replication]]></category> <category><![CDATA[parallelization]]></category> <category><![CDATA[performance]]></category> <category><![CDATA[performance metrics]]></category> <category><![CDATA[scalability]]></category> <category><![CDATA[scalability by design]]></category> <category><![CDATA[scalability operations]]></category> <category><![CDATA[scalable web applications]]></category> <category><![CDATA[scalable web operations]]></category> <category><![CDATA[tracking metrics]]></category> <category><![CDATA[website metrics]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1318</guid> <description><![CDATA[Scalability is about application, architecture and infrastructure design, and careful management of server components. 1. Object Relational Mappers ORMs are popular among developers but not among performance experts.  Why is that?  Primarily these two engineers experience a web application from entirely different perspectives.  One is building functionality, delivering features, and results are measured on fitting [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F26%252F5-things-are-toxic-to-scalability%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2Frdb4LL%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%225%20Things%20That%20Are%20Toxic%20to%20Scalability%20%23application%20metrics%20%23asynchronous%20%23business%20metrics%20%23capacity%20planning%20%23decoupling%20%23feature%20flags%20%23master%20master%20database%20%23master%20master%20mysql%20%23master%20slave%20mysql%20master%20slave%20replication%20%23metrics%20collection%20%23mysql%20replication%20%23parallelization%20%23performance%20%23performance%20metrics%20%23scalability%20%23scalability%20by%20design%20%23scalability%20operations%20%23scalable%20web%20applications%20%23scalable%20web%20operations%20%23tracking%20metrics%20%23website%20metrics%22%20%7D);"></div><h1>Scalability is about application, architecture and infrastructure design, and careful management of server components.</h1><p><strong>1. Object Relational Mappers </strong></p><p>ORMs are popular among developers but not among performance experts.  Why is that?  Primarily these two engineers experience a web application from entirely different perspectives.  One is building functionality, delivering features, and results are measured on fitting business requirements.  Performance and scalability are often low priorities at this stage.  ORMs allow developers to be much more productive, abstracting away the SQL difficulties of interacting with the backend datastore, and allowing them to concentrate on building the features and functionality.<span
id="more-1318"></span></p><p>On the performance side the picture is a bit different.  By leaving SQL query writing to an ORM, you are faced with complex queries that the database cannot optimize well.  What's more ORMs don't allow easy tweaking of queries, slowing down the tuning process further.</p><p><strong>2. Synchronous, Serial, Coupled or Locking Processes</strong></p><p>Locking in a web application operates something like traffic lights in the real world.  Replacing a traffic light with a traffic circle often speeds up traffic dramatically.  That's because when you're out somewhere in the country where there's very little traffic, no one is waiting idly at a traffic light for no reason.  What's more even when there's a lot of traffic, a traffic circle keeps things flowing.  If you need locking, better to use InnoDB tables as they offer granular row level locking than table level locking like MyISAM tables.</p><p>Avoid things like semi-synchronous replication that will wait for a message from another node before allowing the code to continue.  Such waits can add up in a highly transactional web application with many thousands of concurrent sessions.</p><p>Avoid any type of two-phase commit mechanism that we see in clustered databases quite often.  Multi-phase commit provides a serialization point so that multiple nodes can agree on what data looks like, but they are toxic to scalability.  Better to use technologies that employ an <em>eventually consistent </em>algorithm.</p><p><strong>3. One Copy of Your Database</strong></p><p>Without replication, you rely on only one copy of your database.  In this configuration, you limit all of your webservers to using a single backend datastore, which becomes a funnel or bottleneck.  It's like a highway that is under construction, forcing all the cars to squeeze into one lane.  It's sure to slow things down.  Better to build parallel roads to start with, and allow the application aka the drivers to choose alternate routes as their schedule and itinerary dictate.</p><p><strong>4. Having No Metrics</strong></p><p>Having no metrics in place is toxic to scalability because you can visualize what is happening on your systems.  Without this visual cue, it is hard to get business units, developers and operations teams all on the same bandwagon about scalability issues.  If teams are having trouble groking this, realize that these tools simple provide analytics for infrastructure.</p><p>There are tons of solutions too, that use SNMP and are non-invasive.  Consider Cacti, Munin, OpenNMS, Ganglia and Zabbix to name a few.  Metrics collections can involve business metrics like user registrations, accounts or widgets sold.  And of course they should also include low level system cpu, memory, disk &amp; network usage as well as database level activity like buffer pool, transaction log, locking sorting, temp table and queries per second activity.</p><p><strong>5. Lack of Feature Flags</strong></p><p>Applications built without feature flags make it much more difficult to degrade gracefully.  If your site gets bombarded by a spike in web traffic and you aren't magically able to scale and expand capacity, having inbuilt feature flags gives the operations team a way to dial down the load on the servers without the site going down.   This can buy you time while you scale your webservers and/or database tier or even retrofit your application to allow multiple read and write databases.</p><p>Without these switches in place, you limit scalability and availability.</p><p>&nbsp;</p><h2>Want more?  <a
href=" http://eepurl.com/qPF1">Signup for our scalability newsletter.</a></h2>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/26/5-things-are-toxic-to-scalability/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>5 Tips for Better Database Change Management</title><link>http://www.iheavy.com/2011/08/26/5-tips-for-better-database-change-management/</link> <comments>http://www.iheavy.com/2011/08/26/5-tips-for-better-database-change-management/#comments</comments> <pubDate>Fri, 26 Aug 2011 17:42:35 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Database Management]]></category> <category><![CDATA[Database Operations]]></category> <category><![CDATA[High Availability]]></category> <category><![CDATA[Software Development]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[agile databse change management]]></category> <category><![CDATA[agile software development]]></category> <category><![CDATA[change management]]></category> <category><![CDATA[code deployments]]></category> <category><![CDATA[code push]]></category> <category><![CDATA[database change management]]></category> <category><![CDATA[ddl changes]]></category> <category><![CDATA[dml changes]]></category> <category><![CDATA[feature flags]]></category> <category><![CDATA[managed ddl changes]]></category> <category><![CDATA[managing database changes]]></category> <category><![CDATA[professional deployments]]></category> <category><![CDATA[reliable code push]]></category> <category><![CDATA[reliable deployments]]></category> <category><![CDATA[roll forward scripts]]></category> <category><![CDATA[rollback scripts]]></category> <category><![CDATA[software deployments]]></category> <category><![CDATA[software push]]></category> <category><![CDATA[version control for database change management]]></category> <category><![CDATA[versioning database changes]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1315</guid> <description><![CDATA[Deploying new code that includes changes to your database schema doesn't have to be a process fraught with stress and burned fingers. Follow these five tips and enjoy a good nights sleep. 1. Deploy with Roll Forward &#38; Rollback Scripts When developers check-in code that requires schema changes, that release should also require two scripts [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F26%252F5-tips-for-better-database-change-management%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FqY7Pj0%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%225%20Tips%20for%20Better%20Database%20Change%20Management%20%23agile%20databse%20change%20management%20%23agile%20software%20development%20%23change%20management%20%23code%20deployments%20%23code%20push%20%23database%20change%20management%20%23ddl%20changes%20%23dml%20changes%20%23feature%20flags%20%23managed%20ddl%20changes%20%23managing%20database%20changes%20%23professional%20deployments%20%23reliable%20code%20push%20%23reliable%20deployments%20%23roll%20forward%20scripts%20%23rollback%20scripts%20%23software%20deployments%20%23software%20push%20%23version%20control%20for%20database%20change%20management%20%23versioning%20database%20changes%22%20%7D);"></div><p>Deploying new code that includes changes to your database schema doesn't have to be a process fraught with stress and burned fingers. Follow these five tips and enjoy a good nights sleep.</p><p><strong>1. Deploy with Roll Forward &amp; Rollback Scripts</strong></p><p>When developers check-in code that requires schema changes, that release should also require two scripts to perform database changes. One script will apply those changes, alter tables to add columns, change data types, seed data, clean data, create new tables, views, stored procedures, functions, triggers and so forth. A release should also include a rollback script, which would return tables to their previous state.<span
id="more-1315"></span></p><p>This idea of database change management is popular as Migrations in Ruby on Rails. It is a convenient way to enforce good coding, and better database change management. However, keep in mind it has it's limits. See Perform Backup section below.</p><p><strong>2. Ban SELECT * FROM table</strong></p><p>Whenever you select from a table, be sure to specify the column names in all of your SQL code.  That way if later features or code changes add columns to that table, there is no potential to break old code that did SELECT * and got the old table column structure.  If the table was formerly returning four columns and after your code and schema changes returns five columns, it might break code that uses SELECT *.</p><p>The same goes for update statements.  Be sure to specify columns explicitely, and have a policy to enforce this on developers.</p><p><strong>3. Perform Backup on Affected Data</strong></p><p>Database rollback scripts have their limits, so a full database backup on any affected tables, or to be thorough the entire database, is a fully insured way to deploy database changes.</p><p>Since the developer's script cannot account for data in a live database, a rollback script will not work on database changes that do any of the following.  Only a backup will suffice:</p><ul><li>drop a table</li><li>drop a column</li><li>delete any data</li></ul><p><strong>4. Build in Feature Flags </strong></p><p>Feature flags provide the operations team with a mechanism to turn on or off a new feature.  If you're going the extra mile to build in these switches you will make rolling out new features a lot more trouble free.  Even better, include a mechanism to enable or disable a feature for a percentage or class of users.  That allows you to dial the feature on gradually or expose it only to a certain group of users.   In an emergency this will also come in handy as a way to quickly disable a new feature that has gone awry.</p><p><strong>5. Involve DBAs in the Review &amp; Test Process</strong></p><p>Before deploying a new release, include a process whereby the DBA must review schema changes and scripts.  This provides an additional sanity check, and a Database Administrators perspective on those changes.  He or she may well provide insight or caution on potential gotchas that you might encounter.</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/26/5-tips-for-better-database-change-management/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>5 Scalability Pitfalls to Avoid</title><link>http://www.iheavy.com/2011/08/22/5-scalability-pitfalls-to-avoid/</link> <comments>http://www.iheavy.com/2011/08/22/5-scalability-pitfalls-to-avoid/#comments</comments> <pubDate>Mon, 22 Aug 2011 06:09:31 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Database Operations]]></category> <category><![CDATA[High Availability]]></category> <category><![CDATA[Scalability]]></category> <category><![CDATA[Web Operations]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1304</guid> <description><![CDATA[1. Object Relational Mappers Software development has always made use of libraries, off-the-shelf components that are shared between different projects.  These allow you to stand on the shoulders of others and build bigger things.  Frameworks do the same thing, they provide a context from which to build on.  Ruby on Rails for example provides a [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F22%252F5-scalability-pitfalls-to-avoid%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FopuG2c%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%225%20Scalability%20Pitfalls%20to%20Avoid%22%20%7D);"></div><p><strong><a
href="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/08/scalability-pitfalls.png"><img
class="alignleft size-full wp-image-1399" title="scalability pitfalls" src="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/08/scalability-pitfalls.png" alt="" width="260" height="220" /></a>1. Object Relational Mappers</strong></p><p>Software development has always made use of libraries, off-the-shelf components that are shared between different projects.  These allow you to stand on the shoulders of others and build bigger things.  Frameworks do the same thing, they provide a context from which to build on.  Ruby on Rails for example provides a great starting framework from which to build web applications, managing sessions in an elegant way.<span
id="more-1304"></span></p><p>Unfortunately the same process when applied to interacting with and managing database access does not work well.  In these cases you build a framework for example that might treat tables as objects.  As you interact with and build code to use those objects, the ORM dynamically constructs the SQL to handle getting stuff into and out of the database.  Secretly no one likes writing SQL, and any layer of software that will do it for me has go to be a good thing!</p><p>Unfortunately for scalability it is decidedly *not* a good thing.  From Hibernate to ActiveRecord, these type of abstraction layers build SQL that is innefficient, and worse tough to get at when you want to optimize it.  That's what frameworks do well, hide that complexity.  Beware though in regards to future scalability.</p><p>Instead isolate your queries in one place, and use a read database handle, and a write handle.</p><p><strong>2. Serialization &amp; Synchronous Processes</strong></p><p>Synchronous processes usually block until a change makes it way to more than one place.  This is dangerous as your traffic grows higher - it becomes a real bottleneck.  Imagine a business where the boss has not learned to delegate tasks to underlings.  Everything must be ok'd by the big boss.  As the business grows larger, that one point - in software a serialization point - becomes the point of contention.  Can get ahold of the big boss, business slows to a standstill.</p><p>Better to delegate those tasks to direct reports - managers that you have given the authority to make certain decisions or sign checks for example.  In our infrastructure example we have components that are "eventually consistent" and can provide answers to questions about the data, or provide services that give answers that are sufficient.</p><p><strong>3. Complex Infrastructures</strong></p><p>Look at your network diagram.  Can you grok it quickly?  Can you explain it to new hires without struggling?  Or are their complex relationships, dependencies or assumptions built into it?  Simplify the stack and keep functional components on their own servers.   Simplicity is a discipline, like traveling cross-country without packing huge bags.  It requires you to constantly trim the fat, and eliminate unnecessary pieces or parts.</p><p><strong>4. Single Database Assumption</strong></p><p>Even if you're not at the point where you need to scale your database tier in the beginning, keep it in the back of your mind as you architect your application.  Don't assume you will talk to one backend datastore.  Build for a read handle and a write handle.  Then you will have already done much of the work to later scale since most applications do 80% reads and 20% writes.  You can easily load balance over multiple read-only slaves if necessary as well.</p><p><strong>5. Throwing Hardware at a Problem</strong></p><p>If you try to sidestep the hard stoic work of tuning your application, optimizing the work it is doing, disk I/O it is performing, or network roundtrips you are making, it will come back to bite you.  Thinking you can just buy bigger iron, and scale vertically will only get you so far.  One simple cannot compete with the other.  Buying hardware can get you 2x, 5x, maybe 10x.  Tuning SQL can get you 10,000x speedup.</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/22/5-scalability-pitfalls-to-avoid/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>4 Considerations Migrating to The Cloud</title><link>http://www.iheavy.com/2011/08/19/5-considerations-moving-business-to-the-cloud/</link> <comments>http://www.iheavy.com/2011/08/19/5-considerations-moving-business-to-the-cloud/#comments</comments> <pubDate>Sat, 20 Aug 2011 02:12:59 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Business]]></category> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Cloud Migrations]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Startups]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[amazon cloud]]></category> <category><![CDATA[amazon ec2]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[building cloud machine images]]></category> <category><![CDATA[capex]]></category> <category><![CDATA[cloud performance]]></category> <category><![CDATA[cloud security]]></category> <category><![CDATA[cloud security management]]></category> <category><![CDATA[ebs variability]]></category> <category><![CDATA[network performance]]></category> <category><![CDATA[opex]]></category> <category><![CDATA[SLA]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1298</guid> <description><![CDATA[When migrating to the cloud consider security and resource variability, the cultural shift for operations and the new cost model. 1. Costs Move to Operating Expenses When computing resources move from hardware, components and infrastructure that you buy and own, to those you rent by the hour, they also change places on your balance sheet.  [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F19%252F5-considerations-moving-business-to-the-cloud%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FpAwLrs%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%224%20Considerations%20Migrating%20to%20The%20Cloud%20%23amazon%20cloud%20%23amazon%20ec2%20%23best%20practices%20%23building%20cloud%20machine%20images%20%23capex%20%23cloud%20performance%20%23cloud%20security%20%23cloud%20security%20management%20%23ebs%20variability%20%23network%20performance%20%23opex%20%23SLA%22%20%7D);"></div><p>When migrating to the cloud consider security and resource variability, the cultural shift for operations and the new cost model.<span
id="more-1298"></span></p><p><strong>1. Costs Move to Operating Expenses</strong></p><p>When computing resources move from hardware, components and infrastructure that you buy and own, to those you rent by the hour, they also change places on your balance sheet.  They move from being capital expenses that depreciate over time to operating expenses.</p><p>At the end of the day, this is a very good thing because of the idea of discounted cash flow, and cost of capital in accounting.  It's always better to spend your money later.</p><p>That said it shifts how servers are provisioned, and how business units, and managers think about those expenses.  So expect some hiccups in that regard.</p><p><strong>2. Operations &amp; Automation - Cultural Shift</strong></p><p>Best practices include solid disaster recovery, backups and then fire drills to prove all your ducks are in a row.  But best practices often get sidelined for more pressing concerns, and other obstructing priorities.</p><p>With virtual cloud servers, you start with a server that is less reliable to begin with, and a lower SLA to boot.  So automation from your starting point moves to front and center.  This requires a more managed approach to rolling out servers, akin to a small software development team in the habit of rolling out code manually, being pressed to move into version control.  This new managed approach to web operations is a good thing, encouraging configuration management, and automating resource provisioning tools like Chef.  Still it is a cultural shift, and one that won't happen overnight.</p><p><strong>3. Security</strong></p><p>Although the Amazon environment does not provide perimeter security, the security groups model can provide equally good security if managed well.  But one also has to manage other things closely such as:</p><ul><li>authentication keys</li><li>machine images - built without sensitive data in the AMI</li></ul><p>Furthermore compliance questions are often on everyones mind.  While you cannot say for sure <em>where</em> your data is physically located in the AWS environment, you can control whether it is encrypted or not, and you control those encryption keys.  Nevertheless legal requirements may have other plans in this regard.</p><p>Consider also what would happen if your cloud provider were hit with a lawsuit that being overly broad, sweeps some of your servers into its net.  How will you handle such a scenario?  Use multiple cloud providers and test your disaster recovery scenarios.</p><p><strong>4. Resource Variability</strong></p><p>Like moving from big iron to commodity servers fifteen years ago, cloud hosted environments can take some getting used to.  In the virtualized environment, the CPU, disk and network resources you are allocated are based on computed averages.  At any time the disk I/O throughput for example can fluctuate higher, or quite a bit lower than the service level agreement for that instance type.</p><p>All of the practices and methods for promoting scalability, decoupling components, caching agressively, and scaling horizontally will reduce the impact of these resource variabilities.  In the same way the internet masses can descend on your website without warning, building a robust infrastructure to stand up to the vagaries of virtualization will go a long way towards helping you scale smoothly when traffic spikes.</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/19/5-considerations-moving-business-to-the-cloud/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Review &#8211; Who Moved My Cheese</title><link>http://www.iheavy.com/2011/08/17/review-who-moved-my-cheese/</link> <comments>http://www.iheavy.com/2011/08/17/review-who-moved-my-cheese/#comments</comments> <pubDate>Thu, 18 Aug 2011 02:01:11 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Book Review]]></category> <category><![CDATA[Business]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Startups]]></category> <category><![CDATA[approach to change]]></category> <category><![CDATA[business disruption]]></category> <category><![CDATA[business innovation]]></category> <category><![CDATA[change management]]></category> <category><![CDATA[changing marketplace]]></category> <category><![CDATA[disruptive marketplace]]></category> <category><![CDATA[disruptive technologies]]></category> <category><![CDATA[embracing change]]></category> <category><![CDATA[innovation]]></category> <category><![CDATA[job change]]></category> <category><![CDATA[job security]]></category> <category><![CDATA[managing change]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1296</guid> <description><![CDATA[Spencer Johnson is a great writer.  His business book classic was a real page turner.  He takes a page from the REWORK book and that's a good thing. Who Moved My Cheese is a story about mice living in a maze happy and content that they have an unlimited supply of cheese.  Then one day [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F17%252Freview-who-moved-my-cheese%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FraZyXW%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Review%20-%20Who%20Moved%20My%20Cheese%20%23approach%20to%20change%20%23business%20disruption%20%23business%20innovation%20%23change%20management%20%23changing%20marketplace%20%23disruptive%20marketplace%20%23disruptive%20technologies%20%23embracing%20change%20%23innovation%20%23job%20change%20%23job%20security%20%23managing%20change%22%20%7D);"></div><p><a
href="http://www.iheavy.com/2011/08/17/review-who-moved-my-cheese/who-moved-my-cheese/" rel="attachment wp-att-1524"><img
class="alignleft size-full wp-image-1524" title="who-moved-my-cheese" src="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/08/who-moved-my-cheese.jpg" alt="whomovedmycheese" width="190" height="286" /></a></p><p>Spencer Johnson is a great writer.  His business book classic was a real page turner.  He takes a page from the REWORK book and that's a good thing.</p><p>Who Moved My Cheese is a story about mice living in a maze happy and content that they have an unlimited supply of cheese.  Then one day the cheese runs out.  <span
id="more-1296"></span>Some approach this new reality by sniffing, and scurrying.  Before long they find new cheese, and more opportunities than they had before.  Some other mice hem and haw, and resist the new reality, pointing fingers, getting angry, but not facing the situation.</p><p>Of course these are situations we all face everyday.  Outsourcing changes the job landscape, technologies such as the internet disrupt established industries like newspapers, music, and media.  What's more the recent upheaval in the financial industry had at least some basis in the computerization of trading, and the acceleration of global markets.</p><p>The landscape is always changing.  Johnson's book speaks great lessons that we can all understand, and benefit from everyday in business.</p><p><a
href="http://www.amazon.com/Who-Moved-My-Cheese-Amazing/dp/0399144463/">Find Who Moved My Cheese on Amazon.</a></p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/17/review-who-moved-my-cheese/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Top 3 Questions From Clients</title><link>http://www.iheavy.com/2011/08/15/top-3-questions-clients-ask-us-about/</link> <comments>http://www.iheavy.com/2011/08/15/top-3-questions-clients-ask-us-about/#comments</comments> <pubDate>Mon, 15 Aug 2011 21:16:01 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Database Management]]></category> <category><![CDATA[Database Operations]]></category> <category><![CDATA[Disaster Recovery]]></category> <category><![CDATA[High Availability]]></category> <category><![CDATA[Scalability]]></category> <category><![CDATA[Startups]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[client questions]]></category> <category><![CDATA[common challenges]]></category> <category><![CDATA[common questions]]></category> <category><![CDATA[faster websites]]></category> <category><![CDATA[high traffic websites]]></category> <category><![CDATA[website performance]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1294</guid> <description><![CDATA[1. This page or area of the website is very slow, why? There are a lot of components that make up modern internet websites, and a lot of places to get stuck in the mud.  Website performance starts with the browser, what caching it is doing, their bandwidth to your server, what the webserver is [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F15%252Ftop-3-questions-clients-ask-us-about%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FpR0wuk%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Top%203%20Questions%20From%20Clients%20%23best%20practices%20%23client%20questions%20%23common%20challenges%20%23common%20questions%20%23faster%20websites%20%23high%20traffic%20websites%20%23website%20performance%22%20%7D);"></div><p><strong><a
href="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/08/question-links.jpeg"><img
class="alignleft size-full wp-image-1403" title="question links" src="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/08/question-links.jpeg" alt="" width="255" height="198" /></a>1. This page or area of the website is very slow, why?</strong></p><p>There are a lot of components that make up modern internet websites, and a lot of places to get stuck in the mud.  Website performance starts with the browser, what caching it is doing, their bandwidth to your server, what the webserver is doing (caching or not and how), if the webserver has sufficient memory, and then what the application code is doing and lastly how it is interacting with the backend database.<span
id="more-1294"></span></p><p>With all this complexity, it's no wonder so many sites struggle.  Typically these types of analysis start with some load testing, to stress test your setup, so you can watch for leaks.  Then some tools are applied to the webserver tier, and the database tier to see where the bottleneck lies.  It may be in the network itself, and how much data is passed back and forth.  Or it may be badly formed queries being sent to the database, asking it to do more work than it needs to.  Imagine looking up a friends phone number with only a first name.  You're going to be there all day digging through the phone book, getting nowhere.  This happens when a database isn't indexed properly.</p><p>At the end of the day we've seen these types of scenarios over and over, and know where to look to sniff out the trouble.</p><p><strong>2. How can we make our database go faster?</strong></p><p>Databases are tremendous workhorses, and they do a heroes job of storing a retrieving just the information we want.  But they require care and feeding.</p><ul><li>Monitor and tune your SQL queries</li><li>Use the fastest disk subsystem you can - RAID 10</li><li>Allocate all of your memory &amp; in the right places</li></ul><p><strong>3. Are we covered as far as backups &amp; high availability?</strong></p><p>I hear this question a lot as well, and it's a good one to be concerned about.  With all your crown jewels in a central data store you want to know for sure you can restore it.  What's the best way to know that?  Actually restore your backups.  Run a fire drill.  Rebuild the whole thing!  Here are all the pieces you'll need to consider:</p><ul><li>All packages installed - from the ground up</li><li>All software configurations, especially apache, memcache, varnish, MySQL</li><li>All your own software components - from your version control system</li><li>A dump of your database</li><li>Database transaction logs to roll forward changes since the dump happened</li><li>AMIs if you are in the cloud</li></ul><p>If you're lucky enough to be in the cloud, all of this can be scripted.  Run fire drills to your hearts content, and kill the instances when you're satisfied that you're covered!</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/15/top-3-questions-clients-ask-us-about/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Open Source Enables the Cloud</title><link>http://www.iheavy.com/2011/08/10/open-source-enables-the-cloud/</link> <comments>http://www.iheavy.com/2011/08/10/open-source-enables-the-cloud/#comments</comments> <pubDate>Wed, 10 Aug 2011 19:32:12 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[amazon ec2]]></category> <category><![CDATA[cloud data centers]]></category> <category><![CDATA[infrastructure design]]></category> <category><![CDATA[internet acceleration]]></category> <category><![CDATA[open-source]]></category> <category><![CDATA[open-source components]]></category> <category><![CDATA[virtualization]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1285</guid> <description><![CDATA[With the fast growth of virtualized data centers, and companies like Google, Amazon and Facebook, it's easy to forget how much is built on open-source components, aka commodity software.  In a very real way open-source has enabled the huge explosion of commodity hardware, the fast growth of the internet itself, and now the further acceleration [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F10%252Fopen-source-enables-the-cloud%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2Fn5pnqu%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Open%20Source%20Enables%20the%20Cloud%20%23amazon%20ec2%20%23cloud%20data%20centers%20%23infrastructure%20design%20%23internet%20acceleration%20%23open-source%20%23open-source%20components%20%23virtualization%22%20%7D);"></div><p>With the fast growth of virtualized data centers, and companies like Google, Amazon and Facebook, it's easy to forget how much is built on open-source components, aka commodity software.  In a very real way open-source has enabled the huge explosion of commodity hardware, the fast growth of the internet itself, and now the further acceleration through cloud services, cloud infrastructure, and virtualization of data centers.</p><p>Your typical internet stack and application now stands on the shoulders of tens of thousands of open source developers and projects.  Let's look at a few of them.<span
id="more-1285"></span></p><p><strong>1. Operating System - Linux</strong></p><p>The commodity hardware craze would never have happened without the help of an open-source operating system to run on it.  Linux is an old story now, nonetheless everything else stands on it's shoulders.</p><p><strong>2. Multi-purpose Webserver - Apache</strong></p><p>As of July of 2011, Apache stands with 66% of the webserver market, above Microsoft IIS with 17% according to Netcraft.  That speaks volumes about the popularity of the open source webserver.  All sorts of applications and languages use the apache webserver as the way to serve up content on the internet.  In effect there is a 66% chance that your browser is talking to Apache for any given site you visit.</p><p><strong>3. Multi-purpose Relational Database - MySQL</strong></p><p>Back in the late 90's we worked at tons of internet startups.  They all used Apache on the frontend and Oracle on the backend.  These days we rarely here of internet sites aka web-facing databases on Oracle.  That's because MySQL has matured quite a lot in the past decade, and now provides all of the basic bells and whistles that a complex internet site requires.  Transactions, crash protection, high availability features, and data integrity.</p><p><strong>4.Content Management System - Drupal, Django, WordPress, Joomla</strong></p><p>The growth and popularity of open-source CMS systems is also evident.  Although much of what they do can and has been built from scratch, they enable a better starting point, providing you a strong framework around which to build a full-feature and scalable site.</p><p><strong>5. Languages and Frameworks - PHP, Perl, Ruby on Rails</strong></p><p>Let's not forget the languages and frameworks that all of these web applications are written in.   PHP with it's very DIY evolution, has grown to fill the needs of real developers.  With tons of community development, contributions and support, it also is illustrative of what open-source has brought to the web.</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/10/open-source-enables-the-cloud/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Cloud for Burst Capacity</title><link>http://www.iheavy.com/2011/08/08/cloud-for-burst-capacity/</link> <comments>http://www.iheavy.com/2011/08/08/cloud-for-burst-capacity/#comments</comments> <pubDate>Mon, 08 Aug 2011 19:22:23 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Cloud Migrations]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Scalability]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[alwayson]]></category> <category><![CDATA[autoscaling]]></category> <category><![CDATA[burst capacity]]></category> <category><![CDATA[capacity planning]]></category> <category><![CDATA[cloud computing use cases]]></category> <category><![CDATA[high availability]]></category> <category><![CDATA[horizontal scalability]]></category> <category><![CDATA[operational expenditures and cloud computing]]></category> <category><![CDATA[seasonal traffic]]></category> <category><![CDATA[seasonal traffic applications]]></category> <category><![CDATA[spend later]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1283</guid> <description><![CDATA[One very strong case for cloud computing is that it can satisfy applications with seasonal traffic patterns.  One way to test the advantages of the cloud is through a hybrid approach. Cloud infrastructure can be built completely through scripts.  You can spinup specific AMIs or machine images, automatically install and update packages, install your credentials, [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F08%252Fcloud-for-burst-capacity%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2Fqf4Rv7%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Cloud%20for%20Burst%20Capacity%20%23alwayson%20%23autoscaling%20%23burst%20capacity%20%23capacity%20planning%20%23cloud%20computing%20use%20cases%20%23high%20availability%20%23horizontal%20scalability%20%23operational%20expenditures%20and%20cloud%20computing%20%23seasonal%20traffic%20%23seasonal%20traffic%20applications%20%23spend%20later%22%20%7D);"></div><p>One very strong case for cloud computing is that it can satisfy applications with seasonal traffic patterns.  One way to test the advantages of the cloud is through a hybrid approach.</p><p>Cloud infrastructure can be built completely through scripts.  You can spinup specific AMIs or machine images, automatically install and update packages, install your credentials, startup services, and you're running.</p><p>All of these steps can be performed in advance of your need at little cost.  Simply build and test.  When you're finished, shutdown those instances.  What you walk away with is scripts.  What do we mean?</p><p>The power here is that you carry zero costs for that burst capacity until you need it.  You've already build the automation scripts, and have them in place.  When your capacity planning warrants it, spinup additional compute power, and watch your internet application scale horizontally.  Once your busy season is over, scale back and disable your usage until you need it again.</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/08/cloud-for-burst-capacity/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>iHeavy Insights 83 &#8211; Shoe Leather Cost</title><link>http://www.iheavy.com/2011/08/08/iheavy-insights-83-shoe-leather-cost/</link> <comments>http://www.iheavy.com/2011/08/08/iheavy-insights-83-shoe-leather-cost/#comments</comments> <pubDate>Mon, 08 Aug 2011 18:27:19 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Business]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[iHeavy Newsletter]]></category> <category><![CDATA[hidden costs]]></category> <category><![CDATA[overhead]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1288</guid> <description><![CDATA[Shoe leather cost is similar to opportunity cost.  It refers to the cost of counteracting inflation by keeping less of your assets in cash.  Your strategy would require more trips to the bank and more walking, and incur a cost in the wearing out of the leather in your shoes. All joking aside, it's an [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F08%252Fiheavy-insights-83-shoe-leather-cost%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FrnwFiH%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22iHeavy%20Insights%2083%20-%20Shoe%20Leather%20Cost%20%23hidden%20costs%20%23overhead%22%20%7D);"></div><p>Shoe leather cost is similar to opportunity cost.  It refers to the cost of counteracting inflation by keeping less of your assets in cash.  Your strategy would require more trips to the bank and more walking, and incur a cost in the wearing out of the leather in your shoes.</p><p>All joking aside, it's an interesting idea.  It highlights how there are all sorts of hidden costs to different strategies.  There are hidden costs to using coupons, loyalty cards, frequent flyer miles, managing assets &amp; investments, hiring resources and in general running a business.  Let's look at a few.<span
id="more-1288"></span></p><p><strong>Cost of R&amp;D</strong></p><p>Years ago I wanted to open a mutual fund and did some research.  Luckily a friend pointed me towards Vanguard, and I got on the index investing bandwagon early.  I've had a lot of opportunities to buy stocks directly, but I've seen too many surprises in the market even in areas of tech stocks and business that I understand very well.</p><p>What's more stock investing requires attention, research into fundamentals, and certainly a bit of luck.  In my case my background is engineering, so finance is not my strong suit.  In effect there is more cost hidden there, getting up to speed in a new discipline and the many hidden surprises and fine print.</p><p>By choosing an index fund strategy you track the market, are guaranteed to beat 90% of stocks and mutual funds over time, pay a very very small fee as those funds are not actively managed by a fund manager with costs and overhead.  What's more the shoe leather cost is very low.   It's a no brainer.</p><p><strong>Cost in People Search</strong></p><p>Whatever technologies you choose, you embark down a path with costs on all sides.  Costs of hardware &amp; software components, costs of licenses, and costs to find people with those skill sets.  Deciding to use the latest wiz-bang technology as an early adopter that looks like it will provide you a lot of extra bang for your buck.</p><p>Consider carefully what the market adoption of that technology is, as you will inevitably have to find resources skilled in servicing those components down the line.  Lean heavily toward widely adopted technologies and you'll have an easier time finding skilled technologists in the future.</p><p><strong>Not Your Core Business</strong></p><p>Early on publishing our newsletter, we chose to host the newsletter software ourselves.  The open-source solution was robust and full featured.  However many of the features proved cumbersome to configure.  Since we had the basic functionality working, we left the more complex switches alone.  This solution was a free one since we already hosted a server for the website.</p><p>Eventually we switched to mailchimp.com to host the newsletter.  Suddenly many hidden costs came to light.  By hosting ourselves we were ending up in spam folders for a lot of users.  So we were reducing our audience.  Plus we could not track who was reading the newsletter, which issues were popular, or what sections.  That analytical data provide invaluable.  What's more mailchimp integrates and automates a lot of other functions that were done manually before.  Freeing up time!</p><p><strong>To Sum Up</strong></p><p>Whenever you are spending inordinate time on something that is not your core business, chances are the shoe leather cost is high, and outsourcing that to a provider who specializes in that become a great cost saver.</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/08/iheavy-insights-83-shoe-leather-cost/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Book Review – Rework</title><link>http://www.iheavy.com/2011/08/06/review-37-signals-rework-is-chock-full-of-great-ideas/</link> <comments>http://www.iheavy.com/2011/08/06/review-37-signals-rework-is-chock-full-of-great-ideas/#comments</comments> <pubDate>Sat, 06 Aug 2011 20:12:54 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Book Review]]></category> <category><![CDATA[Business]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Startups]]></category> <category><![CDATA[37signals]]></category> <category><![CDATA[build on success]]></category> <category><![CDATA[david heinemeier hansson]]></category> <category><![CDATA[efficiency]]></category> <category><![CDATA[freelancing]]></category> <category><![CDATA[jason fried]]></category> <category><![CDATA[organic growth]]></category> <category><![CDATA[productivity]]></category> <category><![CDATA[quality]]></category> <category><![CDATA[small business]]></category> <category><![CDATA[smb]]></category> <category><![CDATA[startup advice]]></category> <category><![CDATA[time management]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1278</guid> <description><![CDATA[Rework is chock full of ideas Jason Fried and David Heinemeier Hansson's new book REWORK is one of the best startup business books I've read since Alan Weiss' Million Dollar Consulting. If you're already a fan of their signal vs noise blog, you'd be familiar with their terse style. Sharp and to the point. Which [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F06%252Freview-37-signals-rework-is-chock-full-of-great-ideas%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2Fp5IXQF%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Book%20Review%20%E2%80%93%20Rework%20%20%2337signals%20%23build%20on%20success%20%23david%20heinemeier%20hansson%20%23efficiency%20%23freelancing%20%23jason%20fried%20%23organic%20growth%20%23productivity%20%23quality%20%23small%20business%20%23smb%20%23startup%20advice%20%23time%20management%22%20%7D);"></div><h1><img
class="alignleft size-full wp-image-1714" title="rework-cover-front-big" src="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/08/rework-cover-front-big.png" alt="rework cover" width="144" height="220" />Rework is chock full of ideas</h1><p>Jason Fried and David Heinemeier Hansson's new book REWORK is one of the best startup business books I've read since Alan Weiss' <em>Million Dollar Consulting</em>. If you're already a fan of their <a
href="http://37signals.com/svn">signal vs noise blog</a>, you'd be familiar with their terse style. Sharp and to the point.</p><p>Which is why you can pick it up and read it in a few hours.  You'll want to because it's well written and pared down to essentials.  In fact the book reads like their workflow advice, less mass, do it yourself, cut out the fat, concentrate on essentials.  As such they are clearly practicing what they preach, which I like.<span
id="more-1278"></span></p><p>This book isn't really for large businesses and corporate success.  It's for startups, and freelancers, and small teams.  It focuses on how and why you should do something yourself before outsourcing it so you can learn what to look for.</p><p>Here are some choice quotes from the book:</p><ol><li><em>The menus in failing restaurants offer too many dishes.</em></li><li><em>When you impose a deadline you gain clarity.</em></li><li><em>Timeliness is more important than polish</em></li><li><em>Reality never sticks to best-case scenarios.</em></li><li><em>Do less than your competitors to beat them.</em></li><li><em>Share information that's valuable and you'll slowly build a loyal audience.</em></li><li><em>Trade the dream of overnight success for slow, measured growth.</em></li><li><em>Getting back to people quickly is the most important thing you can do in customer service.</em></li><li><em>Optimize for now and worry about the future later.</em></li><li><em>You don't need more hours you need better hours.</em></li></ol><p>In fact I started out with a list of my favorite twenty quotes from the book and cut it down to these ten.  Go get this book, you'll be glad you read it.</p><p><a
href="http://www.amazon.com/Rework-Jason-Fried/dp/0307463745">Find REWORK on amazon</a></p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/06/review-37-signals-rework-is-chock-full-of-great-ideas/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>8 Questions to ask an AWS Expert</title><link>http://www.iheavy.com/2011/08/05/ec2-interview-aws-interview-cloud-interview-8-questions/</link> <comments>http://www.iheavy.com/2011/08/05/ec2-interview-aws-interview-cloud-interview-8-questions/#comments</comments> <pubDate>Fri, 05 Aug 2011 14:42:31 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Database Operations]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[amazon web services]]></category> <category><![CDATA[aws interview questions]]></category> <category><![CDATA[cloud interview questions]]></category> <category><![CDATA[cloud provisioning questions]]></category> <category><![CDATA[ec2 interview questions]]></category> <category><![CDATA[ec2 professional services]]></category> <category><![CDATA[ec2 questions]]></category> <category><![CDATA[infrastructure expertise]]></category> <category><![CDATA[new york ec2 expert]]></category> <category><![CDATA[new york internet consulting]]></category> <category><![CDATA[provisioning cloud infrastructure]]></category> <category><![CDATA[what is configuration management]]></category> <category><![CDATA[what is opscode chef]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1274</guid> <description><![CDATA[If you're headhunting a cloud computing expert, specifically someone who knows Amazon Web Services (AWS) and EC2, you'll want to have a battery of questions to ask them to assess their knowledge.  As with any technical interview focus on concepts and big picture.  As the 37Signals folks like to say "hire for attitude, train for [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F05%252Fec2-interview-aws-interview-cloud-interview-8-questions%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FrjfXP2%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%228%20Questions%20to%20ask%20an%20AWS%20Expert%20%23amazon%20web%20services%20%23aws%20interview%20questions%20%23cloud%20interview%20questions%20%23cloud%20provisioning%20questions%20%23ec2%20interview%20questions%20%23ec2%20professional%20services%20%23ec2%20questions%20%23infrastructure%20expertise%20%23new%20york%20ec2%20expert%20%23new%20york%20internet%20consulting%20%23provisioning%20cloud%20infrastructure%20%23what%20is%20configuration%20management%20%23what%20is%20opscode%20chef%22%20%7D);"></div><p>If you're headhunting a cloud computing expert, specifically someone who knows Amazon Web Services (AWS) and EC2, you'll want to have a battery of questions to ask them to assess their knowledge.  As with any technical interview focus on concepts and big picture.  As the <a
href="http://37signals.com/rework/">37Signals</a> folks like to say "hire for attitude, train for skill".  Absolutely!<span
id="more-1274"></span></p><p><strong>1. Explain Elastic Block Storage?  What type of performance can you expect?  How do you back it up?  How do you improve performance?</strong></p><p>EBS is a virtualized SAN or storage area network.  That means it is RAID storage to start with so it's redundant and fault tolerant.  If disks die in that RAID you don't lose data.  Great!  It is also virtualized, so you can provision and allocate storage, and attach it to your server with various API calls.  No calling the storage expert and asking him or her to run specialized commands from the hardware vendor.</p><p>Performance on EBS can exhibit variability.  That is it can go above the SLA performance level, then drop below it.  The SLA provides you with an average disk I/O rate you can expect.  This can frustrate some folks especially performance experts who expect reliable and consistent disk throughput on a server.  Traditional physically hosted servers behave that way.  Virtual AWS instances do not.</p><p>Backup EBS volumes by using the snapshot facility via API call or via a GUI interface like elasticfox.</p><p>Improve performance by using Linux software raid and striping across four volumes.</p><p><strong>2. What is S3?  What is it used for?  Should encryption be used?</strong></p><p>S3 stands for Simple Storage Service.  You can think of it like ftp storage, where you can move files to and from there, but not mount it like a filesystem.  AWS automatically puts your snapshots there, as well as AMIs there.  Encryption should be considered for sensitive data, as S3 is a proprietary technology developed by Amazon themselves, and as yet unproven vis-a-vis a security standpoint.</p><p><strong>3. What is an AMI?  How do I build one? </strong></p><p>AMI stands for Amazon Machine Image.  It is effectively a snapshot of the root filesystem.  Commodity hardware servers have a bios that points the the master boot record of the first block on a disk.  A disk image though can sit anywhere physically on a disk, so Linux can boot from an arbitrary location on the EBS storage network.</p><p>Build a new AMI by first spinning up and instance from a trusted AMI.  Then adding packages and components as required.  Be wary of putting sensitive data onto an AMI.  For instance your access credentials should be added to an instance after spinup.  With a database, mount an outside volume that holds your MySQL data after spinup as well.</p><p><strong>4. Can I vertically scale an Amazon instance?  How?</strong></p><p>Yes.  This is an incredible feature of AWS and cloud virtualization.  Spinup a new larger instance than the one you are currently running.  Pause that instance and detach the root ebs volume from this server and discard.  Then stop your live instance, detach its root volume.  Note the unique device ID and attach that root volume to your new server.   And the start it again.  Voila you have scaled vertically in-place!!</p><p><strong>5. What is auto-scaling?  How does it work?</strong></p><p>Autoscaling is a feature of AWS which allows you to configure and automatically provision and spinup new instances without the need for your intervention.  You do this by setting thresholds and metrics to monitor.  When those thresholds are crossed a new instance of your choosing will be spun up, configured, and rolled into the load balancer pool.  Voila you've scaled horizontally without any operator intervention!</p><p><strong>6. What automation tools can I use to spinup servers? </strong></p><p>The most obvious way is to roll-your-own scripts, and use the AWS API tools.  Such scripts could be written in bash, perl or other language or your choice.  Next option is to use a configuration management and provisioning tool like puppet or better it's successor Opscode Chef.  You might also look towards a tool like Scalr.  Lastly you can go with a managed solution such as Rightscale.</p><p><strong>7. What is configuration management?  Why would I want to use it with cloud provisioning of resources?</strong></p><p>Configuration management has been around for a long time in web operations and systems administration.  Yet the cultural popularity of it has been limited.  Most systems administrators configure machines as software was developed before version control - that is manually making changes on servers.  Each server can then and usually is slightly different.  Troubleshooting though is straightforward as you login to the box and operate on it directly.  Configuration management brings a large automation tool into the picture, managing servers like strings of a puppet.  This forces standardization, best practices, and reproducibility as all configs are versioned and managed.  It also introduces a new way of working which is the biggest hurdle to its adoption.</p><p>Enter the cloud, and configuration management becomes even more critical.  That's because virtual servers such as amazons EC2 instances are much less reliable than physical ones.  You absolutely need a mechanism to rebuild them as-is at any moment.  This pushes best practices like automation, reproducibility and disaster recovery into center stage.</p><p><strong>8. Explain how you would simulate perimeter security using Amazon Web Services model?</strong></p><p>Traditional perimeter security that we're already familiar with using firewalls and so forth is not supported in the Amazon EC2 world.  AWS supports security groups.  One can create a security group for a jump box with ssh access - only port 22 open.  From there a webserver group and database group are created.  The webserver group allows 80 and 443 from the world, but port 22 *only* from the jump box group.  Further the database group allows port 3306 from the webserver group and port 22 from the jump box group.  Add any machines to the webserver group and they can all hit the database.  No one from the world can, and no one can directly ssh to any of your boxes.</p><p>Want to further lock this configuration down?  Only allow ssh access from specific IP addresses on your network, or allow just your subnet.</p><h2>For more help with EC2 interviews or evaluations, skype us or call our NYC offices at +1-212-533-6828</h2>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/05/ec2-interview-aws-interview-cloud-interview-8-questions/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>The New Commodity Hardware Craze aka Cloud Computing</title><link>http://www.iheavy.com/2011/08/03/the-new-commodity-hardware-craze-aka-cloud-computing/</link> <comments>http://www.iheavy.com/2011/08/03/the-new-commodity-hardware-craze-aka-cloud-computing/#comments</comments> <pubDate>Wed, 03 Aug 2011 23:52:19 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Cloud Migrations]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Database Migrations]]></category> <category><![CDATA[Database Operations]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[capex]]></category> <category><![CDATA[cfengine]]></category> <category><![CDATA[cloud deployments]]></category> <category><![CDATA[commodity hardware]]></category> <category><![CDATA[commodity hardware adoption]]></category> <category><![CDATA[configuration management]]></category> <category><![CDATA[ebs variability]]></category> <category><![CDATA[infrastructure automation]]></category> <category><![CDATA[infrastructure deployments]]></category> <category><![CDATA[infrastructure development]]></category> <category><![CDATA[operational expenditures]]></category> <category><![CDATA[pressures to cloud adoption]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1261</guid> <description><![CDATA[Does anyone remember 15 years ago when the dot-com boom was just starting?  A lot of companies were running on Sun.  Sun was the best hardware you could buy for the price.  It was reliable and a lot of engineers had experience with the operating system, SunOS a flavor of Unix. Yet suddenly companies were [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F03%252Fthe-new-commodity-hardware-craze-aka-cloud-computing%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FpuxlVY%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22The%20New%20Commodity%20Hardware%20Craze%20aka%20Cloud%20Computing%20%23capex%20%23cfengine%20%23cloud%20deployments%20%23commodity%20hardware%20%23commodity%20hardware%20adoption%20%23configuration%20management%20%23ebs%20variability%20%23infrastructure%20automation%20%23infrastructure%20deployments%20%23infrastructure%20development%20%23operational%20expenditures%20%23pressures%20to%20cloud%20adoption%22%20%7D);"></div><p>Does anyone remember 15 years ago when the dot-com boom was just starting?  A lot of companies were running on Sun.  Sun was the best hardware you could buy for the price.  It was reliable and a lot of engineers had experience with the operating system, SunOS a flavor of Unix.</p><p>Yet suddenly companies were switching to cheap crappy hardware.  The stuff failed more often, had lower quality control, and cheaper and slower buses.  Despite all of that, cutting edge firms and startups were moving to commodity hardware in droves.  Why was it so?<span
id="more-1261"></span></p><p>As more companies adopted commodity hardware and Linux, larger firms began to consider the combination too.  After all, all these success stories couldn't be wrong.</p><p>Fast forward to the present and we see a very similar pattern.  Everyone is moving to a crappy platform, aka the cloud.  Virtualization means I can't guarantee CPU power, it means my disk I/O experiences variability that I don't like.  My applications don't like it, my operations team doesn't like it.  My performance team complains.</p><p>Where's the pressure coming from? There is debate between operational expenses versus capital expenses, sure.  But in the end the advantages remain large:</p><ul><li>Zero Up Front Costs</li><li>Instant Compute Resources - only an API call away</li><li>Easily Scale Vertically &amp; Horizontally</li><li>Free Disaster Recovery - encapsulated into an infrastructure script</li></ul><p>I would argue that the cloud will also push adoption of infrastructure automation and infrastructure as code as well.  This will push tools and technologies such as Puppet, cfengine and Chef for configuration management and cloud provisioning.  These tools, although a paradigm shift for systems administrators who are used to doing things manually, bring a new level of quality control and best practices to web operations.  It parallels the shift in software development to using version control, considered now to be an essential component of any professional software project.</p><p>It's so good that creative firms and technologists are spending time figuring out how to deal with the limitations of cloud infrastructure and virtualization:</p><ul><li>variable disk I/O</li><li>variable CPU performance</li><li>higher failure rate</li><li>security challenges</li><li>privacy concerns</li></ul>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/03/the-new-commodity-hardware-craze-aka-cloud-computing/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>7 Ways to Troubleshoot MySQL</title><link>http://www.iheavy.com/2011/08/02/7-ways-to-troubleshoot-mysql/</link> <comments>http://www.iheavy.com/2011/08/02/7-ways-to-troubleshoot-mysql/#comments</comments> <pubDate>Tue, 02 Aug 2011 22:22:55 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Database Migrations]]></category> <category><![CDATA[Database Operations]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[aspersa]]></category> <category><![CDATA[database benchmarking]]></category> <category><![CDATA[database load testing]]></category> <category><![CDATA[database tuner]]></category> <category><![CDATA[fixing mysql replication]]></category> <category><![CDATA[fixing replication]]></category> <category><![CDATA[innotop]]></category> <category><![CDATA[maatkit]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[mysql performance]]></category> <category><![CDATA[mysql replication integrity checking]]></category> <category><![CDATA[mysql troubleshooting]]></category> <category><![CDATA[mysql tuner]]></category> <category><![CDATA[mysql tuning]]></category> <category><![CDATA[mysqlslap]]></category> <category><![CDATA[replication checksums]]></category> <category><![CDATA[troubleshooting mysql]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1257</guid> <description><![CDATA[MySQL databases are great work horses of the internet.  They back tons of modern websites, from blogs and checkout carts, to huge sites like Facebook.  But these technologies don't run themselves.  When you're faced with a system that is slowing down, you'll need the right tools to diagnose and troubleshoot the problem.  MySQL has a [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F02%252F7-ways-to-troubleshoot-mysql%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2Fr1rPxd%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%227%20Ways%20to%20Troubleshoot%20MySQL%20%23aspersa%20%23database%20benchmarking%20%23database%20load%20testing%20%23database%20tuner%20%23fixing%20mysql%20replication%20%23fixing%20replication%20%23innotop%20%23maatkit%20%23mysql%20%23mysql%20performance%20%23mysql%20replication%20integrity%20checking%20%23mysql%20troubleshooting%20%23mysql%20tuner%20%23mysql%20tuning%20%23mysqlslap%20%23replication%20checksums%20%23troubleshooting%20mysql%22%20%7D);"></div><p>MySQL databases are great work horses of the internet.  They back tons of modern websites, from blogs and checkout carts, to huge sites like Facebook.  But these technologies don't run themselves.  When you're faced with a system that is slowing down, you'll need the right tools to diagnose and troubleshoot the problem.  MySQL has a huge community following and that means scores of great tools for your toolbox. Here are 7 ways to troubleshoot MySQL.<span
id="more-1257"></span></p><h2><strong>1. Use innotop</strong></h2><p>Innotop is a great tool for MySQL which despite the name monitors MySQL generally <em>as well as</em> InnoDB usage.  It's fairly easy to install, just download the perl script. Be sure to include a [client] section to your local users .my.cnf file (you have one don't you?).  Inside that section, place one line with "user=xyz" and one line with "password=abc".</p><p>If you're concerned that installing something new is too complicated, use the poor man's version:</p><pre>$ watch 'mysqladmin proc'</pre><h2><strong>2. Analyze &amp; Tune Queries</strong></h2><p>You've heard it before, so I hope you're already doing it.  Not sure where to start?  Enable your slow query log first.  Set the <em>long_query_time</em> low enough to capture some queries.</p><p>Then use the great maatkit tool called <em>mk-query-digest</em> to analyze the slow.log file.  The results will amaze you.  You'll quickly be able to sift for the heaviest four or five queries.</p><p>Next do an <em>EXPLAIN</em> for each of those queries from the command line prompt.  Isolate those lines which return a large number of rows.  Attempt to add columns in the <em>WHERE</em> clause to reduce these.  Already have a where clause?  Be sure that column is indexed.  Try to reduce sorting, consider how you are joining tables, and so forth.  Eliminate SELECT * and instead specify which columns you want, and which rows.</p><p>All these changes will make a huge impact on performance.</p><h2><strong>3. Verify &amp; Troubleshoot Replication</strong></h2><p>Have you ever wondered if your replication is working properly?  Do you wonder if all the data in your slave database perfectly matches your master database?  As it turns out, the slave can silently drift out of sync with the master.  We are lucky when this happens and MySQL returns an error.</p><p>In either case you'll need a tool to help you.  There are two included in maatkit which will come to your rescue.  The first <em>mk-table-checksum</em> is run periodically on the master.  It creates checksums in a table, and that tables data propagates through replication to the slave.  You then run another check with the same tool to verify the slave.</p><p>What happens if I find differences?  Well then you'll turn to another wonderful Maatkit tool <em>mk-table-sync</em> designed specifically for that purpose.  Check the manual for details on usage.</p><h2><strong>4. Use Aspersa</strong></h2><p>Another great tool by Baron Schwartz author of Maatkit is the <a
href="http://code.google.com/p/aspersa/">Aspersa toolset</a>.  It helps you collect system information and then do performance profiling on that data.  Great diagnostic tool.</p><h2><strong>5. General Database Tuning </strong></h2><p>You may want to get a birds eye view on what is happening in your database.  How many tables are InnoDB versus MyISAM?  Am I using indexes well?  Am I doing too many joins?  Are there some memory settings that are not quite tweaked as best they can be.</p><p>To be sure much of this type of knowledge is learned with years of experience, there is a tool which can give you a healthy start.  Enter the MySQLTuner!</p><p>Grab a copy with <em>wget</em>.  Since they grabbed a .pl top-level domain, the command is quite simple to remember:</p><pre>$ wget mysqltuner.pl</pre><p>Then set execute permissions, and go!  Be sure to edit your .my.cnf file and include a [client] section so the tool can pickup your user/pass automatically!</p><h2><strong>6. Database Performance and Load Testing</strong></h2><p>As of 5.1 release of MySQL, all distributions include a really great tool for doing performance and load testing called <em>mysqlslap</em>.  You can hand it a query, tell it to run that query 10 times, 100 times, or in 10 threads and so forth.  It will fire consecutive queries at the database, and you can then capture the slow query log, or use innotop and the OS monitoring tools to see how the server responds.</p><h2><strong>7. Operating System Monitoring Tools</strong></h2><p>Most Unix folks are familiar with the interactive monitoring tool <em>top</em>.  If you're not, please fire it up and watch it for a little while.  It will give you insight into what's happening right now on your server.  Please also take a look at <em>iostat</em> to see what is happening as far as disk I/O goes.  Databases are generally disk hungry so keep a close eye on this output. A tool called mpstat will give insight into what your processors are doing.  Incidentally top can be configured to shop all of the individual processors as well, so check the options there for details.  Lastly <em>sar</em> can come to your assistance.  The acronym stands for system activity reporter, and tells you what Linux knows about the activity on the box.</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/02/7-ways-to-troubleshoot-mysql/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>5 Ways to Avoid EC2 Outages</title><link>http://www.iheavy.com/2011/08/01/5-ways-to-avoid-ec2-outages/</link> <comments>http://www.iheavy.com/2011/08/01/5-ways-to-avoid-ec2-outages/#comments</comments> <pubDate>Mon, 01 Aug 2011 20:37:21 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Cloud Migrations]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Disaster Recovery]]></category> <category><![CDATA[High Availability]]></category> <category><![CDATA[avoiding ec2 outages]]></category> <category><![CDATA[business continuity]]></category> <category><![CDATA[fault tolerant infrastructure]]></category> <category><![CDATA[infrastructure deployments]]></category> <category><![CDATA[infrastructure design]]></category> <category><![CDATA[infrastructure development]]></category> <category><![CDATA[mitigating ec2 outages]]></category> <category><![CDATA[reliability engineering]]></category> <category><![CDATA[resilient deployments]]></category> <category><![CDATA[resilient enterprise]]></category> <category><![CDATA[resilient infrastructure]]></category> <category><![CDATA[resilient services]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1254</guid> <description><![CDATA[1. Backup outside of the Cloud Some of the high profile companies affected by Amazon's April 2011 outage could have recovered had they kept a backup of their entire site outside of the cloud.  With any hosting provider, managed traditional data center or cloud provider, alternate backups are always a good idea.  A MySQL logical [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F08%252F01%252F5-ways-to-avoid-ec2-outages%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FqUGXW2%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%225%20Ways%20to%20Avoid%20EC2%20Outages%20%23avoiding%20ec2%20outages%20%23business%20continuity%20%23fault%20tolerant%20infrastructure%20%23infrastructure%20deployments%20%23infrastructure%20design%20%23infrastructure%20development%20%23mitigating%20ec2%20outages%20%23reliability%20engineering%20%23resilient%20deployments%20%23resilient%20enterprise%20%23resilient%20infrastructure%20%23resilient%20services%22%20%7D);"></div><p><strong><a
href="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/08/electric-symbol-2.png"><img
class="alignleft size-full wp-image-1416" title="electric symbol 2" src="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/08/electric-symbol-2.png" alt="" width="221" height="197" /></a>1. Backup outside of the Cloud</strong></p><p>Some of the high profile companies affected by <a
href="http://www.iheavy.com/2011/04/26/amazon-ec2-outage-failures-lessons-and-cloud-deployments/">Amazon's April 2011 outage</a> could have recovered had they kept a backup of their entire site outside of the cloud.  With any hosting provider, managed traditional data center or cloud provider, alternate backups are always a good idea.  A MySQL logical backup and/or incremental backup can be copied regularly offsite or to an alternate cloud provider.  That's real insurance!<span
id="more-1254"></span></p><p><strong>2. Use alternate regions and availability zones</strong></p><p><a
href="http://www.iheavy.com/2011/04/26/amazon-ec2-outage-failures-lessons-and-cloud-deployments/">Amazon's outage in April underscored a lot of things</a>.  That the service is still evolving and experiencing growing pains is one, and that many many internet firms rely on them is yet another.  Amazon's own documentation and best practices outline the need for mitigating against server failure.  Amazon instances are not as reliable as instances in a traditional hosting center, just as commodity hardware was not as reliable as Sun hardware all the while it was replacing it.</p><p>By using multiple availability zones and regions in your infrastructure design, you mitigate against lower SLAs and less reliable servers.  This is not an option, but rather a requirement to build a resilient infrastructure.</p><p><strong>3. Use alternate cloud providers</strong></p><p>As we mentioned previously at the very least an alternate cloud provider can be used for your backups.  But to build a further fault tolerant infrastructure, build servers and provide services out of multiple cloud providers.  This type of setup can provide the highest availability and protection against outages as it becomes very unlikely that any regional or business failure could take down multiple providers in different geographic regions.</p><p><strong>4. Design &amp; test for failure</strong></p><p>Fire drills are a great way to test for outage in a planned way.  Run through all the steps to rebuild all components in your site.  Document those processes carefully as you go through them.  A central repository of documentation stands in for your lead engineer so that the knowledge to rebuild your site does not rely on any one single person in your business.</p><p>Further testing can involve a more shotgun approach.  This tests for true resiliency but requires a robustness of architecture, process and automation that is at the very highest level.  That's what <a
href="http://www.codinghorror.com/blog/2011/04/working-with-the-chaos-monkey.html">neflix does with their chaos monkey.</a></p><p><strong>5. Include configs, code, files &amp; database</strong></p><p>Your backups are best verified by fire drill.  Rebuilding the entire infrastructure from bare metal involves many moving parts.  From the lowest level you have hardware, then you have AMIs with the OS and from there you install particular packages that your application requires.  Those packages need configurations hopefully managed by a configuration management systems such as cfengine, puppet or chef.</p><p>On top of all of that you need your application itself, and any files that it builds or relies on in the filesystem.  Lastly your single backend datastore, likely your relational database such as MySQL would require it's data backup to restore all the stateful data your application relies on.</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/08/01/5-ways-to-avoid-ec2-outages/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>3 Ways to Boost Cloud Scalability</title><link>http://www.iheavy.com/2011/07/30/3-ways-to-boost-cloud-scalability/</link> <comments>http://www.iheavy.com/2011/07/30/3-ways-to-boost-cloud-scalability/#comments</comments> <pubDate>Sat, 30 Jul 2011 19:16:15 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Cloud Migrations]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Database Operations]]></category> <category><![CDATA[Scalability]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[amazon ec2]]></category> <category><![CDATA[amazon ec2 scalability]]></category> <category><![CDATA[auto-scaling]]></category> <category><![CDATA[aws]]></category> <category><![CDATA[aws scalability]]></category> <category><![CDATA[capacity planning]]></category> <category><![CDATA[capacity planning and scalability]]></category> <category><![CDATA[cloud infrastructure]]></category> <category><![CDATA[cloud infrastructure scalability]]></category> <category><![CDATA[cloud scalability]]></category> <category><![CDATA[EBS performance]]></category> <category><![CDATA[horizontal scalability]]></category> <category><![CDATA[infrastructure as a service]]></category> <category><![CDATA[infrastructure as code]]></category> <category><![CDATA[infrastructure deployments]]></category> <category><![CDATA[infrastructure development]]></category> <category><![CDATA[mult-az deployments]]></category> <category><![CDATA[mysql active passive cluster]]></category> <category><![CDATA[mysql cluster]]></category> <category><![CDATA[mysql community server]]></category> <category><![CDATA[mysql high availability]]></category> <category><![CDATA[mysql master-master]]></category> <category><![CDATA[mysql on ec2]]></category> <category><![CDATA[mysql percona server]]></category> <category><![CDATA[mysql scalability]]></category> <category><![CDATA[raid 0]]></category> <category><![CDATA[raid 0 ebs]]></category> <category><![CDATA[rds scalability]]></category> <category><![CDATA[scalability in the cloud]]></category> <category><![CDATA[striped ebs]]></category> <category><![CDATA[vertical scalability]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1249</guid> <description><![CDATA[Deploying in the Amazon cloud is touted as a great way to achieve high scalability while paying only for the computing power you use. How do you get the best scalability from the technology? 1. Use Auto-scaling Auto-scaling is a unique feature of cloud computing and Amazon's EC2 offering. Setup a load balancer and a [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F07%252F30%252F3-ways-to-boost-cloud-scalability%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FqDD497%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%223%20Ways%20to%20Boost%20Cloud%20Scalability%20%23amazon%20ec2%20%23amazon%20ec2%20scalability%20%23auto-scaling%20%23aws%20%23aws%20scalability%20%23capacity%20planning%20%23capacity%20planning%20and%20scalability%20%23cloud%20infrastructure%20%23cloud%20infrastructure%20scalability%20%23cloud%20scalability%20%23EBS%20performance%20%23horizontal%20scalability%20%23infrastructure%20as%20a%20service%20%23infrastructure%20as%20code%20%23infrastructure%20deployments%20%23infrastructure%20development%20%23mult-az%20deployments%20%23mysql%20active%20passive%20cluster%20%23mysql%20cluster%20%23mysql%20community%20server%20%23mysql%20high%20availability%20%23mysql%20master-master%20%23mysql%20on%20ec2%20%23mysql%20percona%20server%20%23mysql%20scalability%20%23raid%200%20%23raid%200%20ebs%20%23rds%20scalability%20%23scalability%20in%20the%20cloud%20%23striped%20ebs%20%23vertical%20scalability%22%20%7D);"></div><p><a
href="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/07/cloud-computing.png"><img
class="alignleft size-full wp-image-1401" title="cloud computing" src="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/07/cloud-computing.png" alt="" width="258" height="212" /></a>Deploying in the Amazon cloud is touted as a great way to achieve high scalability while paying only for the computing power you use. How do you get the best scalability from the technology?<span
id="more-1249"></span></p><p><strong>1. Use Auto-scaling</strong></p><p>Auto-scaling is a unique feature of cloud computing and Amazon's EC2 offering. Setup a load balancer and a couple of webservers for your application as you normally would. Design your webserver based on a template AMI that you'll reuse over and over. Then setup auto-scaling and set thresholds based on the traffic you forecast. When a threshold is passed, AWS will spinup a new instance of your webserver, and roll it into the load balancer pool automatically. Once traffic falls below the scale back threshold, Amazon will take a server out of the pool for you.</p><p>Be sure to monitor this activity to start with, and also run some load and stress tests on it. You want to ensure that it behaves as you expect, and no anomalous cases will cause you to spinup servers unnecessarily.</p><p><strong>2. Horizontally Scale the Database Tier</strong></p><p>MySQL offers a number of solutions here.  You can configure MySQL in a master-master active passive cluster, also known as circular replication.  In this configuration, MySQL will send all completed transactions to the other server in the cluster.  Your passive server can also handle read traffic for your application.  At the same time as you achieve high availability, you also get scalability by sending much of the SELECT traffic off to another server.</p><p>As the load grows further, roll in an additional read-only slave into your setup.  You can then further scale out reads.  As you do this, you'll continue to send all writes to the single active master database.</p><p>As an alternative, you may wish to employ Amazon's RDS solution, which is based on the MySQL community server, but with certain locked in settings.  In this configuration you will not be able to use an alternate MySQL distribution such as Percona's high speed server.  What this configuration does offer is multi-az configuration.  Keep in mind though that any MySQL server you spinup will have a region and availability zone as part of it's configuration, so you are always free to use those features of Amazon's network to increase availability.</p><p>If the load on the single master database continues to be a problem, you can vertically scale that node in place.  Do this by spinning up a new <em>larger</em> EC2 instance on and EBS root volume.  Then detach that root volume, stop your old instance, detach it's root volume and move it over to the new server.  Once you attach that live root volume, your new larger EC2 instance will be your original server, scaled UP in place!</p><p><strong>3. Use Striped EBS Volumes</strong></p><p>EBS is a great technology, as it brings the flexibility of a storage area network to each of your EC2 instances.  It's not without it's challenges though, and at times you will experience great variability in disk I/O throughput.  This can pose a challenge for the database tier especially.  Keep in mind too, that Amazon's infrastructure virtualization layer will dial up or dial down the amount of disk I/O your instance receives based on how large the instance is.</p><p>One additional way to get better EBS performance is by using Linux's software raid technology.  Since EBS already has redundancy built in, you can simply use striping or RAID 0 across a number of EBS volumes - we recommend four.</p><p>Be careful with such configurations as each of your EBS volumes won't operate by themselves now, but require all four to be complete.  This will impact EBS snapshot backups, as well.</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/07/30/3-ways-to-boost-cloud-scalability/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>5 Ways to Boost MySQL Scalability</title><link>http://www.iheavy.com/2011/07/28/5-ways-to-boost-mysql-scalability/</link> <comments>http://www.iheavy.com/2011/07/28/5-ways-to-boost-mysql-scalability/#comments</comments> <pubDate>Thu, 28 Jul 2011 18:53:35 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Database Operations]]></category> <category><![CDATA[Scalability]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[aws scalability]]></category> <category><![CDATA[circular replication]]></category> <category><![CDATA[ec2 scalability]]></category> <category><![CDATA[innodb performance]]></category> <category><![CDATA[innodb_file_per_table]]></category> <category><![CDATA[innodb_flush_log_at_trx_commit]]></category> <category><![CDATA[master-master replication]]></category> <category><![CDATA[mysql consulting]]></category> <category><![CDATA[mysql deployments]]></category> <category><![CDATA[mysql expert]]></category> <category><![CDATA[mysql performance]]></category> <category><![CDATA[mysql pro]]></category> <category><![CDATA[mysql queries]]></category> <category><![CDATA[mysql query expert]]></category> <category><![CDATA[mysql replication]]></category> <category><![CDATA[mysql scalability]]></category> <category><![CDATA[mysql services]]></category> <category><![CDATA[mysql tuning]]></category> <category><![CDATA[new york city expert]]></category> <category><![CDATA[new york consultant]]></category> <category><![CDATA[new york expert]]></category> <category><![CDATA[performance tuning]]></category> <category><![CDATA[query cache]]></category> <category><![CDATA[query tuning expert]]></category> <category><![CDATA[rds scalability]]></category> <category><![CDATA[scaling mysql in ec2]]></category> <category><![CDATA[scaling mysql in the cloud]]></category> <category><![CDATA[sql query tuning]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1244</guid> <description><![CDATA[There are a lot of scalability challenges we see with clients over and over. The list could easily include 20, 50 or even 100 items, but we shortened it down to the biggest five issues we see. 1. Tune those queries By far the biggest bang for your buck is query optimization. Queries can be [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F07%252F28%252F5-ways-to-boost-mysql-scalability%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2Fq4Dswk%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%225%20Ways%20to%20Boost%20MySQL%20Scalability%20%23aws%20scalability%20%23circular%20replication%20%23ec2%20scalability%20%23innodb%20performance%20%23innodb_file_per_table%20%23innodb_flush_log_at_trx_commit%20%23master-master%20replication%20%23mysql%20consulting%20%23mysql%20deployments%20%23mysql%20expert%20%23mysql%20performance%20%23mysql%20pro%20%23mysql%20queries%20%23mysql%20query%20expert%20%23mysql%20replication%20%23mysql%20scalability%20%23mysql%20services%20%23mysql%20tuning%20%23new%20york%20city%20expert%20%23new%20york%20consultant%20%23new%20york%20expert%20%23performance%20tuning%20%23query%20cache%20%23query%20tuning%20expert%20%23rds%20scalability%20%23scaling%20mysql%20in%20ec2%20%23scaling%20mysql%20in%20the%20cloud%20%23sql%20query%20tuning%22%20%7D);"></div><p><a
href="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/07/scale-graph.png"><img
class="alignleft size-full wp-image-1418" title="scale graph" src="http://d1wcmuriwzc7sn.cloudfront.net/wp-content/uploads/2011/07/scale-graph.png" alt="" width="222" height="240" /></a>There are a lot of scalability challenges we see with clients over and over. The list could easily include 20, 50 or even 100 items, but we shortened it down to the biggest five issues we see.</p><p><strong>1. Tune those queries</strong></p><p>By far the biggest bang for your buck is query optimization. Queries can be functionally correct and meet business requirements without being stress tested for high traffic and high load. This is why we often see clients with growing pains, and scalability challenges as their site becomes more popular. This also makes sense. It wouldn't necessarily be a good use of time to tune a query for some page off in a remote corner of your site, that didn't receive real-world traffic. So some amount of reactive tuning is common and appropriate.</p><p>Enable the slow query log and watch it. Use <a
href="http://www.maatkit.org/get/mk-query-digest">mk-query-digest</a>, the great tool from <a
href="http://www.maatkit.org">Maatkit</a> to analyze the log. Also make sure the <em>log_queries_not_using_indexes</em> flag is set.  Once you've found a heavy resource intensive query, optimize it!  Use the <em>EXPLAIN</em> facility, use a profiler, look at index usage and create missing indexes, and understand how it is joining and/or sorting.</p><p><strong>2. Employ Master-Master Replication</strong></p><p>Master-master active-passive replication, otherwise known as circular replication, can be a boon for high availability, but also for scalability.  That's because you immediately have a read-only slave for your application to hit as well.  Many web applications exhibit an 80/20 split, where 80% of activity is read or SELECT and the remainder is INSERT and UPDATE.  Configure your application to send read traffic to the slave or rearchitect so this is possible.  This type of horizontal scalability can then be extended further, adding additional read-only slaves to the infrastructure as necessary.</p><p><strong>3. Use Your Memory</strong></p><p>It sounds very basic and straightforward, yet there are often details overlooked.  At minimum be sure to set these:</p><ul><li>innodb_buffer_pool_size</li><li>key_buffer_size (MyISAM index caching)</li><li>query_cache_size - though beware of issues on large SMP boxes</li><li>thread_cache &amp; table_cache</li><li>innodb_log_file_size &amp; innodb_log_buffer_size</li><li>sort_buffer_size, join_buffer_size, read_buffer_size, read_rnd_buffer_size</li><li>tmp_table_size &amp; max_heap_table_size</li></ul><p><strong>4. RAID Your Disk I/O</strong></p><p>What is underneath your database?  You don't know?  Well please find out!  Are you using RAID 5?  This is a big performance hit.  RAID5 is slow for inserts and updates.  It is also almost non-functional during a rebuild if you lose a disk.  Very very slow performance.  What should I use instead?  RAID 10 mirroring and striping, with as many disks as you can fit in your server or raid cabinet.  A database does a lot of disk I/O even if you have enough memory to hold the entire database.  Why?  Sorting requires rearranging rows, as does group by, joins, and so forth.  Plus the transaction log is disk I/O as well!</p><p>Are you running on EC2?  In that case EBS is already fault tolerant and redundant.  So give your performance a boost by striping-only across a number of EBS volumes using the Linux md software raid.</p><p><strong>5. Tune Key Parameters </strong></p><p>These additional parameters can also help a lot with performance.</p><p><em>innodb_flush_log_at_trx_commit=2</em></p><p>This speeds up inserts &amp; updates dramatically by being a little bit lazy about flushing the innodb log buffer.  You can do more research yourself but for most environments this setting is recommended.</p><p><em>innodb_file_per_table</em></p><p>Innodb was developed like Oracle with the tablespace model for storage.  Apparently the kernel developers didn't do a very good job.  That's because the default setting to use a single tablespace turns out to be a performance bottleneck.  Contention for file descriptors and so forth.  This setting makes innodb create tablespace and underlying datafile for each table, just like MyISAM does.</p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/07/28/5-ways-to-boost-mysql-scalability/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>iHeavy Insights 82 &#8211; Better Practices</title><link>http://www.iheavy.com/2011/07/27/iheavy-insights-82-better-practices/</link> <comments>http://www.iheavy.com/2011/07/27/iheavy-insights-82-better-practices/#comments</comments> <pubDate>Wed, 27 Jul 2011 18:48:58 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[iHeavy Newsletter]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[better practices]]></category> <category><![CDATA[communication]]></category> <category><![CDATA[continuous improvement]]></category> <category><![CDATA[devops]]></category> <category><![CDATA[documentation]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1236</guid> <description><![CDATA[Best Practices, the term we hear thrown around a lot.  But like going on that new years diet, too often ends up more talk than action. Manage Processes Operator error ie typing the wrong command is always a risk.  Logging into the wrong server to drop a database or typing the dump command such that [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F07%252F27%252Fiheavy-insights-82-better-practices%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FoSaNto%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22iHeavy%20Insights%2082%20-%20Better%20Practices%20%23best%20practices%20%23better%20practices%20%23communication%20%23continuous%20improvement%20%23devops%20%23documentation%22%20%7D);"></div><p>Best Practices, the term we hear thrown around a lot.  But like going on that new years diet, too often ends up more talk than action.</p><p><strong>Manage Processes</strong></p><p>Operator error ie typing the wrong command is always a risk.  Logging into the wrong server to drop a database or typing the dump command such that you dump data into the database, these are risks that operations folks face everyday.</p><p>Accountability is important, be sure all of your systems folks login to their own accounts.  Apply the least privileges model, give permissions on an as needed basis.</p><p>Set prompts with big bold names that indicate production servers and their purpose.  Automate repetitive commands that are prone to typos.</p><p>Don't be afraid to give developers read-only accounts on production servers.</p><p><strong>Communicate Clearly</strong></p><p>Regular team meetings, a la the Agile stand ups are a great way to encourage folks to communicate.  Bring the developers and operations folks together.   Ask everyone in turn to voice their current todos, their concerns and risks they see.  Encourage everyone to listen with an open mind.  Consider different perspectives.</p><p>Communication is a cultural attribute.  So it comes from the top.  Encourage this as a CTO or CIO by asking questions, communicating your concerns, repeat your own requests in different words and paraphrase.  Listen to what your team is saying, repeat and rephrase those concerns, and how and when they will be addressed.</p><p><strong>Document Processes</strong></p><p>A culture of documenting services, and processes is healthy.  It provides a central location and knowledge base for the team.  It also prevents sliding into the situation where only one team member understands how to administer critical business components.  Were that person to be unavailable or to leave the company, you're stuck reverse engineering your infrastructure and guessing at architectural decisions.</p><p><strong>Better Practices</strong></p><p>Rather than think of best practices as something you need to achieve today, think of it as an ongoing day-to-day quest for improvement.</p><ul><li>repetitive manual processes - employ automation &amp; script those processes where possible.</li><li>where steps require investigation and research - document it</li><li>where production changes are involved - communicate with business units, qa &amp; operations</li><li>always be improving - striving for better practices</li></ul>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/07/27/iheavy-insights-82-better-practices/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Review &#8211; Test Driven Infrastructure with Chef &#8211; Stephen Nelson-Smith</title><link>http://www.iheavy.com/2011/07/27/review-test-driven-infrastructure-with-chef-stephen-nelson-smith/</link> <comments>http://www.iheavy.com/2011/07/27/review-test-driven-infrastructure-with-chef-stephen-nelson-smith/#comments</comments> <pubDate>Wed, 27 Jul 2011 17:59:38 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Book Review]]></category> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Web Operations]]></category> <category><![CDATA[agile]]></category> <category><![CDATA[amazon ec2]]></category> <category><![CDATA[aws]]></category> <category><![CDATA[behavior drive development]]></category> <category><![CDATA[building infrastructure with opscode chef]]></category> <category><![CDATA[chef]]></category> <category><![CDATA[cloud infrastructure]]></category> <category><![CDATA[cloud provisioning]]></category> <category><![CDATA[configuration management]]></category> <category><![CDATA[cucumber]]></category> <category><![CDATA[cucumber-chef]]></category> <category><![CDATA[devops]]></category> <category><![CDATA[ec2]]></category> <category><![CDATA[ec2 provisioning]]></category> <category><![CDATA[iaas]]></category> <category><![CDATA[infrastructure as a service]]></category> <category><![CDATA[infrastructure as code]]></category> <category><![CDATA[infrastructure automation]]></category> <category><![CDATA[infrastructure framework]]></category> <category><![CDATA[infrastructure provisioning]]></category> <category><![CDATA[opscode]]></category> <category><![CDATA[opscode chef]]></category> <category><![CDATA[oreilly]]></category> <category><![CDATA[puppet]]></category> <category><![CDATA[ruby on rails]]></category> <category><![CDATA[test driven infrastructure]]></category> <category><![CDATA[testing framework]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1232</guid> <description><![CDATA[In search of a good book on Chef itself, I picked up this new title on O'Reilly.  It's one of their new format books, small in size, only 75 pages. There was some very good material in this book.  Mr. Nelson-Smith's writing style is good, readable, and informative.  The discussion of risks of infrastructure as [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F07%252F27%252Freview-test-driven-infrastructure-with-chef-stephen-nelson-smith%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FqGlO5U%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Review%20-%20Test%20Driven%20Infrastructure%20with%20Chef%20-%20Stephen%20Nelson-Smith%20%23agile%20%23amazon%20ec2%20%23aws%20%23behavior%20drive%20development%20%23Book%20Review%20%23building%20infrastructure%20with%20opscode%20chef%20%23chef%20%23cloud%20infrastructure%20%23cloud%20provisioning%20%23configuration%20management%20%23cucumber%20%23cucumber-chef%20%23devops%20%23ec2%20%23ec2%20provisioning%20%23iaas%20%23infrastructure%20as%20a%20service%20%23infrastructure%20as%20code%20%23infrastructure%20automation%20%23infrastructure%20framework%20%23infrastructure%20provisioning%20%23opscode%20%23opscode%20chef%20%23oreilly%20%23puppet%20%23ruby%20on%20rails%20%23test%20driven%20infrastructure%20%23testing%20framework%22%20%7D);"></div><p>In search of a good book on Chef itself, I picked up this new title on O'Reilly.  It's one of their new format books, small in size, only 75 pages.</p><p>There was some very good material in this book.  Mr. Nelson-Smith's writing style is good, readable, and informative.  The discussion of risks of infrastructure as code was instructive.  With the advent of APIs to build out virtual data centers, the idea of automating every aspect of systems administration, and building infrastructure itself as code is a new one.  So an honest discussion of the risks of such an approach is bold and much needed.  I also liked the introduction to Chef itself, and the discussion of installation.</p><p>Chef isn't really the main focus of this book, unfortunately.  The book spends a lot of time introducing us to Agile Development, and specifically test driven development.  While these are lofty goals, and the first time I've seen treatment of the topic in relation to provisioning cloud infrastructure, I did feel too much time was spent on that.  <span
id="more-1232"></span>It could have been better spent discussing cloud topics generally, and the chef architecture.  For instance a discussion of chef-solo was missing and the reader is plainly led towards the opscode hosted chef-server, rather than explaining the architecture, pros and cons of managing it yourself, and so forth.</p><p>By far my biggest beef with this title was that they waited to discuss the meat of provisioning infrastructure, ie bootstrapping an Amazon EC2 instance with Chef, until five pages from the end of the book!  The other complaint I had is that there were some glaring typos, like the itemized list of steps to setup the opscode platform on pages 16 &amp; 17.</p><p>Since there aren't a lot of titles on the market yet covering Chef, you still might want to pickup this one, but I'm more eagerly awaiting Mr. Nelson-Smith's next title and more general introduction to the topic.</p><p>Related links:</p><p><a
href="http://www.agileweboperations.com/the-implications-of-infrastructure-as-code">Risks &amp; Implications of Infrastructure as Code</a></p><p><a
href="http://www.opscode.com/chef/">Chef Download Page - Opscode</a></p><p><a
href="http://xprogramming.com/what-is-extreme-programming">Discussion of Extreme Programming</a></p><p><a
href="http://agilesysadmin.net/">Stephen Nelson-Smith's great blog</a></p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/07/27/review-test-driven-infrastructure-with-chef-stephen-nelson-smith/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Software Unit Testing &#8211; What is it and why is it important?</title><link>http://www.iheavy.com/2011/07/20/software-unit-testing-what-is-it-and-why-is-it-important/</link> <comments>http://www.iheavy.com/2011/07/20/software-unit-testing-what-is-it-and-why-is-it-important/#comments</comments> <pubDate>Wed, 20 Jul 2011 20:28:18 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Software Development]]></category> <category><![CDATA[Website Basics]]></category> <category><![CDATA[application development]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[functional testing]]></category> <category><![CDATA[java]]></category> <category><![CDATA[perl]]></category> <category><![CDATA[php]]></category> <category><![CDATA[python]]></category> <category><![CDATA[refactoring]]></category> <category><![CDATA[ruby on rails]]></category> <category><![CDATA[software documentation]]></category> <category><![CDATA[unit testing]]></category> <category><![CDATA[web development]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1211</guid> <description><![CDATA[Software development is composed of individual components.  As developers are building these units, they build tests to verify them for correctness.  These tests can verify the environment, they can verify data, they can verify edge cases and include test harnesses.  In essence they verify that the code meets the design specification. There are a few [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F07%252F20%252Fsoftware-unit-testing-what-is-it-and-why-is-it-important%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FnR9zOo%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Software%20Unit%20Testing%20-%20What%20is%20it%20and%20why%20is%20it%20important%3F%20%23application%20development%20%23best%20practices%20%23functional%20testing%20%23java%20%23perl%20%23php%20%23python%20%23refactoring%20%23ruby%20on%20rails%20%23software%20documentation%20%23unit%20testing%20%23web%20development%22%20%7D);"></div><p>Software development is composed of individual components.  As developers are building these units, they build tests to verify them for correctness.  These tests can verify the environment, they can verify data, they can verify edge cases and include test harnesses.  In essence they verify that the code meets the design specification.</p><p>There are a few key advantages to the unit testing approach:</p><ol><li>Self-Documenting - The tests themselves provide a type of documentation for the system as a whole.</li><li>Advances Refactoring - At a later date you may need to repair, rewrite or refactor portions of code.  Previously built unit tests provide a tremendous help to make sure your changes still meet the previous design specification.</li><li>Simplifies Functional Testing - With unit testing as an ongoing concern, the final components will likely perform more reliably, and if not the tests &amp; self-documentation may point to how or why they fail to meet some specification.</li></ol><p><a
href="http://www.quora.com/What-is-software-unit-testing-and-why-is-it-important">Sean Hull Quora Discussion - What is software unit testing? </a></p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/07/20/software-unit-testing-what-is-it-and-why-is-it-important/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Amazon Web Services &#8211; What is it and why is it important?</title><link>http://www.iheavy.com/2011/07/19/amazon-web-services-what-is-it-and-why-is-it-important/</link> <comments>http://www.iheavy.com/2011/07/19/amazon-web-services-what-is-it-and-why-is-it-important/#comments</comments> <pubDate>Tue, 19 Jul 2011 18:25:13 +0000</pubDate> <dc:creator>Sean Hull</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Cloud Migrations]]></category> <category><![CDATA[CTO/CIO]]></category> <category><![CDATA[Website Basics]]></category> <category><![CDATA[3tera]]></category> <category><![CDATA[amazon web services]]></category> <category><![CDATA[at&t]]></category> <category><![CDATA[automation]]></category> <category><![CDATA[autoscaling]]></category> <category><![CDATA[cloud providers]]></category> <category><![CDATA[cloud provisioning]]></category> <category><![CDATA[data center]]></category> <category><![CDATA[ec2]]></category> <category><![CDATA[elastic compute cloud]]></category> <category><![CDATA[enomaly]]></category> <category><![CDATA[gogrid]]></category> <category><![CDATA[iaas]]></category> <category><![CDATA[ibm]]></category> <category><![CDATA[infrastructure as a service]]></category> <category><![CDATA[infrastructure provisioning]]></category> <category><![CDATA[joyent]]></category> <category><![CDATA[microsoft]]></category> <category><![CDATA[ondemand compute power]]></category> <category><![CDATA[rackspace]]></category> <category><![CDATA[scalability]]></category> <category><![CDATA[terremark]]></category><guid
isPermaLink="false">http://www.iheavy.com/?p=1207</guid> <description><![CDATA[Amazon Web Services is a division of Amazon the bookseller, but this part of the business is devoted solely to infrastructure and internet servers.  These are the building blocks of data centers, the workhorses of the internet.  AWS's offering of Cloud Computing solutions allows a business to setup or "spinup" in the jargon of cloud [...]]]></description> <content:encoded><![CDATA[<div
class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.iheavy.com%252F2011%252F07%252F19%252Famazon-web-services-what-is-it-and-why-is-it-important%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FoVBJPX%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Amazon%20Web%20Services%20-%20What%20is%20it%20and%20why%20is%20it%20important%3F%20%233tera%20%23amazon%20web%20services%20%23at%26amp%3Bt%20%23automation%20%23autoscaling%20%23cloud%20providers%20%23cloud%20provisioning%20%23data%20center%20%23ec2%20%23elastic%20compute%20cloud%20%23enomaly%20%23gogrid%20%23iaas%20%23ibm%20%23infrastructure%20as%20a%20service%20%23infrastructure%20provisioning%20%23joyent%20%23microsoft%20%23ondemand%20compute%20power%20%23rackspace%20%23scalability%20%23terremark%22%20%7D);"></div><p>Amazon Web Services is a division of Amazon the bookseller, but this part of the business is devoted solely to infrastructure and internet servers.  These are the building blocks of data centers, the workhorses of the internet.  AWS's offering of Cloud Computing solutions allows a business to setup or "spinup" in the jargon of cloud computing, new compute resources at will.  Need a small single cpu 32bit ubuntu server with two 20G disks attached?  One command and 30 seconds away, and you can have that!</p><p>As we discussed previously, <a
href="http://www.iheavy.com/2011/07/07/infrastructure-provisioning-what-is-it-and-why-is-it-important/">Infrastructure Provisioning has evolved dramatically</a> over the past fifteen years from something took time and cost a lot, to a fast automatic process that it is today with cloud computing.  This has also brought with it a dramatic culture shift in the way that systems administration is being done, from a fairly manual process of physical machines, and software configuration, one that took weeks to setup new services, to a scriptable and automateable process that can then take seconds.</p><p>This new realm of cloud computing infrastructure and provisioning is called Infrastructure as a Service or IaaS, and Amazon Web Services is one of the largest providers of such compute resources.  They're not the only ones of course.  Others include:</p><ul><li>Rackspace Cloud</li><li>Joyent</li><li>GoGrid</li><li>Terremark</li><li>3Tera</li><li>IBM</li><li>Microsoft</li><li>Enomaly</li><li>AT&amp;T</li></ul><p>Cloud Computing is still in it's infancy, but is growing quickly.   <a
href="http://www.iheavy.com/2011/04/26/amazon-ec2-outage-failures-lessons-and-cloud-deployments/">Amazon themselves had a major data center outage in April that we discussed in detail. </a> It sent some hot internet startups into a tailspin!</p><p><a
href="http://www.quora.com/What-is-amazon-web-services-elastic-compute-cloud-and-why-is-it-important">More discussion of Amazon Web Services on Quora - Sean Hull</a></p>]]></content:encoded> <wfw:commentRss>http://www.iheavy.com/2011/07/19/amazon-web-services-what-is-it-and-why-is-it-important/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 2/118 queries in 0.065 seconds using disk
Object Caching 4379/4891 objects using memcached
Content Delivery Network via Amazon Web Services: CloudFront: d1wcmuriwzc7sn.cloudfront.net

Served from: www.iheavy.com @ 2012-02-04 22:14:19 -->
