<?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>Anchor Web Hosting Blog &#187; drbd</title>
	<atom:link href="http://www.anchor.com.au/blog/tag/drbd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anchor.com.au/blog</link>
	<description>A view into the Anchor Engineroom</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:43:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>GitHub: Speed matters</title>
		<link>http://www.anchor.com.au/blog/2009/09/github-speed-matters/</link>
		<comments>http://www.anchor.com.au/blog/2009/09/github-speed-matters/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 06:39:27 +0000</pubDate>
		<dc:creator>bsmith</dc:creator>
				<category><![CDATA[FTW]]></category>
		<category><![CDATA[drbd]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[moving]]></category>
		<category><![CDATA[project starbug]]></category>
		<category><![CDATA[site migration]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[starbug]]></category>

		<guid isPermaLink="false">http://www.anchor.com.au/blog/?p=1161</guid>
		<description><![CDATA[Impressions from the first article (in its first day) and the first 24 hours of the GitHub migration, have caused us at Anchor to believe that; GitHub is just as popular as we thought, The migration was worth it, as things are running much faster (just check your twitter feeds, or better yet, check your [...]]]></description>
			<content:encoded><![CDATA[<p><em>Impressions from the first article (in its first day) and the first 24 hours of the GitHub migration, have caused us at Anchor to believe that; </em></p>
<ol>
<li><em>GitHub is just as popular as we thought, </em></li>
<li><em>The migration was worth it, as things are running much faster (just check your twitter feeds, or better yet, check your GitHub source tree for no reason <img src='http://www.anchor.com.au/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ); and,<strong> </strong></em></li>
<li><em>People are interested in what has gone under the hood of the new GitHub (insert your favorite fast car here; otherwise lets say a roadster). </em></li>
</ol>
<p><em>Taking these three things into account, this installment will discuss why things are so much faster post migration compared to prior.</em></p>
<p>I said &#8216;faster&#8217; and not &#8216;fast&#8217;, because GitHub is now as fast as any website should be. So in comparison, yes, GitHub is fast now, however it is akin to riding your bicycle with half inflated tires: when fully inflated, suddenly your old bike is blazing fast. Now this is not to be critical of the former architecture which held its merits when GitHub was founded. GitHub had simply moved to a stage where a infrastructure architecture refresh was logical.</p>
<p>The main thing, in the large, that made this new architecture fast was that we were given a blank slate and large amounts of freedom to make an architecture that would do the job well.  This is an incredibly rare thing, and it no doubt took a lot of courage on Github&#8217;s part.  For that, we have to say &#8220;thankyou&#8221; to the Github team for letting us have that freedom.  I like to think that we&#8217;ve repaid that trust with a pretty awesome architecture that will serve them well for some time to come.</p>
<p><strong>SCALE: </strong>When looking at the new architecture as a whole, the increased scale is immediately evident. GitHub now consumes far more hardware than ever before:</p>
<p><em>Old Infrastructure:</em></p>
<ul style="margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 1.25em;line-height: 1.4em;padding: 0px">
<li>10 VMs</li>
<li>39 VCPUs</li>
<li>54GB <span style="line-height: 1.4em;padding: 0px;margin: 0px">RAM</span></li>
</ul>
<p style="margin-top: 1em;margin-right: 0px;margin-bottom: 1em;margin-left: 0px;line-height: 1.4em;padding: 0px"><em>New Infrastructure:</em></p>
<ul style="margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 1.25em;line-height: 1.4em;padding: 0px">
<li>16 physical machines</li>
<li>128 physical cores</li>
<li>288GB <span style="line-height: 1.4em;padding: 0px;margin: 0px">RAM</span></li>
</ul>
<p>Or for those who enjoy visual cues:</p>
<p><img class="aligncenter size-full wp-image-1179" src="http://www.anchor.com.au/blog/wp-content/uploads/2009/09/Memory_Compare1.png" alt="Resource comparison old to new infrastructure" width="375" height="436" /></p>
<p>It is a credit to the old infrastructure and GitHub&#8217;s code that it ran so well on so little (in comparison). The first credit for increased performance is <strong>increased scale</strong>.</p>
<p>An important note regarding the hardware is that there is nothing special (or industry secretive) regarding it. The solution in its entirety is run from commodity hardware. No special black boxes doing scary things with packets and routes. No appliance servers. The solution architecture developed by Anchor can be used with any hardware vendor (insert: Dell, HP, IBM, SuperMicro, etc). Vendor neutrality provides GitHub with no encumbrance with either scaling up or out, a key issue when considering growth and future flexibility.</p>
<p><em>Note: The architectures flexibility allows for the user repository storage to be expanded with a mix of vendor hardware (should GitHub ever change hardware vendor). Furthermore, any component can be exchanged for another vendor&#8217;s hardware with no change to GitHubs architecture or software.</em></p>
<p>In a nutshell, the increased scale provides:</p>
<ul>
<li>More GitHub front-end servers to service your requests;</li>
<li>More storage; and</li>
<li>More I/O bandwidth when working with your repository data</li>
</ul>
<p><strong>HARDWARE PERFORMANCE:</strong> The speed specifications of the underlying components is important, in addition to how that hardware is utilised.</p>
<p><em>Storage I/O: </em>A common factor in poor performance with any solution is an <a href="http://www.anchor.com.au/hosting/development/HuntingThePerformanceWumpus#head-8f4521847d24e2119a421aa8d89a89d7e8372fdc">I/O bottleneck at the storage level</a>.  This pain was GitHub&#8217;s. To alleviate this, not only is the storage now distributed across several servers (distributing the I/O), but it is now running on direct-attached 15,000 RPM SAS disks on battery-backed hardware RAID. Therefore, the second credit for increased performance is <strong>faster storage</strong>.</p>
<p><em>Direct access to hardware: </em>Virtualisation is great. What isn&#8217;t great is when virtualisation is used as a universal solution. At Anchor we believe there is a place for virtualisation, and systems with massive I/O or CPU requirements is not that place. By moving resource heavy systems onto dedicated hardware, any contention for resources between individual VMs is removed. The third credit goes to <strong>less overhead</strong>.</p>
<p><strong>ARCHITECTURE:</strong> Throwing hardware at a scaling problem is an easy solution, but without the right division of resources and the right software to properly use it, it&#8217;s not going to run real fast.</p>
<p>For GitHub, this was their innovative Git command proxying systems, which do an excellent job of taking requests from the frontends (where users connect with their web browser, git client, or SSH client) and shipping them to the fileservers.  The database structure, filesystem layout, and code efficiency also contribute to this.</p>
<p>Given that the software isn&#8217;t our speciality, there&#8217;s not a lot for us to say about this, but Github are planning a series of posts on <a href="http://github.com/blog">their blog</a>, and I&#8217;m quite sure it&#8217;ll be enlightening.</p>
<p><strong>TO REVIEW</strong>: The factors involved in GitHub&#8217;s faster response on the new infrastructure include (but are not limited to):</p>
<ul>
<li>Increased Infrastructure (Scale)</li>
<li>Faster Hardware ( Storage)</li>
<li>No resource contention (More resources per server)</li>
<li>Solid, scalable architecture (Awesomeness)</li>
</ul>
<p><em>Keep an eye on this space, as we delve into technology specific posts regards what kinds of 11 herbs and spices Anchor used to realise the new GitHub architecture.</em></p>
<p><em><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anchor.com.au/blog/2009/09/github-speed-matters/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>When HA won&#8217;t play the way you want it to</title>
		<link>http://www.anchor.com.au/blog/2009/09/when-ha-wont-play-the-way-you-want-it-to/</link>
		<comments>http://www.anchor.com.au/blog/2009/09/when-ha-wont-play-the-way-you-want-it-to/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 03:26:29 +0000</pubDate>
		<dc:creator>oliver</dc:creator>
				<category><![CDATA[FTW]]></category>
		<category><![CDATA[drbd]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[ha]]></category>
		<category><![CDATA[heartbeat]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[shoehorn]]></category>
		<category><![CDATA[win]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.anchor.com.au/blog/?p=1116</guid>
		<description><![CDATA[In an ideal world every service would support High Availability and Load Balancing, would scale up easily and cleanly and all of us systems administrators would be paid bucketloads to play golf all day while the computers did all the hard work. To quote Dylan Moran of Black Books fame, &#8220;Don&#8217;t make me laugh&#8230;bitterly&#8221;. I&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>In an ideal world every service would support High Availability and Load Balancing, would scale up easily and cleanly and all of us systems administrators would be paid bucketloads to play golf all day while the computers did all the hard work. To quote Dylan Moran of Black Books fame, &#8220;Don&#8217;t make me laugh&#8230;bitterly&#8221;.</p>
<p>I&#8217;ll cut to the chase &#8211; sometimes you have to really shoehorn technologies to do what you want. Fortunately I love doing this, and the technologies of today&#8217;s article are virtualised Windows 2008 on Xen, and Oracle XE 10g. Neither likes to play ball, for a few reasons:</p>
<ul>
<li>Generally speaking, when you virtualise an OS you want to have para-virtualisation drivers enhancing the hardware support. Open Source Xen has PV drivers, but they are not signed with a legitimate certificate. Windows 2008 does not play nicely with unsigned or test-cert-signed drivers.</li>
<li>Oracle is just a messy, messy, nasty thing. Yes, paid versions undoubtedly support all manner of loadbalancing and HA options, but the free one does not.</li>
</ul>
<h2>Adding HA to Windows 2008 on Xen</h2>
<p>The basic procedure was as follows:</p>
<ul>
<li>Install the telnet server within Windows (making sure to lock it down in the firewall to only be accessible by the host machines)</li>
<li>Create a special admin account and password used for triggering a shutdown</li>
<li>Create an Expect script which logs into the VM via telnet, and issues the shutdown command</li>
<li>Create a modified version of the Heartbeat Xen resource agent which calls the expect script to shut down the VM (and wait a safe period of time) before &#8220;xm shutdown&#8221; is called. Without this, &#8220;xm shutdown&#8221; will simply power off the VM (in absence of working PV drivers).</li>
</ul>
<p>The VM was already running on a DRBD volume between the two HA Xen servers, so I was able to just create a standard set of Heartbeat resources to control DRBD primary/secondary mode and the startup/shutdown of the HA WIndows VM. For your benefit (if you want to recreate it) here is the expect script:</p>
<pre>#!/usr/bin/expect -f
#
# Script which "automates" shutting down a Windows VM

# Don't log telnet output and commands to stdout, and set a reasonable timeout.
log_user 0
set timeout 3

# Log in via telnet and issue commands. Fairly straightforward.
spawn -noecho /usr/bin/telnet 192.168.1.1
sleep 0.5

# login as the "shutdown" user
expect {
 -re "login: $" {send "shutdown\r"}
 timeout exit
}
sleep 0.5
expect {
 -re "password: $" {send "mysecretpassword\r"}
 timeout exit
}
sleep 0.5
expect {
 -re "&gt;$" {send "shutdown /s /t 0\r"}
 timeout exit
}
sleep 0.1
expect {
 -re "&gt;$" {send "exit\r"}
 timeout exit
}
exit</pre>
<p>The rest is fairly self-explanatory if you understand Heartbeat.</p>
<h2>Oracle XE 10g</h2>
<p>This was more of a learning process, since usually you just install Oracle and leave it the hell alone. Not so for me.</p>
<ul>
<li>Install Oracle on both nodes using (fortunately) the RPMs they provide</li>
<li>Configure Oracle on both nodes including creating the databases, using the same password for SYSDBA</li>
<li>Shutdown both instances of Oracle</li>
<li>Create the DRBD resource, and mount it on the primary node</li>
<li>On the primary node, move the contents of /usr/lib/oracle/xe/oradata and /usr/lib/oracle/xe/app/oracle/flash_recovery_area onto the mounted DRBD</li>
<li>On the secondary node, delete the aforementioned paths</li>
<li>Bind mount the oradata and flash recovery area from the mounted DRBD volume into the correct places in the directory tree.</li>
<li>Start Oracle</li>
</ul>
<p>After I had created a Heartbeat resource group which contained the DRBD resource, the DRBD filesystem mount, the aforementioned bind mounts and the Oracle service itself I was quite pleased to see that Oracle plays quite nicely with our shoehorned HA setup. You&#8217;ll want to make sure you have a <a href="http://www.anchor.com.au/blog/2009/07/oracle-why-dost-thou-sucketh-so-prodigiously/">properly fixed</a> Oracle init script though, as the supplied one is fairly bad.</p>
<p>After making Oracle and Windows 2008 work nicely in HA, I&#8217;m almost certain any service no matter how bad can be shoehorned in a similar way to give you decent availability even when it was n&#8217;t originally intended.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anchor.com.au/blog/2009/09/when-ha-wont-play-the-way-you-want-it-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

