<?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>clunkity &#187; file server</title>
	<atom:link href="http://blog.clunkity.com/tag/file-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.clunkity.com</link>
	<description>this undertaking captures complexity</description>
	<lastBuildDate>Wed, 08 Jul 2009 15:03:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>how long will my flash drive last?</title>
		<link>http://blog.clunkity.com/2009/06/18/how-long-will-my-flash-drive-last/</link>
		<comments>http://blog.clunkity.com/2009/06/18/how-long-will-my-flash-drive-last/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 21:02:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[file server]]></category>
		<category><![CDATA[flash drive]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.clunkity.com/?p=242</guid>
		<description><![CDATA[so i just built a new file server.  i&#8217;m trying to keep it as low power as possible.  it&#8217;s quite minimal, with an atom processor, a mini itx intel motherboard and a wd &#8220;green&#8221; hard drive.  that&#8217;s pretty much it.  it should be drawing less than 30W and probably closer to [...]]]></description>
			<content:encoded><![CDATA[<p>so i just built a new file server.  i&#8217;m trying to keep it as low power as possible.  it&#8217;s quite minimal, with an atom processor, a mini itx intel motherboard and a wd &#8220;green&#8221; hard drive.  that&#8217;s pretty much it.  it should be drawing less than 30W and probably closer to 20W.  i need to measure it.  anyways, i want to keep the hard drive strictly for data, thus keeping the os separate.  so i decided to install ubuntu server on a flash drive.  pretty straightforward and easy.  however, i got concerned about how long this flash drive would last if you run an os off of it.  they only have a finite number of write cycles before being unusable.<br />
<span id="more-242"></span><br />
usually this number is 10,000 to 100,000 writes per memory block (lets call them cells).  luckily, many flash drives these days have built in controllers to implement &#8220;wear leveling&#8221;.  this spreads its writes evenly over the memory cells so you&#8217;re not writing a single cell over and over again.  it will write a different one, then another different one, and so on.  knowing this, lets try to make a rough estimate of how long my 4GB flash drive will last.<br />
<br/>first i set up my / mount with the <em>noatime</em> option to minimizes the kjournald writes since i&#8217;m using ext3.  everything else is pretty much default.  logging is still on and no redirect writes.  my server is still a basic setup.  just hosting a couple of sites and my file shares.  given this, i used <em>iostat</em> to view how many writes were occurring during normal operation.  from an initial boot (a lot of writes) to 24 hours of operation, it showed that there were 1.89 Blk_wrtn/s.  1.89 &#8220;blocks&#8221; written per second over 24 hours.  these blocks are 512 bytes, or 512 memory cells.  now ideally i would run this for a while to get a more accurate number, but i&#8217;m too lazy and i just want a ballpark number (within a magnitude).  and 1.89 seems little to me (my data drive shows 78.07 blocks written/s right now). so to be a little more conservative, lets say my server eventually gets busier and writes 8 blocks per second.  more than four times what its doing right now.  right now my 4 GB flash drive has about 2 GB free.  since my flash drive uses dynamic wear leveling, it only distributes writes over free space.  so we have 2 GB to work with.<br />
<br/>time for math.  60*60*24*365.25=31557600 seconds in a year.  at the rate of 8 blocks per second, that&#8217;s 31557600*8=252460800 blocks per year or 129259929600 bytes per year (512 bytes per block).  thats 129260 MB or 129 GB.  with 2 GB to wear level over, that&#8217;s about 65 writes per memory cell over a year.  that&#8217;s it!  if they guarantee 10,000 writes per cell, then it would take about 153 years to reach that number.  for 100,000 writes/cell, 1538 years!  if i want to make sure my flash drive lasts 15 years, i can afford 80 blocks written per second.  perhaps i shouldn&#8217;t be so worried about destroying my flash drive.<br />
<br/>am i doing this math right?  am i missing anything?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.clunkity.com/2009/06/18/how-long-will-my-flash-drive-last/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
