<?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>DebianZone &#187; High Performance Computing</title>
	<atom:link href="http://debianzone.org/category/high-performance-computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://debianzone.org</link>
	<description>All About Debian</description>
	<lastBuildDate>Tue, 29 Jun 2010 11:18:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Porting Debian to Amazon EC2 for HPC</title>
		<link>http://debianzone.org/debian-hpc-at-amazon-ec2/</link>
		<comments>http://debianzone.org/debian-hpc-at-amazon-ec2/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 09:07:54 +0000</pubDate>
		<dc:creator>rpaiva</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Grid Computing]]></category>
		<category><![CDATA[High Performance Computing]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[HPC]]></category>

		<guid isPermaLink="false">http://debianzone.com/?p=48</guid>
		<description><![CDATA[Few months ago, I was challenged to build a High Performance Computing (HPC) instance on Amazon EC2 and the first thing that came in my mind was: which Linux distribution would fit on such requirements.]]></description>
			<content:encoded><![CDATA[<p>Few months ago, I was challenged to build a High Performance Computing (HPC) instance on Amazon EC2 and the first thing that came in my mind was: which Linux distribution would fit on such requirements.</p>
<p>I must confess I&#8217;m pretty much adept to Debian, but I was forced to be unbiased and start researching for better options for achieving my goal. Also because the environment I was going to port was already running Debian, but the application&#8217;s traffic growth was increasing at high speed and it seemed something was going on with that server.<span id="more-48"></span></p>
<p><strong>Why not Debian?</strong></p>
<p>Well, I had to choose some distribution where I could have my packages being compiled locally to comply with a few standards, like packages must be compiled specifically for the processor they&#8217;re running under, improve at compilation how programs make their calculations and it can be done only knowing exactly where you&#8217;re running your program, and more. Unfortunately, Debian maintains their packages pre-compiled, which means that they don&#8217;t know where they&#8217;re installing into, so they&#8217;re compiled with generic options and it can be a performance issue when talking about millions of users connected to your Apache. Let&#8217;s say that if the package takes 50KB of memory per request more than a package specifically compiled to the computer set it&#8217;s running under, for each 5000 users connected to my application I&#8217;ll need more 240MB of RAM. Well, things get bit harder if we multiply this by 10 and so on.</p>
<p>This thing was upsetting me, I didn&#8217;t want to simply abandon Debian without doing some research before. I found great distros to fulfill my requirements, such as Gentoo or Slackware&#8230; but I was leaving Debian&#8230;</p>
<p>Then I was about to really adopt Gentoo to achieve my goal, when I was talking to a friend of mine (which also is a Debian addict) and he said that it was possible to recompile packages locally with not much efforts and close (not that much, actually) to the Gentoo&#8217;s portage.</p>
<p>And then I found apt-build. It was pretty good! Despite the fact it took the whole week to recompile the whole distribution, it works pretty fine and I could get pretty close to my objective. Well, it was not that easy to get things exactly the way I wanted, but finally I could see it was possible.</p>
<p><strong>Why Debian?</strong></p>
<p>Indeed, I could really drop Debian and start using Gentoo or Slackware easily. But I had to be persistent to figure out a way to keep using Debian. Why? Well, package management is quite stable, I like the way they manage versions and Debian is a distribution I trust for years. Despite the fact I can get support very easy on the net and if I really need something installed quickly or if it&#8217;s a non-regular service I can still using aptitude (or apt-get).</p>
<p><strong>The Result</strong></p>
<p>After much work and efforts, I got an AMI with a high-tuned Debian inside. A clean and base install of Debian GNU/Linux 5.0.3 Lenny. Right now, I just have the 32 bit for m1.small and c1.medium, but soon I will get a 64 bit done.</p>
<p><strong>Features</strong></p>
<p>Kernel, RamDisk, Kernel modules and Filesystem Userspace:</p>
<ul>
<li> Uses the Canonical 2.6.28-12-xen-i386 Kernel (aki-21f01148) patched to be used on Debian Lenny.</li>
<li>Uses the Canonical 2.6.28-12-xen-i386 RAM Disk (ari-3bf01152) patched to be used on Debian Lenny.</li>
<li> All 2.6.28 kernel modules installed and running.</li>
<li> Updated with Fuse 2.8.1.</li>
</ul>
<p>Improved Performance:</p>
<ul>
<li>All installed Debian Packages _recompiled_ with GCC 4.3.2 and libc6 (xen and i686) for improved performance using Optimization level 3 (read more about GCC optmization options at <a href="http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html" target="_blank">http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html</a> and <a href="http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html" target="_blank">http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html</a>) and:</li>
<li>march=i686 (set PentiumPro instructions. Amazon EC2 &#8211; currently, Intel Xen 2.6GHz single core emulation &#8211; processor and Kernel in use are 686 compliant, but Debian packages are compiled as i386 for generic usage).</li>
<li>mfpmath=sse and msse for scalar floating point instructions to increase applications&#8217; speed and avoid the default 387 instability problems.</li>
<li> ffast-math to increase processor speed with math optimizations (Note that I used this flag only on IEEE and ISO math operation compliant applications. Don&#8217;t use it if you&#8217;re not sure if your application is compliant to IEEE and ISO specifications for math operations).</li>
<li> Still, I didn&#8217;t skip the debugging output (-g), so if you realize that any package is performing weirdly, please, debug it and let me know commenting in this post. I will fix it and raise a new AMI with the fix.</li>
<li> Kernel modules recompiled from the source (2.6.28.10) retrieved from <a href="http://www.kernel.org/" target="_blank">www.kernel.org</a>, optimized to the Amazon&#8217;s Xen environment. All security patches applied.</li>
</ul>
<p>Packages:</p>
<ul>
<li>Packages up-to-date.</li>
<li>OpenBSD SSH and Linux Screen for remote administration.</li>
<li>OpenSSL and CA Certificates for SSL and TLS support.</li>
<li>Amazon EC2 first boot script.</li>
<li>Amazon EC2 Tools 1.3.</li>
<li>Unused packages fully purged from system.</li>
</ul>
<p>Security:</p>
<ul>
<li>Shadow passwords enabled.</li>
<li>root password locked. Remote access is made only using the Keypair used to launch the instance.</li>
<li>ssh PasswordAuthentication disabled.</li>
</ul>
<p><strong>Conclusion</strong></p>
<p>I have proven to myself I could really have Debian running for an HPC environment smoothly, what  makes me even prouder of this distro.</p>
<p>If you want to check the result, the AMI ID is ami-2d759644. If you do so, I&#8217;d be glad to hear from you.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fdebianzone.org%2Fdebian-hpc-at-amazon-ec2%2F&amp;linkname=Porting%20Debian%20to%20Amazon%20EC2%20for%20HPC">Share/Bookmark</a>]]></content:encoded>
			<wfw:commentRss>http://debianzone.org/debian-hpc-at-amazon-ec2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->