<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Koitsu&#039;s Blog</title>
	<atom:link href="https://koitsu.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://koitsu.wordpress.com</link>
	<description>Keeping IT real like a sprayed snow tree...</description>
	<lastBuildDate>Sun, 28 Apr 2013 13:46:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='koitsu.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://secure.gravatar.com/blavatar/d1805d413ea3489eac62ed2a03ab3789?s=96&#038;d=https%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Koitsu&#039;s Blog</title>
		<link>https://koitsu.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://koitsu.wordpress.com/osd.xml" title="Koitsu&#039;s Blog" />
	<atom:link rel='hub' href='https://koitsu.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How Intel&#8217;s SSD Toolbox Optimizer (TRIM) feature works</title>
		<link>https://koitsu.wordpress.com/2013/02/12/how-intels-ssd-toolbox-optimizer-trim-feature-works/</link>
		<comments>https://koitsu.wordpress.com/2013/02/12/how-intels-ssd-toolbox-optimizer-trim-feature-works/#comments</comments>
		<pubDate>Wed, 13 Feb 2013 00:05:49 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=2502</guid>
		<description><![CDATA[There is a never-ending supply of people who don&#8217;t understand what TRIM is (or as it&#8217;s called per ATA specification, DATA SET MANAGEMENT) and how it&#8217;s used at the OS level. How it works The Optimizer feature creates a large &#8230; <a href="https://koitsu.wordpress.com/2013/02/12/how-intels-ssd-toolbox-optimizer-trim-feature-works/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2502&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>There is a never-ending supply of people who don&#8217;t understand what <a href="http://en.wikipedia.org/wiki/TRIM">TRIM</a> is (or as it&#8217;s called per ATA specification, DATA SET MANAGEMENT) and <strong>how</strong> it&#8217;s used at the OS level.</p>
<p><span id="more-2502"></span></p>
<h3>How it works</h3>
<p>The Optimizer feature creates a large number of what are called <a href="http://en.wikipedia.org/wiki/Sparse_file">sparse files</a>, which NTFS <a href="http://www.flexhex.com/docs/articles/sparse-files.phtml">natively supports</a> via the <tt>FSCTL_SET_SPARSE</tt> flag when calling <tt>DeviceIoControl()</tt>.  For further information about NTFS and sparse files, see <a href="http://technet.microsoft.com/en-us/library/cc781134%28v=ws.10%29.aspx">Microsoft&#8217;s documentation</a>.</p>
<p>Before continuing on, please make sure you understand the concept of a sparse file.  Sparse files are not files that are actively filled with data (i.e. not necessarily filled with zeros or some other content), but rather a files on the filesystem which have a predeclared size/length even though data has not been written to that allocated space.  In fact, if the files <strong>were</strong> zeroed or had bytes written to them, not only would the Optimizer take significantly longer to run but would also add excessive wear/tear on <a href="http://en.wikipedia.org/wiki/Flash_memory#NAND_memories">NAND pages</a> for no good reason (given what the Optimizer does during its subsequent steps &#8212; keep reading).</p>
<p>The files are stored at the root of the filesystem and are named <tt>--=={Intel_Trim_File_X}==--.bin</tt>, where <strong>X</strong> is an incrementing integer starting at 0.  The files are not marked hidden and are untouchable (non-readable/non-writeable, due to how Windows&#8217; default file locking model works) by processes other than the Optimizer.</p>
<p>The number of sparse files created depends upon how much free space is available on the filesystem; the Optimizer tends to leave exactly 1GByte (1,073,741,824 bytes) untouched while being run.  Proof when run on an Intel 510 120GB SSD on Windows XP:</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
C:\&gt;DIR --*
 Volume in drive C has no label.
 Volume Serial Number is 3442-346D

 Directory of C:\

02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_0}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_1}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_10}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_11}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_12}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_13}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_14}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_15}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_16}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_17}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_18}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_19}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_2}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_20}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_21}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_22}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_23}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_24}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_25}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_26}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_27}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_28}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_29}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_3}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_30}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_31}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_32}==--.bin
02/06/2013  16:01       291,819,520 --=={Intel_Trim_File_33}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_4}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_5}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_6}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_7}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_8}==--.bin
02/06/2013  16:01     3,221,225,472 --=={Intel_Trim_File_9}==--.bin
              34 File(s) 106,592,260,096 bytes
               0 Dir(s)   1,073,741,824 bytes free
</pre>
<p>It&#8217;s important to understand that with filesystems, not all data is contiguous (linear); <a href="http://support.microsoft.com/kb/314878">NTFS cluster size</a> or Allocation Unit Size (also often erroneously called &#8220;block size&#8221;) defines the size of a piece of data at the filesystem level.  For example, if your NTFS cluster size is 16KBytes (16,384 bytes), a file that contains 300 bytes would take up 1 cluster (16,384 bytes) on the filesystem, while a file that contains 48,291 bytes would take up 3 clusters (49,152 bytes) on that same filesystem.</p>
<p>But as I said, the important part is to understand that these &#8220;clusters&#8221; do not have to be contiguous or stored in linear order; they can quite literally be scattered all over the disk (and this is what <a href="http://en.wikipedia.org/wiki/Defragmentation">defragmentation utilities</a> solve).  Non-contiguous data only impacts performance with classic mechanical HDDs (MHDDs) due to <a href="http://en.wikipedia.org/wiki/Seek_time#Seek_time">seek time</a> (which SSDs virtually lack).</p>
<h3>How does TRIM fit into this?</h3>
<p>So why does the non-contiguous nature of a &#8220;cluster&#8221; matter when it comes to the Optimizer?  Because at the ATA level, TRIM only operates on LBA ranges &#8212; it has no knowledge about filesystems.  For further details about TRIM, please see specification T13/2015-D revision 3 (working draft) or newer.</p>
<p>In turn, what the Optimizer does after allocating all these sparse files is to calculate the linear LBA ranges which those sparse files actually make up, then proceed to issue the raw DATA SET MANAGEMENT command to the controller for said LBA ranges, which in turn make it to the SSD.  The SSD&#8217;s <a href="http://en.wikipedia.org/wiki/Flash_Translation_Layer">flash transition layer</a> (a.k.a. FTL) then knows that LBA regions X to Y do not contain data that the filesystem/OS cares about any longer, and can be removed from (or marked unused within) the FTL map, and subsequently are considered by the SSD as &#8220;available for use&#8221;.</p>
<p>The sparse files are in effect used to allocate space (at the filesystem level) that can then be safely TRIM&#8217;d by the Optimizer itself.</p>
<p>Once all the TRIM operations have completed, the sparse files are deleted.</p>
<h3>More about TRIM, its internal behaviour, and performance</h3>
<p>Some folks have asked me in the past if the TRIM causes the underlying data at those LBAs to be zeroed, or if the data is simply left alone in a NAND page somewhere, waiting to be overwritten via the <a href="http://en.wikipedia.org/wiki/Flash_memory#Limitations">standard erase-program methodology of NAND flash</a>.</p>
<p>The answer is: the behaviour depends on the implementation chosen by the SSD vendor.  Table 35 of T13/2015-D revision 3 (working draft) specification defines what the methods/models are.  Vendors are supposed to disclose the method via the ATA IDENTIFY command (0xec).  Rather than explain it verbosely, I&#8217;ll just include a picture of the chart itself:</p>
<ul>
<li><a href="http://koitsu.files.wordpress.com/2013/02/trim_behaviour.png">http://koitsu.files.wordpress.com/2013/02/trim_behaviour.png</a></li>
</ul>
<p>From this we can see that the available methods of operation are:</p>
<ol>
<li>No TRIM support</li>
<li>TRIM&#8217;d LBAs, when subsequently read, may return random/indeterminate data</li>
<li>TRIM&#8217;d LBAs, when subsequently read, return a consistent (static) value (e.g. 0xff)</li>
<li>TRIM&#8217;d LBAs, when subsequently read, return zero (i.e. 0&#215;00)</li>
</ol>
<p>The behaviour, as stated before, can be determined per the respective bits in the results of an ATA IDENTIFY command.  Whether the SSD vendor chooses to implement that part of the spec is up to them (older SSDs may not, and even newer SSDs may not), and whether or not the utilities and OS you use that issue IDENTIFY to the device support showing you those bits is also up to the programmer and vendor, respectively.</p>
<p>Regardless of behaviour type, the important part is that the FTL map no longer considers those LBAs (or ranges of LBAs) as &#8220;used&#8221; by the filesystem.</p>
<p>TRIM is important for this sole reason: the more LBA entries (or LBA ranges) the FTL map contains, generally speaking, the worse the SSD performs.</p>
<p>Without TRIM, the SSD&#8217;s FTL map, over time, will lack any indication of available LBA ranges.  This in turn forces <a href="http://en.wikipedia.org/wiki/Write_amplification#Garbage_collection">garbage collection</a> (a.k.a. GC) to be used instead, which is significantly less efficient than the OS (or application) telling the drive &#8220;I&#8217;m done with these LBAs&#8221;.  GC has the major downside of halting all I/O to the drive while its internal calculations/analysis are performed (else risk marking an LBA or LBA region as unused at the same time as the filesystem/OS requesting use of that LBA for a legitimate file).  The GC implementation and its behaviour varies between drive models and drive vendors, including some vendors going as far as performing <a href="http://en.wikipedia.org/wiki/Write_amplification#File-system_aware_garbage_collection">actual filesystem-level analysis</a> on the drive itself (something I feel is extremely risky).</p>
<p>Regardless of how efficient GC is today, the fact of the matter remains that performance is significantly worse relying entirely on GC.  This is exactly why Intel&#8217;s Optimizer feature is so important for OSes which lack native TRIM support.</p>
<p>Furthermore, this is why you should not issue a &#8220;full format&#8221; (i.e. writing zeros or random data across the entire drive or a partition), sometimes (erroneously) called a &#8220;low-level format&#8221;, with an SSD.  Unlike a classic mechanical HDD, if this is done on an SSD, the FTL map would almost certainly become full immediately afterwards (depending on if the formatting utility chooses to issue TRIM commands to the underlying device after writing zeros or random data to each LBA &#8212; in which case, there was no point in writing data there in the first place!).</p>
<p>For the SSD equivalent of a &#8220;full format&#8221;, the ATA SECURITY ERASE UNIT command (0xf4) should be used.  This command resets the FTL map, as well as some other internal bits within the SSD.  Intel&#8217;s SSD Toolbox &#8220;Secure Erase&#8221; feature does exactly this.  The same can be accomplished <a href="https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase">within other OSes</a> too.</p>
<h3>So what about OSes that support TRIM natively?  How does that work?  Do I need the Optimizer?</h3>
<p>There are many present-day OSes that support TRIM natively.  Every Windows OS <strong>after</strong> Windows Vista has supported TRIM operation natively, while older OSes (like Windows XP) do not have support for it.</p>
<p>An OS having support for TRIM means that the OS will issue TRIM commands to the underlying device on certain I/O operations &#8212; the most common and widely used operation is file deletion.  It is unknown (to me) whether or not Windows issues TRIM operations when doing other things, such as pruning (shrinking) the page file.</p>
<p>On FreeBSD, for example, TRIM is implemented via what&#8217;s called <a href="http://www.freebsd.org/cgi/man.cgi?query=bio&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+9.1-RELEASE&amp;arch=default&amp;format=html">BIO_DELETE</a>, which is used by the kernel for multiple things (not just file deletions).  Because FreeBSD is open-source and the developers/engineers can be communicated with directly, knowing what uses BIO_DELETE is possible.  With Windows, assumptions have to be made (and I would rather not make those), but it&#8217;s well-established that file deletions result in use of TRIM.</p>
<p><strong>A Windows OS that supports TRIM natively does not require the Optimizer to be run.</strong>  I cannot stress this point enough.  In fact, depending on the behaviour of the TRIM implementation (see above), this could actually cause excessive wear/tear on the NAND flash if done repeatedly.  Which leads me to&#8230;</p>
<h3>A short story</h3>
<p>In January I dealt with <a href="http://www.dslreports.com/forum/r27933607-Buggy-Intel-SSD-520-Series-SSD-Firmware">a report from a user</a> stating his Intel 520-series SSD had &#8220;crapped out on him&#8221;, insisting it was caused by &#8220;a firmware bug&#8221; <a href="http://communities.intel.com/thread/33953">reported by some random Internet user</a> (note the username) affecting only 520-series drives that were issued ATA STANDBY or ATA SLEEP commands by the OS, or when the drive was reattached on the SATA bus.</p>
<p>As I began to question his prognosis, he admitted that he was running Windows 7 or 8, did not let his drive go into standby/sleep, and did not excessively remove the drive from the bus.  Further pressure revealed that he had <a href="http://www.dslreports.com/forum/r27934681-">scheduled the Intel SSD Optimizer function to run every day at 0300</a> &#8212; and found that his drive &#8220;had issues&#8221; around that time, repeatedly.  Thus, he concluded on his own behalf that he was, somehow, &#8220;being bit by this [unsubstantiated] firmware bug&#8221;.</p>
<p>I was prompt to <a href="http://www.dslreports.com/forum/r27934887-Buggy-Intel-SSD-520-Series-SSD-Firmware">lecture him</a> about this; he actually may have killed his own SSD due to his own misunderstanding/negligence of what TRIM is and how it works.  I would have be able to determine this if he had provided SMART attributes for the SSD in question, but has since failed to provide them.</p>
<p>This misunderstanding and lack of education is heavily perpetuated by the &#8220;PC enthusiast&#8221; community, combined by badly-written documentation by vendors, neither of which are that individual&#8217;s fault of course.  This just goes to show how someone&#8217;s lack of understanding of something can actually cause them grief.</p>
<h3>An opinionated footnote</h3>
<p>Over the past 15 years or so, there has been a growing trend where &#8220;PC enthusiasts&#8221; have been deemed reliable sources of information when it comes to technology.  For every 5000 <a href="http://redwing.hutman.net/~mreed/">forum warriors</a> there&#8217;s one person (probably an engineer) who <strong>actually understands</strong> the technology being discussed.  While I fully admit SSDs are a fairly new technology that&#8217;s rapidly evolving, these &#8220;enthusiasts&#8221; remain a dominant source of reference material.  I say that with as much modesty as possible.</p>
<p>It&#8217;s very important to remember that there is a world of difference between an engineer and an enthusiast: one works with the technology (almost certainly professionally) at a very low level, tends to be older (mid-30s and above), and often does not have the time to dedicate to providing information to the masses &#8212; while the other is rarely more than an <a href="http://www.digitalstormonline.com/comploadaventum.asp?id=674559&amp;price=%248%2C794">I&#8217;ve-got-money-burning-a-hole-in-my-pocket</a> all-I-care-about-is-how-many-frames-per-second-I-get consumer.  Technology companies (especially all the big name brands) love the latter because they keep the cash rolling in.</p>
<p>I gladly acknowledge the importance of keeping the market flowing, but the proliferation of misinformation coming from such individuals is extremely damaging, especially to those of us who <strong>are</strong> engineers &#8212; we end up spending more time debunking, breaking down, and having to defend facts than if we were to simply provide good information from the get-go.  But what people find on the Internet today is often speculative and en masse, and that disappoints me.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/2502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/2502/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2502&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2013/02/12/how-intels-ssd-toolbox-optimizer-trim-feature-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Bizarre Japanese news</title>
		<link>https://koitsu.wordpress.com/2013/01/23/bizarre-japanese-news/</link>
		<comments>https://koitsu.wordpress.com/2013/01/23/bizarre-japanese-news/#comments</comments>
		<pubDate>Wed, 23 Jan 2013 09:06:00 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=2496</guid>
		<description><![CDATA[I came across this one today and had to post it. Parts that continue to make me LOL are bolded. http://www.couriermail.com.au/news/breaking-news/japan-man-held-after-biting-son-to-death/story-e6freoo6-1226558424616 http://www.thehindubusinessline.com/features/japan-man-bit-snakepossessed-son-to-death-media/article4329034.ece A man has been arrested on suspicion of biting his adult son to death to get rid of &#8230; <a href="https://koitsu.wordpress.com/2013/01/23/bizarre-japanese-news/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2496&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I came across this one today and had to post it.  Parts that continue to make me LOL are bolded.</p>
<ul>
<li><a href="http://www.couriermail.com.au/news/breaking-news/japan-man-held-after-biting-son-to-death/story-e6freoo6-1226558424616" rel="nofollow">http://www.couriermail.com.au/news/breaking-news/japan-man-held-after-biting-son-to-death/story-e6freoo6-1226558424616</a></li>
<li><a href="http://www.thehindubusinessline.com/features/japan-man-bit-snakepossessed-son-to-death-media/article4329034.ece" rel="nofollow">http://www.thehindubusinessline.com/features/japan-man-bit-snakepossessed-son-to-death-media/article4329034.ece</a></li>
</ul>
<blockquote><p>
A man has been arrested on suspicion of biting his adult son to death to get rid of a &#8220;snake haunting him&#8221;.</p>
<p>TV Asahi reported that Katsumi Nagaya, 53, seriously injured his son, Takuya, 23, on Friday.</p>
<p>He was reported to have head-butted and bitten him after Takuya began <strong>writhing around claiming to be a serpent.</strong></p>
<p>The son was declared dead after being taken to hospital.</p>
<p>The suspect reportedly told police he had attacked his son to <strong>remove the snake from his mind.</strong>
</p></blockquote>
<p>It&#8217;s a sad story, but also hilarious given its bizarre nature.  <a href="http://www.lyricsfreak.com/d/doors/the+end_20042686.html">The snake is long; seven miles&#8230;</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/2496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/2496/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2496&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2013/01/23/bizarre-japanese-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>FreeBSD, csup/cvsup, portsnap, and svn</title>
		<link>https://koitsu.wordpress.com/2013/01/02/freebsd-csupcvsup-portsnap-and-svn/</link>
		<comments>https://koitsu.wordpress.com/2013/01/02/freebsd-csupcvsup-portsnap-and-svn/#comments</comments>
		<pubDate>Wed, 02 Jan 2013 22:00:10 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=2442</guid>
		<description><![CDATA[The subject of FreeBSD and it&#8217;s migration to SVN has come up on the mailing lists repeatedly over the past 6 months. The biggest problem seems to be the lack of communication and transparency of this change, combined with the &#8230; <a href="https://koitsu.wordpress.com/2013/01/02/freebsd-csupcvsup-portsnap-and-svn/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2442&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The subject of FreeBSD and it&#8217;s migration to SVN has come up on the mailing lists repeatedly over the past 6 months.  The biggest problem seems to be the lack of communication and transparency of this change, combined with the  <a href="http://www.freebsd.org/news/2012-compromise.html">recent security breach incident</a> being used as a stepping stone to justify the situation (despite that incident having absolutely nothing to do with the transition of CVS-&gt;SVN).  Peter Wemm has at least <a href="http://lists.freebsd.org/pipermail/freebsd-stable/2013-January/071555.html">shed some light</a> on the need for the migration itself; but it still leaves end users out in the cold (so-to-speak).</p>
<p>The most common question I&#8217;ve seen posted by end users is &#8220;how do I migrate?&#8221; and &#8220;is csup/cvsup broken?&#8221;  The answers which have been provided by both the developer and user community have been abysmal at best, mainly because nobody actually bothers to take the time to explain the complexities and nuances involved in the migration.  The <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/subversion-primer.html">official FreeBSD documentation</a> is overwhelming and doesn&#8217;t take into account some of these nuances (nor should it, IMO).  The migration itself is actually easy, but there are many catches along the way which are certain to bite even the most educated of administrators.  I&#8217;ll also use this opportunity to explain why use of portsnap should be avoided if at all possible.</p>
<p><span id="more-2442"></span></p>
<p>To try and keep it simple, I&#8217;ll outline each of the common setups people have, and how exactly to migrate from each one.  I should be very clear with my intentions here:</p>
<ol>
<li>By &#8220;migrate&#8221; I do not mean &#8220;converting your existing data on the filesystem to svn&#8221; &#8212; instead, all procedures are based upon the &#8220;start fresh, delete old cruft, and go from there&#8221; concept.  It is not worth fiddling around with something so key/important to FreeBSD; think about it.</li>
<li>I strongly advocate management of both src and ports entirely via SVN.  If you follow -RELEASE branches and do not care about src at all, I still recommend you use SVN to handle ports rather than portsnap (more on that later).</li>
<li>The SVN checkout URL I use for src is for what has historically been called RELENG_9 (i.e. 9.x-STABLE, 9.x-PRERELEASE, 9.x-RCx, etc.), not -RELEASE branches.  I do not follow -RELEASE branches nor do I care about them; -RELEASE branches only contain fixes for security issues, and every single -RELEASE since the 5.x days has had too many general bugs that warrant immediate fixing.</li>
</ol>
<p>Below is how I migrated my own systems, starting with a fresh OS installation.  The following should be performed as root:</p>
<pre class="brush: plain; auto-links: false; title: ; toolbar: false; notranslate">
rm -fr /usr/ports
rm -fr /var/db/sup/* /usr/sup
portsnap fetch
portsnap extract
cd /usr/ports/devel/subversion
make install
cd /
rm -fr /var/db/portsnap/*
rm -fr /usr/ports
mkdir /usr/ports
svn checkout svn://svn.freebsd.org/ports/head /usr/ports
rm -fr /usr/src
mkdir /usr/src
svn checkout svn://svn.freebsd.org/base/stable/9 /usr/src
chmod 700 /root/.subversion
...Manually remove any SUP-related variables from /etc/make.conf...
</pre>
<p>Now to explain this utter madness.</p>
<ul>
<li>Line 1 deletes the existing copy of <tt>/usr/ports</tt> from the filesystem</li>
<li>Line 2 deletes the CVS repository databases associated with src and ports; these are (were) managed by csup and cvsup themselves</li>
<li>Expanding on line 2: lots of people don&#8217;t know about these databases.  Quite simply what&#8217;s in <tt>/usr/{src,ports}</tt> does not necessarily reflect what CVS thinks is in <tt>/usr/{src,ports}</tt>, and this is how/why there can be mismatches when going from one branch to another.  Surprise!  This is what <a href="http://lists.freebsd.org/pipermail/freebsd-questions/2013-January/247832.html">bites a lot of people</a> when switching between tags (i.e. going from RELENG_9_0 to RELENG_9 or vice-versa) or versions in general.  So to make it clear: csup uses <tt>/var/db/sup</tt> for its database directory, while cvsup uses <tt>/usr/sup</tt></li>
<li>Lines 3-4 use portsnap to fetch a copy of the <tt>/usr/ports</tt> tree.  Why do we do this?  Because we need to install subversion from ports</li>
<li>You may be asking: why can&#8217;t you just use <tt>pkg_add -r subversion</tt>?  The reason <a href="http://lists.freebsd.org/pipermail/freebsd-ports/2012-November/079592.html">is explained here by the port maintainer</a> (read slowly, it&#8217;s easy to miss).  As of this writing, the subversion package on the official FTP/package servers is old (October 13th) and pulls in an absurd number of dependencies when it shouldn&#8217;t.  So we can&#8217;t use the package, thus we must build it from source ourselves.  If/when this gets addressed by the maintainer and/or the package build cluster admins, yes, this procedure will become significantly simpler</li>
<li>Lines 5-6 build and install the subversion port itself, along with all of its dependencies.  <strong>Please do not change any of the subversion options!</strong>  The defaults as of this writing are as minimal as possible</li>
<li><strong>At this point we have a working subversion (<tt>svn</tt>) binary that we can use</strong></li>
<li>Line 7 changes the cwd to <tt>/</tt>, since we&#8217;ll soon be nuking /usr/ports (yes you read that correctly)</li>
<li>Line 8 deletes the portsnap database/tarball.  This is the one of many reasons I cannot stand portsnap; it quite literally keeps an entire copy (tarball) of the <tt>/usr/ports</tt> tree laying around, by design.  I wonder how many people with small <tt>/var</tt> partitions have gotten bit by this.  portsnap also pulls down INDEX-x files for releases which aren&#8217;t relevant to your version of FreeBSD (i.e. it will pull down INDEX-7 on a 9.x system).  portsnap&#8217;s ports tarball also lacks <tt>.svn/</tt> directories (starting to get the picture?).  All depressingly moronic</li>
<li>Lines 9-10 delete <tt>/usr/ports</tt> and recreate the directory</li>
<li>Line 11 checks out a copy of <tt>/usr/ports</tt> from the official FreeBSD SVN servers</li>
<li>Lines 12-14 are the same as 9-11 but for <tt>/usr/src</tt> and src</li>
<li><strong>Please use svn:// and not http:// or https:// URI schemes &#8212; see below for why!</strong></li>
<li>Line 15 fixes (what I consider to be) a security concern I have over <tt>/root/.subversion</tt> being globally readable.  Not that I change anything in <tt>/root/.suvbersion/{config,servers}</tt> but some people might.  This is the result of root&#8217;s default umask (0022), but I&#8217;m surprised svn doesn&#8217;t issue a <tt>chmod 0700</tt> on the directory itself creates</li>
<li>Line 16 should be self-explanatory</li>
</ul>
<p>It&#8217;s like I said &#8212; a simple procedure which is greatly complicated by many nuances that aren&#8217;t documented anywhere or explained by most.</p>
<p>For upgrading a system which already has a copy of <tt>/usr/ports</tt>, run what&#8217;s shown on line 2, then continue onwards starting at line 5.  You can skip line 8 too, assuming portsnap has never been used prior.</p>
<p>Some other related topics or answers to questions I&#8217;ve seen asked (or asked myself!):</p>
<ul>
<li>To update your ports tree, you can do any of the following commands &#8212; they are all effectively the same:
<pre class="brush: plain; auto-links: false; title: ; toolbar: false; notranslate">
cd /usr/ports &amp;&amp; make update
cd /usr/ports &amp;&amp; svn update
cd /usr/ports &amp;&amp; svn checkout
svn update svn://svn.freebsd.org/ports/head /usr/ports
svn checkout svn://svn.freebsd.org/ports/head /usr/ports
</pre>
</li>
<li>To update your src tree, you can do any of the following commands &#8212; they are all effectively the same (note that &#8220;make update&#8221; can no longer be used):
<pre class="brush: plain; auto-links: false; title: ; toolbar: false; notranslate">
cd /usr/src &amp;&amp; svn update
cd /usr/src &amp;&amp; svn checkout
svn update svn://svn.freebsd.org/base/stable/9 /usr/src
svn checkout svn://svn.freebsd.org/base/stable/9 /usr/src
</pre>
</li>
<li>For the ports INDEX-x file itself, just use the not-so-well-documented &#8220;fetchindex&#8221; target.  However, since the security breach, the generation of this file on the official FreeBSD servers has broken many times (3 or 4 so far).  This has been <a href="http://lists.freebsd.org/pipermail/freebsd-ports/2012-December/079976.html">complained about repeatedly</a> by users; in that case, the only choice is to generate it yourself, which takes a very long time and often emits lovely warnings.  Anyway, using fetchindex is simple:</li>
<pre class="brush: plain; auto-links: false; title: ; toolbar: false; notranslate">
cd /usr/ports &amp;&amp; make fetchindex
</pre>
</li>
<li>I do not recommend changing the URI scheme from svn:// to http:// or <a href="https://" rel="nofollow">https://</a>.  There have been <a href="http://lists.freebsd.org/pipermail/freebsd-ports/2012-September/078371.html">repeated complaints</a> of issues/problems with the HTTP and HTTP/SSL services hosted at svn.freebsd.org, by both users and committers (so many that I do not care to reference them all).  Use native svn:// and be done with it; don&#8217;t cause yourself headaches using the other schemes.  If you absolutely must switch the URI scheme and can deal with the annoyance, <a href="http://stackoverflow.com/a/925705">follow this procedure</a>.</li>
<li>svn will never be added to the base system due to its <a href="http://lists.freebsd.org/pipermail/freebsd-ports/2012-November/079589.html">large number of dependencies</a>.  There may also be licensing concerns with regards to some of those dependencies.  I am one of the few people who wants to see the &#8220;base system&#8221; concept done away with entirely (everything should just be a package/port/whatever and managed that way), but the push-back I&#8217;ve received over the years has been from developers insisting that the base system must be kept to cater to commercial vendors that use FreeBSD (such as Juniper, NetApp, Citrix, etc.).  The disconnect here is hilarious, and I doubt it will ever be fully addressed.</li>
<li>cvs will eventually be removed from the base system.  I myself use cvs for <a href="http://bsdhwmon.koitsu.org/">my own projects</a>; I imagine this won&#8217;t impact most people, but it does impact me.  I&#8217;ll be forced to install <tt>devel/cvs</tt> from ports.</li>
<li>pkgng &#8212; if anyone mentions it to you &#8212; has absolutely no bearing/relevancy to the subject matter being discussed in this blog post.  If someone tells you to install pkgng or switch to it to solve any of this, they are horribly confused and wrong.  And besides, <a href="http://lists.freebsd.org/pipermail/freebsd-ports/2012-December/079897.html">this right here</a> is a good reason to avoid pkgng.  Be sure to read the entire thread; also as of this writing there have been no follow-ups to it.  Remarkable.</li>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/2442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/2442/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2442&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2013/01/02/freebsd-csupcvsup-portsnap-and-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Instructions for building TomatoUSB Toastman RT-N firmwares</title>
		<link>https://koitsu.wordpress.com/2012/12/21/instructions-for-building-tomatousb-toastman-rt-n-firmwares/</link>
		<comments>https://koitsu.wordpress.com/2012/12/21/instructions-for-building-tomatousb-toastman-rt-n-firmwares/#comments</comments>
		<pubDate>Sat, 22 Dec 2012 03:45:45 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=2340</guid>
		<description><![CDATA[Back in September/October I had the &#8220;pleasure&#8221; of dealing with trying to build TomatoUSB (specifically Toastman&#8217;s RT-N releases) on a Linux system I have (thank god for VMware Workstation!). I was given all sorts of reference materials from folks on &#8230; <a href="https://koitsu.wordpress.com/2012/12/21/instructions-for-building-tomatousb-toastman-rt-n-firmwares/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2340&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Back in September/October I had the &#8220;pleasure&#8221; of dealing with trying to build TomatoUSB (specifically Toastman&#8217;s RT-N releases) on a Linux system I have (thank god for VMware Workstation!).  I was given all sorts of reference materials from folks on the linksysinfo.org forum, except I kept running into all sorts of problems.  I tried other Linux distributions, other releases of the same distribution, etc. and the failures all seemed to differ.</p>
<p>I figured it would be worthwhile to document exactly how I got the firmware to build and what the necessary steps are as of the date of this blog post.</p>
<p><span id="more-2340"></span></p>
<p>Prerequisites:</p>
<ol>
<li>Linux system running a <strong>32-bit (i386/x86)</strong> kernel.  I was not able to get 64-bit (amd64/x64) working (details in a moment).  Distributions I can confirm work are Ubuntu 11.04, Ubuntu 11.10, Debian 6.0.6, and Debian 6.0.7.
<ul>
<li>Reason: the toolchain binaries stored in the official git repository were built on a Linux 2.6.8 32-bit system</li>
<li>The failure message you&#8217;ll receive if using a 64-bit system is something like <tt>mipsel-linux-uclibc-gcc: No such file or directory</tt>.  The message is misleading to anyone not highly technical and familiar with multiple architectures; I imagine most users would have great difficult figuring this one out.  This is not a library-related problem; this is the kernel or ELF loader not having support for 32-bit binaries (I did not care to figure out which)</li>
<li>The proper way to solve this is to rebuild the toolchain from source, except I cannot find any documentation stating how to do that correctly</li>
</ul>
</li>
<li>Around 20GBytes of disk space (really!), which should suffice for the Linux/base install and all of TomatoUSB</li>
<li>Root-level access.  This is needed because symlinks need to made within the <tt>/opt</tt> directory</li>
<li><tt>sudo</tt> must be installed in advance (the build system uses it)</li>
</ol>
<p>Step-by-step instructions are below.  <strong>Please note that these must be done as a user, and not as root!  Building the firmware as root is not supported!</strong></p>
<pre class="brush: plain; auto-links: false; title: ; notranslate">
sudo apt-get install libncurses5 libncurses5-dev m4 bison flex libstdc++6-4.4-dev
sudo apt-get install g++-4.4 g++ libtool sqlite gcc g++ binutils patch bzip2 flex
sudo apt-get install bison make gettext unzip zlib1g-dev libc6 gperf sudo
sudo apt-get install automake automake1.7 automake1.9 git-core

cd ~
git clone git://repo.or.cz/tomato.git
cp -pR tomato tomato.orig

sudo mkdir -m 0755 -p /opt
sudo ln -s ~/tomato/tools/brcm /opt/brcm

cd tomato
git checkout Toastman-RT-N

export PATH=&quot;$PATH:/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin&quot;

cd release/src-rt

make V1={versionstring1 V2={versionstring2} {buildtype}
</pre>
<p>Please note during the build you will see quite a large number of Makefile errors which are ignored (e.g. &#8220;Error 1 (ignored)&#8221;), and an even larger number of warnings during compiling.  It absolutely blows my mind that something as critical as an embedded firmware is maintained in such a sloppy manner; I am one of those coders who uses -Wall -Werror and for a damn good reason.</p>
<p>If the compile completes successfully, you&#8217;ll end up with a firmware in the <tt>release/src-rt/image</tt> directory.</p>
<p>Now for some explanation of what the <tt>{versionstringX}</tt> and <tt>{buildtype}</tT> placeholders are:</p>
<p>The two <tt>{versionstringX}</tt> placeholders can be anything you want; they're used to create the actual firmware filename.  For example, to make an "official-looking" Toastman firmware file called:</p>
<p><tt>tomato-K26USB-1.28.0500.5MIPSR2Toastman-RT-N-Ext.trx</tt></p>
<p>...you would do:</p>
<p><tt>make V1=0500.5 V2=Toastman-RT-N r2m</tt></p>
<p><tt>{buildtype}</tt> is rather lengthy.  Rather than explain all the possibilities here, it's a lot easier to just direct you to run <tt>make help</tt> in the <tt>release/src-rt</tt> directory and read the results for yourself.  But just for posterity, here's the list as of this writing:</p>
<pre class="brush: plain; auto-links: false; title: ; notranslate">
a            A build (standard)
b            B build (standard minus SSH)
c            C build (standard minus CIFS)
d            D build (standard minus Samba server)
m            M build (standard plus extra utilities and NTFS support)
nc           NC build (standard plus VPN, extra utilities, NTFS support and NOCAT)
ncm          NCS build (no USB support, NOCAT)
ncs          NCS build (std + NOCAT)
m            Ext - (standard plus extra utilities and NTFS support)
e            E build (standard plus VPN, extra utilities and NTFS support)
i            I build (IPv6 with no USB support minus CIFS and RIPv1/2)
s            S build (no USB support)
f            F build (no USB support minus CIFS and RIPv1/2)
fs           FS build (no USB support minus CIFS, JFFS, Zebra and RIPv1/2)
v            V build (VPN with no USB support)
vs           VS build (Small VPN with no USB support)
r2a          MIPS Release 2 A build (standard)
r2b          MIPS Release 2 B build (standard minus SSH)
r2c          MIPS Release 2 C build (standard minus CIFS)
r2d          MIPS Release 2 D build (standard minus Samba server)
r2e          MIPS Release 2 E build (standard plus VPN and extras)
r2f          MIPS Release 2 F build (no USB support minus CIFS, RIPv1/2)
r2fs         MIPS Release 2 FS build (no USB support minus JFFS, CIFS, RIPv1/2, Zebra)
r2i          MIPS Release 2 I build (IPv6 with no USB support minus CIFS and RIPv1/2)
r2m          MIPS Release 2 M build (standard plus extras)
r2nc         MIPS Release 2 NC build (standard plus VPN, extras and NOCAT)
r2ncm        MIPS Release 2 NCM build (no USB support, plus NOCAT)
r2ncs        MIPS Release 2 NCS build (standard plus NOCAT)
r2s          MIPS Release 2 S build (no USB support)
r2t          MIPS Release 2 T build (no USB support with extras)
r2u          MIPS Release 2 U build (no USB support plus VPN with extras)
r2v          MIPS Release 2 V build (VPN with no USB support)
r2vs         MIPS Release 2 VS build (Small VPN with no USB support)
       Linksys E-Series with 60k Nvram
n60m         Linksys E-series build (60KB NVRAM, standard plus extras)
n60e         Linksys E-series build (60KB NVRAM, standard plus VPN and extras)
n60nc        Linksys E-series build (60KB NVRAM, standard plus extras, plus VPN, plus NOCAT)
n60s         Linksys E-series build (60KB NVRAM, no USB support)
n60v         Linksys E-series build (60KB NVRAM, VPN with no USB support)
       Linksys E-Series with 64k Nvram/8MB Flash(E900/E1200v2/E1500)
n64m         Linksys E-series build (64KB NVRAM, standard plus extras)
n64e         Linksys E-series build (64KB NVRAM, standard plus VPN and extras)
n64nc        Linksys E-series build (64KB NVRAM, standard plus extras, plus VPN, plus NOCAT)
n64s         Linksys E-series build (64KB NVRAM, no USB support)
n64v         Linksys E-series build (64KB NVRAM, VPN with no USB support)
       Linksys E-Series with 4MB Flash(E1000v2/v2.1/E1200v1)
e1000v2i     Linksys E1000v2-v2.1/Cisco M10v2 MiniIPv6
e1000v2f     Linksys E1000v2-v2.1/Cisco M10v2 Mini
e1200v1i     Linksys E1200v1 MiniIPv6
e1200v1f     Linksys E1200v1 Mini
       Netgear WNR3500L v2 builds (128MB Flash)
v2e          Netgear WNR3500Lv2 build
</pre>
<p>If you wish to adjust Linux 2.6 kernel features, you will need to edit <tt>release/src-rt/linux/linux-2.6/config_base b/release/src-rt/linux/linux-2.6/config_base</tt> manually.  <strong>Do not use <tt>make menuconfig</tt>!</strong>  There are known adjustments applied manually during the build stage that may break if you do that.</p>
<p>If you want to add/remove features from netfilter (related to iptables), you will need to edit <tt>release/src/router/iptables/extensions/Makefile</tt> manually.</p>
<p><a href="http://www.linksysinfo.org/index.php?threads/why-doesnt-tomatos-access-restriction-block-https-websites.45988/#post-197539">Here's an example</a> where both of these files needed to be edited to add support for the IPv4-only xt_string.ko module (<tt>iptables -m string</tt> support).</p>
<p>I hope this helps folks in some way/shape/form, as I found the entire process to be quite badly documented in general.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/2340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/2340/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2340&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/12/21/instructions-for-building-tomatousb-toastman-rt-n-firmwares/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Recent FreeBSD.org &#8220;cluster server&#8221; security breach</title>
		<link>https://koitsu.wordpress.com/2012/11/17/recent-freebsd-org-cluster-server-security-breach/</link>
		<comments>https://koitsu.wordpress.com/2012/11/17/recent-freebsd-org-cluster-server-security-breach/#comments</comments>
		<pubDate>Sat, 17 Nov 2012 17:39:23 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=2383</guid>
		<description><![CDATA[For the past 4-5 days, users of FreeBSD have been unable to get any updates from servers worldwide. Specifically, this affected the following services: csup and cvsup (for src, ports, doc, etc.) portsnap (for ports only) freebsd-update (for binary updates/security &#8230; <a href="https://koitsu.wordpress.com/2012/11/17/recent-freebsd-org-cluster-server-security-breach/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2383&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For the past 4-5 days, users of FreeBSD have been unable to get any updates from servers worldwide.  Specifically, this affected the following services:</p>
<ul>
<li><a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html">csup and cvsup</a> (for src, ports, doc, etc.)</li>
<li><a href="http://www.daemonology.net/portsnap/">portsnap</a> (for ports only)</li>
<li><a href="http://www5.us.freebsd.org/doc/handbook/updating-upgrading-freebsdupdate.html">freebsd-update</a> (for binary updates/security updates, if not using csup/cvsup)</li>
<li><a href="http://webcache.googleusercontent.com/search?q=cache:MRf4v58efZkJ:www.freebsd.org/handbook/anoncvs.html+&amp;cd=1&amp;hl=en&amp;ct=clnk&amp;gl=us&amp;client=firefox-a">Native CVS</a> (note: intentionally using cached copy from Google)</li>
<li>GNATS (official FreeBSD problem reporting/bug tracking system)</li>
</ul>
<p>All that was being stated publicly by FreeBSD Project members was that there was &#8220;an issue&#8221;, and then later this turned into &#8220;maintenance&#8221;:</p>
<ul>
<li><a href="http://lists.freebsd.org/pipermail/freebsd-hubs/2012-November/002590.html">freebsd-hubs/2012-November/002590.html</a></li>
<li><a href="http://lists.freebsd.org/pipermail/freebsd-stable/2012-November/070581.html">freebsd-stable/2012-November/070581.html</a></li>
<li><a href="http://lists.freebsd.org/pipermail/freebsd-stable/2012-November/070596.html">freebsd-stable/2012-November/070596.html</a></li>
<li><a href="http://lists.freebsd.org/pipermail/freebsd-ports/2012-November/079501.html">freebsd-ports/2012-November/079501.html</a></li>
<li><a href="http://lists.freebsd.org/pipermail/freebsd-ports/2012-November/079523.html">freebsd-ports/2012-November/079523.html</a></li>
<li><a href="http://lists.freebsd.org/pipermail/freebsd-ports/2012-November/079545.html">freebsd-ports/2012-November/079545.html</a></li>
<li><a href="http://lists.freebsd.org/pipermail/freebsd-ports/2012-November/079571.html">freebsd-ports/2012-November/079571.html</a></li>
</ul>
<p><a href="http://lists.freebsd.org/pipermail/freebsd-ports/2012-November/079559.html">Some others</a> also began to wonder about how the outage was being handled, since nobody had updated the freebsd.org home page (until the aforementioned), updated the official RSS feed, posted anything on Twitter, or (most important of all) sent anything to the official freebsd-announce mailing list.</p>
<p>At the 4-day mark, I began wondering what kind of &#8220;maintenance&#8221; was unannounced and not done without some degree of prep-work.  And it turns out my system administrator gut feeling was right &#8212; today the root cause was actually disclosed:</p>
<ul>
<li><a href="http://www.freebsd.org/news/2012-compromise.html">http://www.freebsd.org/news/2012-compromise.html</a></li>
</ul>
<p><span id="more-2383"></span></p>
<p>The omission of detail (particularly of the technical nature) in this report is astounding, resulting in almost more questions than answers.  But worse, the report appears to be written in such a way to make it into a scapegoat for pushing portsnap and <a href="http://www.freshports.org/devel/subversion/">svn</a> (instead of csup/cvsup), which makes absolutely no sense on multiple levels.  Some actual FreeBSD Project members <a href="http://lists.freebsd.org/pipermail/freebsd-security/2012-November/006863.html">have questioned this as well</a> and I applaud them for doing so.</p>
<p>First and foremost, the report seems to indicate the compromise provided the intruder a way to modify or replace packages on the master package server.  If that were the case, the attacker then would have been able to modify relevant checksums/hashes of packages.  portsnap just acts as a &#8220;ports tree snapshot&#8221; utility, it doesn&#8217;t download or verify each individual ports&#8217; updates and do checksum validation (at least from the client-to-server perspective) &#8212; and even if it did, again, if the attacker had access to modify files used by the portsnap master to generate its update snapshot&#8230;  You can see where I&#8217;m going with this.</p>
<p>Secondly, we do not know if this individual had root-level access or not, just that they could have potentially modified packages.  So <a href="http://lists.freebsd.org/pipermail/freebsd-security/2012-November/006865.html">people citing concerns </a>of csup/cvsup being <a href="http://unix.derkeiler.com/Mailing-Lists/FreeBSD/stable/2003-11/0287.html">susceptible to MITM</a> has <strong>absolute zero relevancy</strong> to what actually transpired in this compromise.  Unless the intruder had the ability to stop + start the portsnap mirroring daemon (or whatever it uses &#8212; there aren&#8217;t details) on the portsnap master server itself, or a way to stick a MITM daemon in the middle by siphoning packets to/from another daemon on the machine (or the 2nd machine mentioned in the report), then MITM has no bearing on this situation thus the concern cited is pure FUD with regards to this compromise.  We FreeBSD users have an awful tendency to try and divert attention/focus to something else (<a href="http://lists.freebsd.org/pipermail/freebsd-questions/2012-November/246457.html">perfect example</a>) instead of zeroing in on the problem at hand; &#8220;how do I solve X&#8221; is never answered with &#8220;you do Y&#8221;, instead it&#8217;s &#8220;why are you trying to solve X&#8221; or &#8220;there&#8217;s nothing to solve&#8221; or &#8220;let me give you a one-liner that practically demeans you personally&#8221;.</p>
<p>Thirdly, I still cease to see how users using svn (instead of csup/cvsup or cvs natively) would have rectified this situation directly or indirectly.  This is a bit long/heavy, but detail and history are needed to understand my as-usual KISS principle stance:</p>
<p>The problem with svn is that it isn&#8217;t in the base system.  csup is in the base system, which means right out of the box FreeBSD users can immediately begin getting updates to whatever src branch they follow, and/or ports.  Users have repeatedly asked what the replacement for csup/cvsup is, and all they&#8217;re told is &#8220;portsnap and svn&#8221;, with no further information given.</p>
<p>Now, anyone who knows me knows I&#8217;m generally against the &#8220;base system&#8221; concept &#8212; that is to say, included software should all be packages or equivalent (i.e. no more &#8220;OpenSSL ports&#8221; vs. &#8220;OpenSSL base&#8221;, &#8220;gcc ports&#8221; vs. &#8220;gcc base&#8221;, etc.).  But as long as the &#8220;base system&#8221; concept is kept, then it needs to be respected and treated as important.  And in fact, the security breach report in question even alludes to its importance.  Quote:</p>
<blockquote><p>&#8220;No part of the base FreeBSD system has been put at risk. At no point has the intruder modified any part of the FreeBSD base system software in any way.&#8221;</p></blockquote>
<p>The problem with svn is that it pulls in a crapload of runtime dependencies.  The biggest and most notorious is SQLite &#8212; which I have no problem with as software, but I&#8217;m focused on the dependency count here.  However, APR is also required (certainly because Subversion is an Apache project, sigh), as is gettext (NLS/character set support), expat (XML support (why?)), and neon29 (needed for HTTPS support &#8212; OPTIONS doesn&#8217;t say this but believe me it is):</p>
<pre class="brush: plain; auto-links: false; title: ; toolbar: false; notranslate">
root@icarus:/usr/ports/devel/subversion # make run-depends-list
/usr/ports/databases/sqlite3
/usr/ports/devel/apr1
/usr/ports/devel/gettext
/usr/ports/textproc/expat2
/usr/ports/www/neon29
</pre>
<p>All of these things would need to be pulled into FreeBSD for svn to make it into the base system.  And I&#8217;m certain, especially in the case of gettext, there would be licensing concerns.</p>
<p>But maybe a history lesson is needed here&#8230;</p>
<p>Older FreeBSD users may remember the days of cvsup, where that also wasn&#8217;t included with the base system (because of its dependency on the Modula-3 language).  All of us got used to doing <strong>pkg_add -r cvsup-without-gui</strong> after our OS installation and considered the matter closed, although it pulled in ezm3 (and that was its only dependency).  I was one of the few who was annoyed by this dependency, and the author used to repeatedly state that Modula-3 was absolutely needed for some of the design choices of cvsup.  It greatly amused me when years later csup was created, which was cvsup written completely in C &#8212; as you can see, Modula-3 isn&#8217;t needed at all, so this was just another example of a software author making his belief system everyone else&#8217;s problem, rather than being pragmatic.</p>
<p>Here we are again, with history repeating itself, just in a different way.  So why don&#8217;t I just <strong>pkg_add -r subversion</strong> and be done with it?  Mainly because it pulls in 5 dependencies, which means 5 things I have to deal with/maintain when it comes to software upgrades and so on.  I can accept gettext (since it&#8217;s used by lots of other software anyway), but the others I really don&#8217;t want to deal with.</p>
<p>Okay, so what choices do we have?  Well, the svn port can be built with the STATIC option, which results in a statically-linked build.  That sounds good to me &#8212; except I don&#8217;t want to deal with building the software.  Why?  Because building it (vs. running it) pulls in even more dependencies:</p>
<pre class="brush: plain; auto-links: false; title: ; toolbar: false; notranslate">
root@icarus:/usr/ports/devel/subversion # make all-depends-list
/usr/ports/devel/libtool
/usr/ports/databases/sqlite3
/usr/ports/textproc/expat2
/usr/ports/www/neon29
/usr/ports/devel/apr1
/usr/ports/devel/gettext
/usr/ports/devel/pkgconf
/usr/ports/lang/perl5.12
/usr/ports/lang/python27
/usr/ports/devel/automake
/usr/ports/devel/autoconf
/usr/ports/converters/libiconv
/usr/ports/devel/automake-wrapper
/usr/ports/devel/m4
/usr/ports/misc/help2man
/usr/ports/devel/gmake
/usr/ports/devel/autoconf-wrapper
/usr/ports/devel/p5-Locale-gettext
</pre>
<p>And that brings me to my final point: so why can&#8217;t the FreeBSD package/build cluster build a static version of svn for people to <strong>pkg_add -r</strong>?  A wonderful question, and it&#8217;s one I&#8217;ve asked many times over.  Technically there is no reason this can&#8217;t be done.  Purely on a technical level, building that static package would be quite easy in the situation where any of the runtime dependencies needed to be updated.  The maintainer would then simply increment PORTREVISION in devel/subversion/Makefile to act as an indicator that the package/port should be rebuilt due to underlying dependencies changing (and this is how the ports system maintainers already operate).  So why can&#8217;t <strong>subversion-static</strong> and <strong>subversion16-static</strong> packages be made?  Nobody seems to know, only that &#8220;you can do it yourself&#8221; (and I won&#8217;t for the reasons listed above &#8212; plus this is what the package building cluster at FreeBSD.org is for).</p>
<p>This is why I continue to stick with csup, and I imagine many other FreeBSD users do (and will) as well.  When the cvsup mirrors go down sometime in 2013 (it&#8217;s estimated February), I will most likely moving over to Debian Linux.  No, Linux doesn&#8217;t magically solve all of this (and I will greatly miss the pf firewalling stack), and believe me Debian has its share of issues, but this kind of clown-car seat-of-the-pants operation needs to end &#8212; at least for me.  The irony, again for me, is that I moved from Linux to FreeBSD in 1997 solely because of clown-car syndrome.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/2383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/2383/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2383&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/11/17/recent-freebsd-org-cluster-server-security-breach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Borderlands 2 performance tweaking</title>
		<link>https://koitsu.wordpress.com/2012/09/29/borderlands-2-performance-tweaking/</link>
		<comments>https://koitsu.wordpress.com/2012/09/29/borderlands-2-performance-tweaking/#comments</comments>
		<pubDate>Sun, 30 Sep 2012 05:39:24 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=2302</guid>
		<description><![CDATA[I&#8217;ve had a couple people online ask me what all I&#8217;ve done to my Borderlands 2 .ini files to solve some annoyances and framerate-related issues within the game, as well as decrease the amount of pressure on the GPU. I &#8230; <a href="https://koitsu.wordpress.com/2012/09/29/borderlands-2-performance-tweaking/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2302&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve had a couple people online ask me what all I&#8217;ve done to my Borderlands 2 .ini files to solve some annoyances and framerate-related issues within the game, as well as <strong>decrease</strong> the amount of pressure on the GPU.  I thought I&#8217;d take the time to list off all the changes I use for my GTX 560 Ti + Core i7 2600K-based system running on Windows XP SP3, under 1920&#215;1200.</p>
<p><span id="more-2302"></span></p>
<p>Before I get started, I want to make a few things clear in advance:</p>
<ol>
<li>I don&#8217;t like games which cause my video card to kick its fans up into high speed due to high GPU or graphics MCH stress; I prefer to hear the sounds of the game without the white noise of CPU or GPU fans masking things.  Likewise, temperatures like 60C aren&#8217;t acceptable by me.</li>
<li>I prefer to play games with Vsync enabled, even with LCDs.  I can see screen tearing quite easily, even with things like nVidia&#8217;s adaptive Vsync in use.  Windows XP doesn&#8217;t make accomplishing proper Vsync in windowed mode very easy (for DirectX/Direct3D or GDI applications for that matter).  Using Vsync has an additional benefit with regards to the previously-mentioned item: it does in fact cap the maximum framerate.  Windows 7 is quite a different beast in this regard; I&#8217;m talking on XP.</li>
<li>At least on Windows XP, the game <strong>must</strong> be run in full-screen mode (not &#8220;windowed fullscreen&#8221; either) to get the smoothest performance with Vsync enabled.  This condition isn&#8217;t specific to Borderlands 2 either; the same advice applies to Diablo 3.</li>
<li>Borderlands 2 on my system tended to run around 30-40fps in &#8220;heavy&#8221; areas (such as the starting area &#8212; and don&#8217;t ask me what&#8217;s &#8220;heavy&#8221; about it).  With the below tweaks, I get 60fps pretty much all the time, barring some areas where there is obviously a lot of detail.  So overall the feel of the game is much, much better.</li>
<li>Unlike forums and &#8220;enthusiast sites&#8221;, I will happily explain what all of these settings do, rather than just tell you &#8220;hey u set theiz i g3t 10fpsss lol kbye&#8221;.</li>
</ol>
<p>That said, here are the settings I use (meaning all values that differ from the stock .ini defaults):</p>
<p><strong>WillowEngine.ini</strong> &#8211;</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
[Engine.Engine]
DefaultPostProcessName=WillowEngineMaterials.RyanScenePostProcess
MipFadeInSpeed0=0
MipFadeOutSpeed0=0
MipFadeInSpeed1=0
MipFadeOutSpeed1=0

[SystemSettings]
DynamicShadows=false
DepthOfField=false
AmbientOcculsion=false
Bloom=false
bAllowLightShafts=false
UseVsync=true
Fullscreen=true
WindowedFullscreen=false
MaxAnisotropy=0
FXAA=false
ResX=1920
ResY=1200
FoliageDrawRadiusMultiplier=0.500000
ViewDistance=2
FramerateLocking=6

[FullScreenMovie]
; StartupMovies=2K_logo
; StartupMovies=Gearbox_logo
; StartupMovies=NVidia
; StartupMovies=Loading
</pre>
<p><strong>WillowInput.ini</strong> &#8211;</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
[Engine.PlayerInput]
bEnableMouseSmoothing=false
</pre>
<p>Now let&#8217;s talk about each of the settings individually.  I&#8217;ll provide reference materials for each of them (if applicable); read and learn!</p>
<p><strong>WillowEngine.ini</strong> &#8211;</p>
<ul>
<li><tt>DefaultPostProcessName=WillowEngineMaterials.RyanScenePostProcess</tt> &#8212; disables &#8220;vignette&#8221; or pseudo-cel-shaded-with-black-borders look.  Some people like it &#8212; I don&#8217;t, and I didn&#8217;t like it in Borderlands 1 either  <a href="http://segmentnext.com/2012/09/26/borderlands-2-tweaks-guide-improve-graphics-and-performance/">(Reference)</a></li>
<li><tt>MipFade{In,Out}Speed{0,1}</tt> &#8212; when set to 0, effectively disables the &#8220;texture streaming&#8221; feature, meaning the game will &#8220;pop in&#8221; a texture when it loads (vs. show some half-ass blurry garbage in the meantime).  And yes, I am quite aware of the <tt>bUseTextureStreaming</tt> variable; go right ahead and set that to false and see what happens (hint: don&#8217;t do it)  <a href="http://www.geforce.com/optimize/guides/borderlands-2-tweak-guide/#12">(Reference)</a></li>
<li><tt>DynamicShadows</tt> &#8212; handles (to some degree) support for polygon-based shadows generated by moving objects.  Disabling this has a very big effect on performance, <a href="http://koitsu.wordpress.com/2009/11/28/borderlands-shadows-and-framerate-performance/">just like it did in Borderlands 1</a>  <a href="http://www.geforce.com/optimize/guides/borderlands-2-tweak-guide/#12">(Reference)</a></li>
<li><tt>DepthOfField</tt> &#8212; <a href="http://www.geforce.com/optimize/guides/borderlands-2-tweak-guide/#8">(Reference)</a></li>
<li><tt>AmbientOcculsion</tt> &#8212; <a href="http://www.geforce.com/optimize/guides/borderlands-2-tweak-guide/#7">(Reference)</a></li>
<li><tt>Bloom</tt> &#8212; I&#8217;ve never liked the way bloom looks and it often kills performance (especially when used with <a href="http://en.wikipedia.org/wiki/High_dynamic_range_rendering">HDR</a>)  <a href="http://en.wikipedia.org/wiki/Bloom_%28shader_effect%29">(Reference)</a></li>
<li><tt>bAllowLightShafts</tt> &#8212; <a href="http://www.geforce.com/optimize/guides/borderlands-2-tweak-guide/#12">(Reference)</a></li>
<li><tt>UseVsync</tt> &#8212; should be obvious</li>
<li><tt>Fullscreen</tt> &#8212; should be obvious</li>
<li><tt>WindowedFullscreen</tt> &#8212; should be obvious</li>
<li><tt>MaxAnisotropy</tt> &#8212; a value of 0 disables <a href="http://blogs.msdn.com/b/shawnhar/archive/2009/09/24/texture-filtering-anisotropy.aspx">anisotropy</a>  <a href="http://www.geforce.com/optimize/guides/borderlands-2-tweak-guide/#5">(Reference)</a></li>
<li><tt>FXAA</tt> &#8212; <a href="http://www.geforce.com/optimize/guides/borderlands-2-tweak-guide/#9">(Reference)</a></li>
<li><tt>Res{X,Y}</tt> &#8212; should be obvious</li>
<li><tt>FoliageDrawRadiusMultiplier</tt> &#8212; a value of 0.5=Near  <a href="http://www.geforce.com/optimize/guides/borderlands-2-tweak-guide/#6">(Reference)</a></li>
<li><tt>ViewDistance</tt> &#8212; a value of 2=High (compared to 3=Ultra High)</li>
<li><tt>FramerateLocking</tt> &#8212; a value of 6=Unlimited.  I set this to 6 because <tt>UseVsync</tt> effectively provides a cap on the framerate while ensuring no screen tearing</li>
<li><tt>StartupMovies</tt> &#8212; commented out because I absolutely abhor these things, even if they&#8217;re skippable.  Note that this is different than setting <tt>bForceNoMovies=true</tt> &#8212; that disables all in-game movies/cinematics rather than just the worthless startup videos</li>
</ul>
<p>Despite what you might read online, I <strong>do not</strong> recommend setting <tt>DynamicLights=false</tt> to gain performance.  The gain is negligible and the results in-game are crap (especially during the stage loading screens where you&#8217;ll see a rotating gun; now you&#8217;ll see a rotating set of pitch back polygons).  Keep <tt>DynamicLights=true</tt>!</p>
<p><strong>WillowInput.ini</strong> &#8211;</p>
<ul>
<li><tt>bEnableMouseSmoothing</tt> &#8212; just Google this one yourself.  For a lot of people, disabling this allows for a much more responsive mouse; I disable it by habit.  And if someone tells you to set <tt>OneFrameThreadLag=false</tt> because it also helps: <a href="http://forums.tripwireinteractive.com/showpost.php?s=7e3f58923bcd33f08d768b857fb6aef8&amp;p=965825&amp;postcount=2">don&#8217;t!</a></li>
</ul>
<p>Naturally you should adjust these to your own liking.</p>
<p>Finally, for those who play the game via Steam, disabling the horrible Borderlands 2 launcher is a snap: do a <strong>Properties</strong> on the game, choose the <strong>General</strong> tab, pick <strong>Set Launch Options&#8230;</strong>, and put the string <tt>-nolauncher</tt> in the provided field.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/2302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/2302/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2302&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/09/29/borderlands-2-performance-tweaking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Using FreeBSD graid (GEOM RAID)</title>
		<link>https://koitsu.wordpress.com/2012/09/18/using-freebsd-graid-geom-raid/</link>
		<comments>https://koitsu.wordpress.com/2012/09/18/using-freebsd-graid-geom-raid/#comments</comments>
		<pubDate>Tue, 18 Sep 2012 12:17:19 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=2274</guid>
		<description><![CDATA[Quite some time ago I moved my home system away from ZFS and over to gmirror (GEOM mirror). There were many reasons for this, all of which are outside of the scope of this post thus I will not go &#8230; <a href="https://koitsu.wordpress.com/2012/09/18/using-freebsd-graid-geom-raid/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2274&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Quite some time ago I moved my home system away from ZFS and over to <a href="http://www.freebsd.org/cgi/man.cgi?query=gmirror&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+9.0-RELEASE&amp;arch=default&amp;format=html">gmirror</a> (GEOM mirror).  There were many reasons for this, all of which are outside of the scope of this post thus I will not go into them.  Things were good with gmirror, until after rebuilding world somewhat recently I began seeing this message:</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
GEOM: ada1: the secondary GPT header is not in the last LBA.
GEOM: ada2: the secondary GPT header is not in the last LBA.
GEOM_MIRROR: Device mirror/gm0 launched (2/2).
</pre>
<p><span id="more-2274"></span></p>
<p>My initial reaction was: &#8220;um, no shit, and there&#8217;s no way to solve that, so why are you bitching?&#8221;</p>
<p>This problem is a well-known (but not as much as it should be) design mistake on the part of gmirror: the last physical LBA (sector) of the provider is used to store the metadata.  The issue with this is that <a href="http://en.wikipedia.org/wiki/GUID_Partition_Table">GPT</a> also uses the exact same design choice, so you end up with a conflict of whose data ends up in the last LBA of the drive: either gmirror&#8217;s metadata or the backup GPT header.  You can&#8217;t have both, and <a href="http://www.freebsd.org/doc/handbook/geom-mirror.html">the FreeBSD Handbook even says so</a>.  I will point out to readers that <a href="http://lists.freebsd.org/pipermail/freebsd-questions/2009-June/201580.html">even FreeBSD kernel developers have commented on this awful design choice</a> (and were subsequently <a href="http://lists.freebsd.org/pipermail/freebsd-questions/2009-June/201590.html">shot down</a>).  Be sure to note that the kernel developer discussion took place in July 2009 &#8212; over 3 years ago.</p>
<p>This becomes a serious problem with the introduction of 4K-sector disks and SSDs, where the only way to achieve proper partition alignment is to use GPT (compared to classic MBR).  If you think I&#8217;m kidding, poke around with <a href="http://www.freebsd.org/cgi/man.cgi?query=gpart&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+9.0-RELEASE&amp;arch=default&amp;format=html">gpart(8)</a> and it&#8217;s <tt>-a</tt> and <tt>-b</tt> flags using the MBR scheme sometime &#8212; good luck aligning a partition to a proper 1MByte boundary.</p>
<p>The &#8220;socially propagated&#8221; workaround for this cat-and-mouse problem is to <a href="http://www.ateamsystems.com/blog/Installing-FreeBSD-9-gmirror-GPT-partitions-raid-1">create partitions on each disk and mirror those</a>.  Meaning: instead of using gmirror to mirror ada1 and ada2, you would use gpart(8) to create GPT partitions on ada1 and ada2, respectively, then using gmirror to mirror ada1p1 and ada2p1.</p>
<p>However, what nobody bothers to mention is that there are major ramifications to this workaround.  The biggest problem, in my opinion, is when a disk fails.  No longer do you yank the old disk + put in a new one and watch the mirror get rebuilt.  Instead, upon insertion of the new disk, the administrator now has to manually fuddle with gpart(8) to re-create the partition table (and it must be 100% identical to that of the working disk) then &#8220;poke&#8221; gmirror to get it to re-read the partition table.  Only then will the array rebuild.  Sorry, this is just not acceptable &#8212; it almost smells of ensuring job security (&#8220;yes boss, when a disk fails I need to be there to do some magic&#8221;).  Completely unacceptable.</p>
<p>Given this problem, today I decided to take the plunge and play with <a href="http://www.freebsd.org/cgi/man.cgi?query=graid&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+9.0-RELEASE&amp;arch=default&amp;format=html">graid(8)</a>.  I mentioned wanting <a href="http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/063041.html">wanting to do so last year</a> but never got around to it until now; with ada1 and ada2 being 4KByte sector disks, I had a lot more reason to consider it.</p>
<p>First and foremost, I want to make something very clear: <strong>users considering graid should make sure they are running RELENG_9 from source dated 2012/05/25 UTC or newer</strong>.  There was a <a href="http://lists.freebsd.org/pipermail/freebsd-geom/2012-May/005249.html">bug in the graid code</a> where if a write failure happened (disk pulled, disk failure, etc.) the entire system could panic.  This was fixed in RELENG_9 source dated roughly 2012/05/24 UTC.  When 9.1-RELEASE comes out, this fix will obviously be in there too.</p>
<p>Enabling this capability was quite simple on my Supermicro X7SBA system (Intel ICH8R-based): I changed the PC BIOS from AHCI mode to RAID mode.  Once I did that, the AHCI option ROM loaded (RAID mode uses AHCI), followed immediately by the RAID option ROM being loaded.  Pressing Ctrl-I allowed me to define two disks as part of a RAID-1 array.  Stripe size was not selectable (option ROM appeared to pick 128KBytes (131072 bytes) on its own &#8212; more on stripe sizes later, as there is a very confusing set of terminology used that makes things very easy to mess up).  Great, seemed easy enough.</p>
<p>My kernel config included the GEOM_RAID option so I did not need to manually load geom_raid.ko myself.  I let the system boot and sure enough the RAID array was tasted and a new device called <tt>/dev/raid/r0</tt> was created automatically.</p>
<p>I should note that the GEOM_RAID layer also emit messages about something called <tt>Intel-cfe2a69f</tt>, which appears to be the internal reference name which graid relies on when referring to the array itself.  The hexadecimal digits which come after the &#8220;Intel-&#8221; string appear to be randomly generated every time an array is created.</p>
<p>However, there was one very disheartening flaw: upon the array being discovered, according to <tt>graid status</tt>, the array began rebuilding for no reason.  The array was labelled DEGRADED; disk ada1 was in perfect shape but ada2 was being rebuilt.  Huh?  This was a brand new array.</p>
<p>Rather than let 1TB of zeros get mirrored (there&#8217;s no point to that), I began fooling around with graid.  The first thing I did was attempt to get the rebuild to stop.  I did a <tt>graid list</tt> to look at what the Intel RAID BIOS had created on its own; this is where I found &#8220;Strip: 131072&#8243; &#8212; note <strong>Strip</strong> is not the same thing as <strong>Stripesize</strong>.</p>
<p>I decided to take aggressive action and completely destroy the array I had just created via the native Intel RAID BIOS: <tt>graid delete Intel-cfe2a69f</tt> did the trick.</p>
<p>Next, I opted to create the array from within FreeBSD rather than via the RAID BIOS.  These sorts of things need to work reliably from within the OS, so I figured I might as well test them out while I had the chance.  I issued the following command:</p>
<p><tt>graid label -s 131072 Intel data RAID1 ada1 ada2</tt></p>
<p>The reason I explicitly specified <tt>-s 131072</tt> is because graid defaults to a &#8220;strip&#8221; of 65536 (per the man page).  I wanted to ensure the value was the same as what the Intel RAID BIOS would have picked.</p>
<p>On the console, messages from GEOM_RAID showed up, and I had a brand new array available &#8212; and this time, no array rebuilding.  <tt>graid list</tt> showed everything identical, and <tt>graid status</tt> showed everything in an optimal state.  The internal reference name was different (this time &#8220;Intel-1512a6e3&#8243;) but so what.  Output:</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
# graid list
Geom name: Intel-1512a6e3
State: OPTIMAL
Metadata: Intel
Providers:
1. Name: raid/r0
   Mediasize: 1000204881920 (931G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   Subdisks: ada1 (ACTIVE), ada2 (ACTIVE)
   Dirty: Yes
   State: OPTIMAL
   Strip: 131072
   Components: 2
   Transformation: RAID1
   RAIDLevel: RAID1
   Label: data
Consumers:
1. Name: ada1
   Mediasize: 1000204886016 (931G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   ReadErrors: 0
   Subdisks: r0(data):0@0
   State: ACTIVE (ACTIVE)
2. Name: ada2
   Mediasize: 1000204886016 (931G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   ReadErrors: 0
   Subdisks: r0(data):1@0
   State: ACTIVE (ACTIVE)

# graid status
   Name   Status  Components
raid/r0  OPTIMAL  ada1 (ACTIVE (ACTIVE))
                  ada2 (ACTIVE (ACTIVE))
</pre>
<p>I then made a filesystem on <tt>/dev/raid/r0</tt> by doing <tt>newfs -U /dev/raid/r0</tt> and mounted it.  I also added a relevant line to /etc/fstab.</p>
<p>I did some basic sequential I/O tests (reads and writes), to make sure there weren&#8217;t any performance problems since the ada1 and ada2 disks were 4KByte sector drives.  Initial sequential write I/O was around 157MBytes/second, which is about right for these models of disks.  Fantastic.</p>
<p>I then rebooted the system (always good to make sure things come up cleanly).  Output from the kernel:</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
GEOM_RAID: Intel-1512a6e3: Array Intel-1512a6e3 created.
GEOM_RAID: Intel-1512a6e3: Disk ada1 state changed from NONE to ACTIVE.
GEOM_RAID: Intel-1512a6e3: Subdisk data:0-ada1 state changed from NONE to ACTIVE.
GEOM_RAID: Intel-1512a6e3: Disk ada2 state changed from NONE to ACTIVE.
GEOM_RAID: Intel-1512a6e3: Subdisk data:1-ada2 state changed from NONE to ACTIVE.
GEOM_RAID: Intel-1512a6e3: Array started.
GEOM_RAID: Intel-1512a6e3: Volume data state changed from STARTING to OPTIMAL.
GEOM_RAID: Intel-1512a6e3: Provider raid/r0 for volume data created.
</pre>
<p>Excellent.</p>
<p>I then began restoring data from my backup drive to the array.  This is when things started to concern me.</p>
<p>Stability-wise everything was fine.  Disk I/O performance was also fine (monitoring using <tt>gstat -I500ms</tt>).  What concerned me was how the system &#8220;felt&#8221; during heavy I/O.  During an <tt>rsync -avH /backups/mirror/ /array/</tt> I noticed that any disk I/O (reading or writing) from/to the <tt>/array</tt> filesystem was <strong>extremely</strong> slow.  Things would block (wait) for very long periods of time before moving forward.  Things like <tt>mutt -y</tt> (which loads 19 mbox mailboxes, totalling around 30MBytes of disk total) took 8-9 full seconds.  This behaviour is easily reproducible.  But when the rsync wasn&#8217;t running things were speedy.</p>
<p>So basically interactivity/usability during heavy I/O seems worse than with gmirror, but the overall disk I/O speeds are identical.  I&#8217;m not sure if this is the result of using BIOS-level RAID or not, nor do I have any good way to determine &#8220;where&#8221; the slowdown is happening within the kernel.  I imagine there will be some which will claim this is due to the lack of disk I/O scheduler in FreeBSD (and don&#8217;t mention gsched &#8212; that thing causes more problems than solutions, for example how it causes sysinstall to segfault due to what it does to kern.geom.conftxt).  I do not believe lack of disk I/O scheduler is the cause; I believe there is a different explanation.</p>
<p>I have not tested things like yanking disks while I/O is occurring and things of that nature.</p>
<p>Anyway, that&#8217;s my experience with graid as of this writing.  Big thanks to Alexander Motin , Warner Losh , and the iXSystems folks for graid, as it&#8217;s something FreeBSD has needed for a very, very long time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/2274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/2274/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2274&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/09/18/using-freebsd-graid-geom-raid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Hard disk drive heights and polypropylene storage containers</title>
		<link>https://koitsu.wordpress.com/2012/09/11/hard-disk-drive-heights-and-polypropylene-storage-containers/</link>
		<comments>https://koitsu.wordpress.com/2012/09/11/hard-disk-drive-heights-and-polypropylene-storage-containers/#comments</comments>
		<pubDate>Wed, 12 Sep 2012 03:07:44 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=2243</guid>
		<description><![CDATA[Given how many hard disks I tend to have, I recently decided to purchase some anti-static polypropylene foam containers to store my drives. Common retail outlets (Amazon and others) were selling these containers (which would hold between 10 and 24 &#8230; <a href="https://koitsu.wordpress.com/2012/09/11/hard-disk-drive-heights-and-polypropylene-storage-containers/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2243&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Given <a href="http://jdc.koitsu.org/disks/">how many hard disks I tend to have</a>, I recently decided to purchase some anti-static polypropylene foam containers to store my drives.</p>
<p>Common retail outlets (Amazon and others) were selling these containers (which would hold between 10 and 24 disks) but for crazy prices: <a href="http://www.amazon.com/Image-Mechanics-1001-Pro-Storage/dp/B004PKUTT8">US$100</a>, <a href="http://www.amazon.com/Image-Mechanics-1002-Pro-Storage/dp/B004QDTRGA">US$130</a>, and <a href="http://www.amazon.com/Drive-Carrying-Hard-shelled-Waterproof-Transporting/dp/B001BBP20U">US$150</a>.  And some <a href="http://www.casesbypelican.com/hdrives.htm">other retail vendors</a> want US$425.</p>
<p>  The price was simply too steep; I wasn&#8217;t needing something brand new, used would be fine.  So I turned to the one place where stuff like this tends to end up being sold for reasonable prices: eBay.</p>
<p><span id="more-2243"></span></p>
<p>Before continuing I want to make something crystal clear: <strong>I am not shunning the eBay seller in any way.  The seller was communicative, fair, and permitted me to return the products for a full refund.</strong>  So please do not avoid purchasing things from this seller just because of my story &#8212; instead, you should be aware of what it is you&#8217;re actually getting (though I do wish the seller would update the product description to reflect reality).</p>
<p>Almost immediately I found <a href="http://www.ebay.com/itm/Bulk-Hard-Drive-Shipping-Container-Anti-Staitc-Foam-Packaging-Fits-25-3-5-HDD-/280887057067">exactly what I was looking for</a>.  Advertised as holding up to 25 3.5&#8243; hard disks (quoting the product description: &#8220;They fit all 3.5&#8243; hard drives&#8221;), they were perfect.  Or so I thought&#8230;</p>
<p>I purchased 3 (only needed 2 but figured a spare might be useful). Shipping took about a week.  I was thrilled once they arrived, but irritation ensued once I tried fitting drives in each slot: the majority of my drives wouldn&#8217;t fit properly.</p>
<p>It quickly became apparent to me what the issue was, and it was something that anyone unfamiliar with hard disk drives could have overlooked.</p>
<p>When it comes to 3.5&#8243; hard disks, there are two flavours:</p>
<ol>
<li>Those which are 26mm (~1.072 inches) in height &#8212; these tend to be the majority (~90% of the time).  An example would be the <a href="http://www.hdsentinel.com/storageinfo_details.php?lang=en&amp;model=WDC%20WD3201ABYS">Western Digital WD3201ABYS</a>,</li>
<li>Those which are 20mm (~0.790 inches) in height &#8212; these are all single-platter and are intended to be used in thin/slim desktops, SFF PCs with limited height clearance, or certain models of 1U servers.  An example would be the <a href="http://www.hdsentinel.com/storageinfo_details.php?lang=en&amp;model=MAXTOR%20STM3160815A">Maxtor STM3160815A</a>.</li>
</ol>
<p>Here&#8217;s a side-by-side photo of the above two drives so you can see the height differences:</p>
<ul>
<li><a href="http://koitsu.files.wordpress.com/2012/09/drive_comparison.jpg">http://koitsu.files.wordpress.com/2012/09/drive_comparison.jpg</a></li>
</ul>
<p>Hard disk drives are always enclosed in anti-static bags for multitudes of reasons (static discharge possibly damaging the PCB, keeping dust off the interface connectors and PCB, and so on).  Such bags tend to add between 1-2mm to a drive&#8217;s width and height.  So effectively what you end up with is either 28mm or 22mm heights, respectively.</p>
<p>All 3 containers I received had slots which measured between 21mm (bottom of slot) and 23mm (top of slot) for drive height:</p>
<ul>
<li><a href="http://koitsu.files.wordpress.com/2012/09/slot_bottom.jpg">http://koitsu.files.wordpress.com/2012/09/slot_bottom.jpg</a></li>
<li><a href="http://koitsu.files.wordpress.com/2012/09/slot_top.jpg">http://koitsu.files.wordpress.com/2012/09/slot_top.jpg</a></li>
</ul>
<p>Insertion of a 26mm height drive required excessive force and would not fit all the way to the bottom of the slot &#8212; but worse, the foam dividers between slots would bend/warp, defeating the use of the slot next to it:</p>
<ul>
<li><a href="http://koitsu.files.wordpress.com/2012/09/drive_26mm_01.jpg">http://koitsu.files.wordpress.com/2012/09/drive_26mm_01.jpg</a></li>
</ul>
<p>&#8230;while a 20mm height drive fit just fine (and with anti-static bag, fit snugly):</p>
<ul>
<li><a href="http://koitsu.files.wordpress.com/2012/09/drive_20mm_01.jpg">http://koitsu.files.wordpress.com/2012/09/drive_20mm_01.jpg</a></li>
<li><a href="http://koitsu.files.wordpress.com/2012/09/drive_20mm_02.jpg">http://koitsu.files.wordpress.com/2012/09/drive_20mm_02.jpg</a></li>
</ul>
<p>Based on what I can tell, these containers were originally used for storing and shipping 20mm height drives and were not designed for storing more commonly-found 26mm height drives.</p>
<p>Could I simply shove 26mm drives in and not care?  Yes, but due to the bowing of the foam dividers this would effectively cut the total drive capacity in half (from 25 to 13).  And the dividers would almost certainly (eventually) break/snap after being left stressed for long periods of time.  Instead, a better choice would be to use the right tool for the job.  :-)</p>
<p>Bottom line: vendors really need to go the extra mile and provide proper measurements when selling products for used with diverse products.  It&#8217;s easy to overlook the fact that 6mm makes a world of difference.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/2243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/2243/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2243&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/09/11/hard-disk-drive-heights-and-polypropylene-storage-containers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Examining the WD10EFRX</title>
		<link>https://koitsu.wordpress.com/2012/08/15/examining-the-wd10efrx/</link>
		<comments>https://koitsu.wordpress.com/2012/08/15/examining-the-wd10efrx/#comments</comments>
		<pubDate>Thu, 16 Aug 2012 04:45:46 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=2212</guid>
		<description><![CDATA[Today I received a WD10EFRX, otherwise known as the 1TB model of Western Digital&#8217;s new Caviar Red drives&#8230; The colour red, for me, is associated with two things: stop/halt signs and blood &#8212; two things which should definitely not be &#8230; <a href="https://koitsu.wordpress.com/2012/08/15/examining-the-wd10efrx/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2212&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Today I received a WD10EFRX, otherwise known as the 1TB model of Western Digital&#8217;s new <a href="http://www.wdc.com/en/products/products.aspx?id=810">Caviar Red</a> drives&#8230;</p>
<p>The colour red, for me, is associated with two things: stop/halt signs and blood &#8212; two things which should definitely not be associated with a mechanical hard disk.  :-)  I say that in jest, but still&#8230;</p>
<p>The new Red drives boast &#8220;full NAS compatibility&#8221; or &#8220;NASware&#8221;.  This is just more marketing buzzword-speak for something that does not need such segregation.  A hard disk should work in any system and not induce problems or inhibit I/O) while providing features that the <a href="http://www.wdc.com/en/products/products.aspx?id=780">WD Caviar Green</a> drives have (lower temperatures, &#8220;IntelliPark&#8221;, etc.), but still providing good throughput (not as great as the <a href="http://www.wdc.com/en/products/products.aspx?id=760">WD Caviar Black</a>, but supposedly better than the Green).  <strong>It&#8217;s very important to remember that companies like Western Digital created this delineation in the first place</strong>, so it&#8217;s very ironic (and depressing) that they&#8217;ve now begun to market models of hard disks that &#8220;solve these problems&#8221; when they themselves created the problem to begin with.  Phrased differently: MHDDs used to work in anything you put them in (desktops, servers, etc.), with zero repercussions or issues, and it was the MHDD manufacturers themselves who created these firmware-level &#8220;features&#8221; (issues).  It&#8217;s almost like the drives of today are being advertised/marketed with the assumption that those of us who were alive 13 years ago would hopefully have forgotten about how hard disks used to Just Work(tm).  Well, I&#8217;m one of many who hasn&#8217;t forgotten.</p>
<p>Anyway, I&#8217;ve wanted to get my hands on one of these drives since they were announced, because I wanted to see feature-wise and behaviour-wise if these drives behaved better than the Green drives (you can <a href="http://koitsu.wordpress.com/2012/05/30/wd30ezrx-and-aggressive-head-parking/">read my &#8220;review&#8221;</a> of present-day Green drives and how firmware-level features in them that do nothing other than frustrate and cause major problems).</p>
<p>Specifically, I wanted to examine the following things:</p>
<ol>
<li>Platter count and reliability</li>
<li>What ATA-level and firmware features the drive supported, and which features were enabled (or disabled) by default</li>
<li>If the infamous Load Cycle Count (LCC) issue existed on these drives</li>
<li>Very quick performance testing (I am not OCD over benchmarks)</li>
</ol>
<p>So let&#8217;s get to it!</p>
<p><span id="more-2212"></span></p>
<p>The drive I received had a manufacturing date of 2012/07/07, firmware 01.01A01.  However, as indicated at the bottom of my previous WD30EZRX &#8220;review&#8221;, firmware version doesn&#8217;t necessarily mean anything &#8212; WD, like too many companies these days, often doesn&#8217;t increment/change the firmware version.</p>
<p>1. The first thing I noticed about the WD10EFRX was its weight.  I could tell right off the bat, simply by holding it, that the WD10EFRX uses one platter (i.e. a single platter w/ 1TB density).  One platter also means 2 heads.  All of this amounts to one thing: less chance of failure compared to older 1TB drives which use multiple platters (e.g. 2x500GB platters, thus 4 heads).  It&#8217;s safe to say that the WD20EFRX (2TB) model probably has 2 platters, the 3TB model has 3 platters, etc..  Again: this is fantastic.</p>
<p>2. Upon hooking up the drive to a FreeBSD 9.x box, we see:</p>
<pre class="brush: plain; title: ; notranslate">
ada4 at ahcich4 bus 0 scbus4 target 0 lun 0
ada4: &lt;WDC WD10EFRX-68JCSN0 01.01A01&gt; ATA-8 SATA 3.x device
ada4: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada4: Command Queueing enabled
ada4: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)
</pre>
<p>The drive appears like pretty much every drive on the market (and justifiably so): it advertises 512-byte sectors despite being a 4096-byte sector (&#8220;Advanced Format&#8221;) drive.  Nothing surprising about this, but I did want to point it out; people often forget that all AF drives advertise 512-byte sectors to retain 100% compatibility with older OSes and storage controllers/HBAs.</p>
<p>Also note that the drives&#8217; SATA PHY supports SATA600 capability (though my motherboard (Supermicro X7SBA) only supports up to SATA300).  Good to know too.</p>
<p>3. I immediately took a snapshot of SMART attributes to get an idea of what things looked like from the factory.  Firmware version, serial number, WWN, etc. are all listed here:</p>
<pre class="brush: plain; title: ; notranslate">
# smartctl -a /dev/ada4
smartctl 5.43 2012-06-30 r3573 [FreeBSD 9.1-PRERELEASE amd64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Device Model:     WDC WD10EFRX-68JCSN0
Serial Number:    WD-WMC1U4917461
LU WWN Device Id: 5 0014ee 6ad3e27fd
Firmware Version: 01.01A01
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Wed Aug 15 20:35:11 2012 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (12960) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        ( 148) minutes.
Conveyance self-test routine
recommended polling time:        (   5) minutes.
SCT capabilities:              (0x30bd) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   100   253   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   253   021    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       2
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   100   253   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       0
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       2
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       1
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0022   115   110   000    Old_age   Always       -       28
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   253   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   000    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
</pre>
<p>Let&#8217;s run that again but using the -x flag instead, which provides some additional detail, insights into the SCT log, the SMART GPLog regions, and if the drive supports SATA device counters or not:</p>
<pre class="brush: plain; title: ; notranslate">
# smartctl -x /dev/ada4
smartctl 5.43 2012-06-30 r3573 [FreeBSD 9.1-PRERELEASE amd64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Device Model:     WDC WD10EFRX-68JCSN0
Serial Number:    WD-WMC1U4917461
LU WWN Device Id: 5 0014ee 6ad3e27fd
Firmware Version: 01.01A01
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Wed Aug 15 20:40:07 2012 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM feature is:   Unavailable
Rd look-ahead is: Enabled
Write cache is:   Enabled
ATA Security is:  Disabled, NOT FROZEN [SEC1]

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (12960) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        ( 148) minutes.
Conveyance self-test routine
recommended polling time:        (   5) minutes.
SCT capabilities:              (0x30bd) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR-K   100   253   051    -    0
  3 Spin_Up_Time            POS--K   100   253   021    -    0
  4 Start_Stop_Count        -O--CK   100   100   000    -    2
  5 Reallocated_Sector_Ct   PO--CK   200   200   140    -    0
  7 Seek_Error_Rate         -OSR-K   100   253   000    -    0
  9 Power_On_Hours          -O--CK   100   100   000    -    0
 10 Spin_Retry_Count        -O--CK   100   253   000    -    0
 11 Calibration_Retry_Count -O--CK   100   253   000    -    0
 12 Power_Cycle_Count       -O--CK   100   100   000    -    2
192 Power-Off_Retract_Count -O--CK   200   200   000    -    1
193 Load_Cycle_Count        -O--CK   200   200   000    -    0
194 Temperature_Celsius     -O---K   114   110   000    -    29
196 Reallocated_Event_Count -O--CK   200   200   000    -    0
197 Current_Pending_Sector  -O--CK   200   200   000    -    0
198 Offline_Uncorrectable   ----CK   100   253   000    -    0
199 UDMA_CRC_Error_Count    -O--CK   200   253   000    -    0
200 Multi_Zone_Error_Rate   ---R--   100   253   000    -    0
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

General Purpose Log Directory Version 1
SMART           Log Directory Version 1 [multi-sector log support]
GP/S  Log at address 0x00 has    1 sectors [Log Directory]
SMART Log at address 0x01 has    1 sectors [Summary SMART error log]
SMART Log at address 0x02 has    5 sectors [Comprehensive SMART error log]
GP    Log at address 0x03 has    6 sectors [Ext. Comprehensive SMART error log]
SMART Log at address 0x06 has    1 sectors [SMART self-test log]
GP    Log at address 0x07 has    1 sectors [Extended self-test log]
SMART Log at address 0x09 has    1 sectors [Selective self-test log]
GP    Log at address 0x10 has    1 sectors [NCQ Command Error log]
GP    Log at address 0x11 has    1 sectors [SATA Phy Event Counters]
GP    Log at address 0x21 has    1 sectors [Write stream error log]
GP    Log at address 0x22 has    1 sectors [Read stream error log]
GP/S  Log at address 0x80 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x81 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x82 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x83 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x84 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x85 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x86 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x87 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x88 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x89 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x8a has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x8b has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x8c has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x8d has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x8e has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x8f has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x90 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x91 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x92 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x93 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x94 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x95 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x96 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x97 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x98 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x99 has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x9a has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x9b has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x9c has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x9d has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x9e has   16 sectors [Host vendor specific log]
GP/S  Log at address 0x9f has   16 sectors [Host vendor specific log]
GP/S  Log at address 0xa0 has   16 sectors [Device vendor specific log]
GP/S  Log at address 0xa1 has   16 sectors [Device vendor specific log]
GP/S  Log at address 0xa2 has   16 sectors [Device vendor specific log]
GP/S  Log at address 0xa3 has   16 sectors [Device vendor specific log]
GP/S  Log at address 0xa4 has   16 sectors [Device vendor specific log]
GP/S  Log at address 0xa5 has   16 sectors [Device vendor specific log]
GP/S  Log at address 0xa6 has   16 sectors [Device vendor specific log]
GP/S  Log at address 0xa7 has   16 sectors [Device vendor specific log]
GP/S  Log at address 0xa8 has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xa9 has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xaa has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xab has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xac has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xad has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xae has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xaf has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xb0 has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xb1 has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xb2 has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xb3 has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xb4 has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xb5 has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xb6 has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xb7 has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xbd has    1 sectors [Device vendor specific log]
GP/S  Log at address 0xc0 has    1 sectors [Device vendor specific log]
GP    Log at address 0xc1 has   93 sectors [Device vendor specific log]
GP/S  Log at address 0xe0 has    1 sectors [SCT Command/Status]
GP/S  Log at address 0xe1 has    1 sectors [SCT Data Transfer]

SMART Extended Comprehensive Error Log Version: 1 (6 sectors)
No Errors Logged

SMART Extended Self-test Log Version: 1 (1 sectors)
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

SCT Status Version:                  3
SCT Version (vendor specific):       258 (0x0102)
SCT Support Level:                   1
Device State:                        Active (0)
Current Temperature:                    28 Celsius
Power Cycle Min/Max Temperature:     28/28 Celsius
Lifetime    Min/Max Temperature:     28/33 Celsius
Under/Over Temperature Limit Count:   0/0
SCT Temperature History Version:     2
Temperature Sampling Period:         1 minute
Temperature Logging Interval:        1 minute
Min/Max recommended Temperature:      0/60 Celsius
Min/Max Temperature Limit:           -41/85 Celsius
Temperature History Size (Index):    478 (9)

Index    Estimated Time   Temperature Celsius
  10    2012-08-15 12:43     ?  -
 ...    ..(467 skipped).    ..  -
   0    2012-08-15 20:31     ?  -
   1    2012-08-15 20:32    33  **************
   2    2012-08-15 20:33    33  **************
   3    2012-08-15 20:34     ?  -
   4    2012-08-15 20:35    28  *********
 ...    ..(  4 skipped).    ..  *********
   9    2012-08-15 20:40    28  *********

SCT Error Recovery Control:
           Read:     70 (7.0 seconds)
          Write:     70 (7.0 seconds)

SATA Phy Event Counters (GP Log 0x11)
ID      Size     Value  Description
0x0001  2            0  Command failed due to ICRC error
0x0002  2            0  R_ERR response for data FIS
0x0003  2            0  R_ERR response for device-to-host data FIS
0x0004  2            0  R_ERR response for host-to-device data FIS
0x0005  2            0  R_ERR response for non-data FIS
0x0006  2            0  R_ERR response for device-to-host non-data FIS
0x0007  2            0  R_ERR response for host-to-device non-data FIS
0x0008  2            0  Device-to-host non-data FIS retries
0x0009  2            1  Transition from drive PhyRdy to drive PhyNRdy
0x000a  2            1  Device-to-host register FISes sent due to a COMRESET
0x000b  2            0  CRC errors within host-to-device FIS
0x000f  2            0  R_ERR response for host-to-device data FIS, CRC
0x0012  2            0  R_ERR response for host-to-device non-data FIS, CRC
0x8000  4          351  Vendor specific
</pre>
<p>Looks good to me.</p>
<p>4. Next comes the ATA capabilities and which features were enabled/disabled by default, as well as what features had been added or removed when compared to Green and Black drives:</p>
<pre class="brush: plain; title: ; notranslate">
# camcontrol identify ada4
pass4: &lt;WDC WD10EFRX-68JCSN0 01.01A01&gt; ATA-8 SATA 3.x device
pass4: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)

protocol              ATA/ATAPI-8 SATA 3.x
device model          WDC WD10EFRX-68JCSN0
firmware revision     01.01A01
serial number         WD-WMC1U4917461
WWN                   50014ee6ad3e27fd
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 4096, offset 0
LBA supported         268435455 sectors
LBA48 supported       1953525168 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes      yes
write cache                    yes      yes
flush cache                    yes      yes
overlap                        no
Tagged Command Queuing (TCQ)   no       no
Native Command Queuing (NCQ)   yes              32 tags
SMART                          yes      yes
microcode download             yes      yes
security                       yes      no
power management               yes      yes
advanced power management      no       no
automatic acoustic management  no       no
media status notification      no       no
power-up in Standby            yes      no
write-read-verify              no       no
unload                         no       no
free-fall                      no       no
data set management (TRIM)     no
</pre>
<p>This is where the fun starts.  Here&#8217;s what we can discern from the advertised capabilities when compared to the Green and Black drives:</p>
<table>
<tr>
<th>Model</th>
<th>Advertised sector size</th>
<th>Physical sector size</th>
<th>APM (Advanced Power Management)</th>
<th>AAM (Automatic Acoustic Management)</th>
<th>PUIS (Power Up In Standby)</th>
<th>&#8220;IntelliPark&#8221;</th>
</tr>
<tr>
<td>WD10EFRX (Caviar Red, 1TB)</td>
<td>512</td>
<td>4096</td>
<td>not supported</td>
<td>not supported</td>
<td>supported, disabled by default</td>
<td>no</td>
</tr>
<tr>
<td>WD30EZRX (Caviar Green, 3TB)</td>
<td>512</td>
<td>4096</td>
<td>not supported</td>
<td>not supported</td>
<td>supported, disabled by default</td>
<td>yes</td>
</tr>
<tr>
<td>WD1002FAEX (Caviar Black, 1TB)</td>
<td>512</td>
<td>512</td>
<td>not supported</td>
<td>supported on some firmware revisions</td>
<td>supported, disabled by default</td>
<td>no</td>
</tr>
</table>
<p><strong>2012/10/02 update: Western Digital has removed any mention of IntelliPark from their WD Red product documentation.  So it appears that the first set of product documentation distributed for the Red drives incorrectly stated the product had IntelliPark when in fact they do not.</strong></p>
<p>As we get into the Load Cycle Count topic, it&#8217;s important to note that historically the only way to work around the LCC problem was to disable APM.  But as you can see, in all of these drives &#8212; including the WD Red &#8212; there is no way to do that.  So let&#8217;s hope the newest WD Red drives don&#8217;t suffer from the &#8220;LLC issue&#8221; (excessive head parking)!</p>
<p>5. At this point, I decided to do the &#8220;LCC test&#8221; in the exact same manner that I did with the WD30EZRX (Green 3TB) drive in my previous &#8220;review&#8221;: issue some read requests to the drive, sleep 10 seconds, pull SMART stats (looking at SMART attribute 193), and seeing if the counter increases.  So let&#8217;s do it:</p>
<pre class="brush: plain; title: ; notranslate">
# while true; do echo -n &quot;`date` -- &quot; ; dd if=/dev/ada4 of=/dev/null bs=4k count=1 2&gt;/dev/null ; sleep 10 ; smartctl -a /dev/ada4 | awk '/Load_Cycle_Count/ { print $2 &quot;: &quot; $NF }' ; done
Wed Aug 15 20:51:51 PDT 2012 -- Load_Cycle_Count: 0
Wed Aug 15 20:52:01 PDT 2012 -- Load_Cycle_Count: 0
Wed Aug 15 20:52:11 PDT 2012 -- Load_Cycle_Count: 0
Wed Aug 15 20:52:21 PDT 2012 -- Load_Cycle_Count: 0
Wed Aug 15 20:52:31 PDT 2012 -- Load_Cycle_Count: 0
Wed Aug 15 20:52:41 PDT 2012 -- Load_Cycle_Count: 0
Wed Aug 15 20:52:51 PDT 2012 -- Load_Cycle_Count: 0
</pre>
<p>I then did the same LCC test but with writes (e.g. <tt>dd if=/dev/zero of=/dev/ada4 bs=4k count=1</tt>).  The behaviour was the same: LCC did not increment, and the drive did not exhibit clicking or any audible noises.</p>
<p>Thus, the WD10EFRX I received <strong>does not</strong> suffer from the LCC problem.  That&#8217;s really good news.  It appears Western Digital has been listening to its consumers.</p>
<p>6. Now it&#8217;s time for the benchmarks.  It&#8217;s very important to understand that <strong>I do not perform extensive benchmarking</strong> &#8212; meaning, I do not care to go to great extremes or run a whole gamut of tests, workloads, etc..  I prefer to focus on drive features, reliability, and behaviour.  If you&#8217;re wanting extensive benchmarks and opinions relating to such, please use your favourite search engine to find reviews of the drive.</p>
<p>For benchmarks I resorted to switching to Windows (specifically Windows XP SP3, 32-bit, AHCI enabled with Intel RST drivers (version 10.8.0.1003)) and used HD Tune Pro 5.00.  Windows 7 would very likely have gotten slightly better performance, but again, that is not my focus.  The results are below, and are left to the reader to interpret/judge for themselves:</p>
<ul>
<li><a href="http://jdc.koitsu.org/disks/wd10efrx/">http://jdc.koitsu.org/disks/wd10efrx/</a></li>
</ul>
<p>Two things to note:</p>
<ol style="list-style-type:lower-roman;">
<li>I did see better overall performance using FreeBSD (sequential throughput was about 12MBytes/sec higher), so your mileage may vary.</li>
<li>The temperature of the WD10EFRX did not exceed 35C at any point.  Compare that to the Black, which in the same system idles around 42C, and extensive I/O gets the temperature up to around 48C.  I feel it&#8217;s very important to stress that fact, and can almost certainly be attributed to the disk containing a single platter.</li>
</ol>
<p>So given all of the above information, what&#8217;s my opinion?</p>
<p>The WD Red drives &#8212; at least the WD10EFRX &#8212; are excellent given what they&#8217;re advertised to do.  This is the exact kind of drive I have been wanting for quite some time: lightweight, good temperatures, decent-to-excellent I/O, uses 1TB density platters, and whose firmware doesn&#8217;t get in the way (re: LLC issue).</p>
<p>I&#8217;m going to keep this drive and put it to use in my Windows workstation.  I should invest in some WD20EFRX and WD30EFRX drives and examine them for any oddities, but right now money is somewhat tight so I can&#8217;t experiment as much as I&#8217;d like.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/2212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/2212/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=2212&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/08/15/examining-the-wd10efrx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Asus Xonar DG driver bugs on XP</title>
		<link>https://koitsu.wordpress.com/2012/07/21/asus-xonar-dg-driver-bugs-on-xp/</link>
		<comments>https://koitsu.wordpress.com/2012/07/21/asus-xonar-dg-driver-bugs-on-xp/#comments</comments>
		<pubDate>Sat, 21 Jul 2012 07:58:20 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=1870</guid>
		<description><![CDATA[EDIT: Interestingly enough &#8212; and I did report this to Asus &#8212; this issue went away after a system reboot. The nature of the problem still implies a driver-level bug, but why a reboot would fix it is still unknown. &#8230; <a href="https://koitsu.wordpress.com/2012/07/21/asus-xonar-dg-driver-bugs-on-xp/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1870&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>EDIT:</strong> Interestingly enough &#8212; and I did report this to Asus &#8212; this issue went away after a system reboot.  The nature of the problem still implies a driver-level bug, but why a reboot would fix it is still unknown.  I&#8217;m still looking to figure out if there&#8217;s a way to reproduce it consistently/reliably so that Asus can track down the source of the problem and fix it permanently.</p>
<p>About a week ago I replaced use of my crappy Realtek ALC889 (Azalia) on-board audio with an actual sound card &#8212; more specifically, the <a href="http://www.asus.com/Multimedia/Audio_Cards/Xonar_DG/#overview">Asus Xonar DG</a>.  This card is deemed &#8220;one of the best&#8221; by the general Internet community for gaming and general audio use, plus it&#8217;s inexpensive (US$25).</p>
<p>It didn&#8217;t take me long to start finding bugs in its drivers.</p>
<p><span id="more-1870"></span></p>
<p>Thankfully the issue I&#8217;m about to describe doesn&#8217;t affect most software.  Most programs these days tend to use DirectSound for audio playback, while this bug purely affects <a href="http://en.wikipedia.org/wiki/Windows_3.0#Multimedia_Extensions">Windows MME</a> playback, and only at rates less than 44kHz.</p>
<p>You might be inclined to ask &#8220;What on earth uses MME these days?  It dates back to Windows 3.0!&#8221; but surprisingly a large number of non-gaming applications continue to use Windows MME as a very simple way to play back .wav files or other such things.  A great example is the ever-popular Windows IRC client called <a href="http://www.mirc.com/">mIRC</a>.  But other programs such as <a href="http://audacity.sourceforge.net/">Audacity</a> and even <a href="http://www.winamp.com/">Winamp</a> (when using the Nullsoft WaveOut Output plug-in, rather than DirectSound) can use MME.  Even Windows XP Control Panel applets that come with the OS use MME.  My point is that MME is still used throughout many applications, thus audio card vendors need to make sure their drivers are tested properly with both MME and DirectSound.</p>
<p>I also imagine this only affects XP, as Windows Vista and Windows 7 both have entirely new audio layers and MME support is &#8220;emulated&#8221; where DirectSound is used natively.</p>
<p>The bug itself only affects playback when a frequency rate less than 44kHz (e.g. 11kHz or 22kHz) is used.  Mono vs. stereo has no bearing, nor does 16-bit vs. 8-bit.  The end result is audio that is played at a base frequency which is lower than what it should be; most people would describe the sound as &#8220;sad&#8221;.</p>
<p>It&#8217;s very easy to notice and doesn&#8217;t require a sharp ear in the least.  I have mIRC configured to play a &#8220;ding&#8221; noise when someone says my nickname on IRC, using C:\WINDOWS\Media\ding.wav as the source audio, which happens to be 22kHz 16-bit stereo.</p>
<p>I made a Youtube video showing this exact problem so that people can hear the difference themselves:</p>
<ul>
<li><a href="http://youtu.be/KHwjKLOS6o4">http://youtu.be/KHwjKLOS6o4</a></li>
</ul>
<p>And for those wanting to reproduce the issue, the easiest method is to use Audacity:</p>
<ol>
<li>Install Audacity</li>
<li>Open C:\WINDOWS\Media\ding.wav</li>
<li>Make sure that &#8220;MME&#8221; mode is selected, not &#8220;DirectSound&#8221;</li>
<li>Play the file and listen closely</li>
<li>Change from &#8220;MME&#8221; to &#8220;DirectSound&#8221;</li>
<li>Play the file and notice the difference (DirectSound is correct)</li>
</ol>
<p>I&#8217;ve mailed Asus about this problem, including a step-by-step method of reproducing it (it&#8217;s quite easy), and will post some follow-ups when they&#8217;ve gotten back to me.</p>
<p>The bug itself is almost certainly the result of someone&#8217;s resampling frequency table being incorrect, or if used via a formula, the formula being wrong.  I imagine the fix to be fairly simple, and I sure hope Asus doesn&#8217;t give me the standard Tier 1 Technical Support run-around (&#8220;have you tried rebooting your computer&#8221;, etc.).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/1870/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/1870/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1870&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/07/21/asus-xonar-dg-driver-bugs-on-xp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Memories</title>
		<link>https://koitsu.wordpress.com/2012/06/21/memories/</link>
		<comments>https://koitsu.wordpress.com/2012/06/21/memories/#comments</comments>
		<pubDate>Thu, 21 Jun 2012 08:11:06 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=1850</guid>
		<description><![CDATA[Tonight I decided to do something nostalgic (more than the usual) &#8212; try to find all the places I&#8217;ve lived at over the years, or at least the ones I can remember. There are some I can remember but can&#8217;t &#8230; <a href="https://koitsu.wordpress.com/2012/06/21/memories/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1850&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Tonight I decided to do something nostalgic (more than the usual) &#8212; try to find all the places I&#8217;ve lived at over the years, or at least the ones I can remember.  There are some I can remember but can&#8217;t find (such as when I briefly lived in the graduate dorms at Stanford), thus decided not to list them.</p>
<p><span id="more-1850"></span></p>
<ul>
<li><a href="http://maps.google.com/?ll=44.563995,-123.226497&amp;spn=0.004709,0.018346&amp;t=m&amp;z=16&amp;layer=c&amp;cbll=44.563991,-123.226493&amp;panoid=ijgWMMCZzHJ3u9qJMcrr1w&amp;cbp=11,180.32,,0,0.74">Corvallis, OR</a></li>
<li><a href="http://maps.google.com/?ll=37.474058,-122.169299&amp;spn=0.005245,0.018346&amp;t=m&amp;z=16&amp;layer=c&amp;cbll=37.474065,-122.169294&amp;panoid=9n3DKnJ0h1ZSqsrcSL_njQ&amp;cbp=11,318.95,,0,0.32">Menlo Park, CA</a></li>
<li><a href="http://maps.google.com/?ll=37.462713,-122.164192&amp;spn=0.005246,0.018346&amp;t=m&amp;layer=c&amp;cbll=37.462713,-122.164192&amp;panoid=cHrBs6kvVs0Ye3LuKK-ySA&amp;cbp=11,24.74,,0,3.58&amp;z=16">Menlo Park, CA</a></li>
<li><a href="http://maps.google.com/?ll=44.063641,-121.329092&amp;spn=0.002633,0.004587&amp;t=h&amp;z=18">Bend, OR</a></li>
<li><a href="http://maps.google.com/?ll=44.593111,-123.271601&amp;spn=0.004706,0.018346&amp;t=m&amp;z=16&amp;layer=c&amp;cbll=44.593104,-123.2716&amp;panoid=FjQ_L2YWuDncJFpfmIaBlg&amp;cbp=11,60.11,,0,12.11">Corvallis, OR</a></li>
<li>San Mateo, CA</li>
<li><a href="http://maps.google.com/maps?ll=37.317338,-121.84112&amp;spn=0.004121,0.004587&amp;sll=37.355899,-121.8328&amp;sspn=0.046325,0.073385&amp;t=h&amp;gl=us&amp;z=18&amp;layer=c&amp;cbll=37.317142,-121.841428&amp;panoid=uwTTJTCArb3E-1daVozDqQ&amp;cbp=12,7.43,,0,3.47">San Jose, CA</a></li>
<li><a href="http://maps.google.com/?ll=37.533637,-122.242362&amp;spn=0.005241,0.018346&amp;t=m&amp;layer=c&amp;cbll=37.533631,-122.242357&amp;panoid=tg1MKE8i452jJ1vgu-GwjQ&amp;cbp=11,32,,0,1.26&amp;z=16">Redwood Shores, CA</a></li>
<li><a href="http://maps.google.com/?ll=37.390465,-122.072482&amp;spn=0.005251,0.018346&amp;t=m&amp;layer=c&amp;cbll=37.390461,-122.072483&amp;panoid=mXBUrDYBI4EBxlfovBi5YA&amp;cbp=11,323.58,,0,-0.21&amp;z=16">Mountain View, CA</a></li>
<li><a href="http://maps.google.com/?ll=37.395528,-122.062601&amp;spn=0.002625,0.009173&amp;t=m&amp;layer=c&amp;cbll=37.395525,-122.062596&amp;panoid=JdnwFAj2MMa5HQdGj7ZKgw&amp;cbp=11,196.88,,0,-0.63&amp;z=17">Mountain View, CA</a></li>
<li><a href="http://maps.google.com/?ll=37.405773,-122.107716&amp;spn=0.00525,0.018346&amp;t=m&amp;layer=c&amp;cbll=37.405775,-122.107722&amp;panoid=GOJDkUbDLnvSxet4QHImYw&amp;cbp=11,309.89,,0,-4.84&amp;z=16">Mountain View, CA</a></li>
<li><a href="http://maps.google.com/?ll=37.392001,-122.059712&amp;spn=0.000656,0.002293&amp;t=m&amp;layer=c&amp;cbll=37.392001,-122.059712&amp;panoid=OJkMW1dwgrXYFwhs0pMVLg&amp;cbp=11,5.27,,0,-3.16&amp;z=19">Mountain View, CA</a></li>
<li><a href="http://maps.google.com/?ll=37.387434,-122.081757&amp;spn=0.001313,0.004587&amp;t=m&amp;layer=c&amp;cbll=37.387434,-122.081755&amp;panoid=bMR5_RsPf9xqeTZ4MM7eKA&amp;cbp=11,306.99,,0,0.43&amp;z=18">Mountain View, CA</a></li>
</ul>
<p>It&#8217;s pretty miraculous that after all these years I can still remember (and find!) the places I&#8217;ve lived.  Most of them I didn&#8217;t have addresses for; I simply remembered where things were.  Makes me wonder how much of my brain is used just for all that.</p>
<p>I feel bad for not being able to find the exact location in San Mateo where I lived.  Sadly the location was so generic that I can&#8217;t remember any landmarks.  I even checked old resumes and rental applications, but nothing goes back that far (1998!).  Bummer.</p>
<p>Searching for all these places brought back a lot of memories, especially about ex-girlfriends.  I&#8217;m still friends with most of my roommates and all, but I don&#8217;t tend to keep in touch with past partners.  So lots of memories, old emotions, things like that surfaced during all of this; some good, some bad.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/1850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/1850/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1850&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/06/21/memories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Diablo 3 crashing due to fake item hotlinking</title>
		<link>https://koitsu.wordpress.com/2012/06/07/diablo-3-crashing-due-to-fake-item-hotlinking/</link>
		<comments>https://koitsu.wordpress.com/2012/06/07/diablo-3-crashing-due-to-fake-item-hotlinking/#comments</comments>
		<pubDate>Thu, 07 Jun 2012 13:43:26 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=1834</guid>
		<description><![CDATA[EDIT: Blizzard has addressed this with Diablo 3 patch 1.0.2c (build 9991). Under &#8220;Bug Fixes&#8221;, the ChangeLog states: &#8220;Fixed several crashes which occurred when clicking on player-generated item links in the game client&#8221;. It appears that some nefarious Diablo 3 &#8230; <a href="https://koitsu.wordpress.com/2012/06/07/diablo-3-crashing-due-to-fake-item-hotlinking/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1834&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>EDIT: Blizzard has addressed this with Diablo 3 patch 1.0.2c (build 9991).  Under &#8220;Bug Fixes&#8221;, the ChangeLog states: &#8220;Fixed several crashes which occurred when clicking on player-generated item links in the game client&#8221;.</strong></p>
<p>It appears that some nefarious Diablo 3 players have found a way to crash another player&#8217;s client by sending a malformed &#8220;item hotlink&#8221;.  Apparently individuals have found a way to exploit the hotlinking feature, allowing for non-existent items to appear (such as potions that have sockets on them, etc.).  However, in some cases these fake items result in the client itself crashing when clicked upon.</p>
<p>Here are threads which are directly related to this issue:</p>
<ul>
<li><a href="http://us.battle.net/d3/en/forum/topic/5589547341">Fake Item Links Causing Client Crashes</a></li>
<li><a href="http://us.battle.net/d3/en/forum/topic/5633979074">Fake Item Links</a></li>
<li><a href="http://us.battle.net/d3/en/forum/topic/5633979097">Just saw a guy with something I can&#8217;t even&#8230;</a></li>
<li><a href="http://us.battle.net/d3/en/forum/topic/5589547374">6135.6 dps weapon</a></li>
<li><a href="http://us.battle.net/d3/en/forum/topic/5642269019">How are people posting fake items in chat?</a></li>
<li><a href="http://us.battle.net/d3/en/forum/topic/5578596659">Hacked item?</a></li>
<li><a href="http://us.battle.net/d3/en/forum/topic/5575476682">Bug abuse crash</a></li>
<li><a href="http://us.battle.net/d3/en/forum/topic/5575476473">If you paste this in chat it crashes people!!</a></li>
</ul>
<p>Reddit also mentions the issue:</p>
<ul>
<li><a href="http://www.reddit.com/r/Diablo/comments/up1i6/beware_fake_weapon_scams_you_can_link_fake/">Beware fake weapon scams. You can link fake items in chat.</a></li>
</ul>
<p>There is obviously no workaround other than to avoid clicking on ANY link in chat, whether it be private or public.</p>
<p><span id="more-1834"></span></p>
<p>One such item which absolutely crashes the client (if the name is clicked on) is the following string:</p>
<pre>
|HItem:2,1236607151:-877003260:-362610042,-362610042,-362610042,-362610042,-362610042,-362610042,-362610042,1791308545,1791308545,1791308545,1791308545,1791308545,1791308545,-362610042,-362610042,810509133,810509133,810509133-1008238675,-1008238675,-1008238675,-1243748674,-1243748674,-1243748674:-1:0:-1:-1:-1:9:444:444:0:0:4:0:|h [{c:ffff00ff}Diablo's Claw{/c}]|h
</pre>
<p>It amazes me that Blizzard continues to use a hotlinking model that allows for players to manually insert such text, not to mention provide a player to actually send something across the wire that will get parsed into an invalid item.  Was it simply too hard to use a syntax that involved a high-bit (e.g. not possible to input by a player) character sequence, and directly refer to an item number?  Such an example would be:</p>
<pre>
&lt;0xBEEFCAFEF00DFACE&gt;263&lt;0x00&gt;
</pre>
<p>&#8230;where the hex strings 0xBEEFCAFEF00DFACE and 0&#215;00 are literal binary, and the number 263 refers to item 263.  Item colour, etc. would be part of the data structure associated with the item itself, not something a player could input.</p>
<p>For modifiable items (e.g. with sockets which are populated with variable gems), a comma-delimited syntax could be used &#8212; where the comma-delimited values only applied if the preceding item number actually had sockets in it, <strong>and</strong> assuming the sockets were filled with items that were denoted in the internal data structure as socketable.  An example where item 92145 was filled with 2 socketable items (9801 and 7625, respectively):</p>
<pre>
&lt;0xBEEFCAFEF00DFACE&gt;92145,9801,7625&lt;0x00&gt;
</pre>
<p>This isn&#8217;t rocket science.  This is &#8220;secure programming 101&#8243;; it&#8217;s a combination of sanitizing input, and not provide humans the ability to enter characters/data which could cause a problem.  The <tt>|HItem:...|h</tt> stuff is a disgrace.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/1834/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/1834/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1834&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/06/07/diablo-3-crashing-due-to-fake-item-hotlinking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>All Blizzard sites unreachable</title>
		<link>https://koitsu.wordpress.com/2012/06/03/all-blizzard-sites-unreachable/</link>
		<comments>https://koitsu.wordpress.com/2012/06/03/all-blizzard-sites-unreachable/#comments</comments>
		<pubDate>Sun, 03 Jun 2012 17:06:14 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=1813</guid>
		<description><![CDATA[EDIT: As of 10:48 PDT, things seem back online (and reliably at that). I strongly doubt there will ever be mention of this outage publicly. EDIT #2: Imagine that! Assuming you&#8217;re actually able to log in to Diablo 3 (not &#8230; <a href="https://koitsu.wordpress.com/2012/06/03/all-blizzard-sites-unreachable/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1813&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>EDIT: As of 10:48 PDT, things seem back online (and reliably at that).  I strongly doubt there will ever be mention of this outage publicly.</strong></p>
<p><strong>EDIT #2: Imagine that!  Assuming you&#8217;re actually able to log in to Diablo 3 (not sure about other battle.net services), there is an incredibly (and obviously intentionally) vague message about &#8220;a problem&#8221;.  I&#8217;ve included it here as a screenshot.  I love the use of the phrase &#8220;the parties involved&#8221;; wouldn&#8217;t want to name any names and risk holding a provider responsible for the problem, would we?  US politics, what a disgrace.</strong></p>
<p><a href="http://koitsu.files.wordpress.com/2012/06/the_parties_involved.png"><img src="http://koitsu.files.wordpress.com/2012/06/the_parties_involved.png?w=640" alt="" title="Diablo 3 / Blizzard outage"   class="aligncenter size-full wp-image-1824" /></a></p>
<p><strong>EDIT #3: mtr now shows what appears to be a great improvement; it looks to me like there was a network-level problem within AT&amp;T&#8217;s own network near/around Salt Lake City that caused this.  Of course, I would still love to know why my packets bound for the NS-WEST.CERF.NET nameserver go from the Bay Area to Los Angeles to Salt Lake City to Los Angeles to San Diego.  Asymmetry doesn&#8217;t explain this either.  Obviously AT&amp;T has some kind of networking issue that they tried to route around (which caused this entire ordeal) but failed miserably.  Wouldn&#8217;t be the first, 2nd, or even 10th time I&#8217;ve seen AT&amp;T fail at this.  Welcome to the Internet: it&#8217;s broken 24x7x365, no exaggeration.</strong></p>
<p>Not sure when this issue began today, but I was able to confirm its existence around 09:45 PDT (that&#8217;s 9:45am Pacific).</p>
<p>None of Blizzard&#8217;s sites &#8212; including blizzard.com, battle.net, diablo3.com, as well as any subdomain under those &#8212; are resolving.  I imagine this would affect any game or service Blizzard offers which uses DNS for resolution; hard-coded IP addresses (which I believe WoW uses for its server list) would not be affected, of course, but I believe WoW does use DNS for some portion of its authentication mechanism.  In the case of Diablo 3, the behaviour is amusing &#8212; you might see a strange GDI-based &#8220;Checking for updates&#8221; box, then get the usual launcher dialog with no details in it, with &#8220;Play&#8221; greyed out.  (Note to Blizzard: you should really improve the error handling in the D3 Launcher.  The way this manifested itself, from a UI / end-user perspective, is absolutely atrocious!)</p>
<p><span id="more-1813"></span></p>
<p>Blizzard&#8217;s Facebook page is filled with people complaining about the problem, while Blizzard&#8217;s Twitter page (as of 10:09 PDT) has no mention of any issue.</p>
<p>The root cause appears to be some sort of major issue within AT&amp;T.  Blizzard relies on two authoritative nameservers for all of their sites &#8212; specifically NS-WEST.CERF.NET and NS-EAST.CERF.NET (this is AT&amp;T).  Neither of these authoritative nameservers are responding.  I have not the slightest idea on earth why Blizzard has only *two* authoritative nameservers, and both with the same company (AT&amp;T); you would expect them to have a tertiary that wasn&#8217;t AT&amp;T-responsible.  I dunno who maintains Blizzard&#8217;s WHOIS and SOA data, but that&#8217;s a very, very bad choice on their part; DNS and Networking 101 says do not do this.</p>
<p>Below are some technical details which won&#8217;t mean much to your average player but to a system or network administrator will be more than sufficient evidence of the problem.</p>
<p>I cannot explain why packets destined for NS-WEST.CERF.NET&#8217;s IP address are going through Salt Lake City, Utah.  This smells of an AT&amp;T IP routing problem but I have no easy way to confirm that given the asymmetric nature of packet flow on the Internet.</p>
<pre class="brush: plain; title: ; notranslate">
$ dig @a.gtld-servers.net ns blizzard.com.

; &lt;&lt;&gt;&gt; DiG 9.8.2 &lt;&lt;&gt;&gt; @a.gtld-servers.net ns blizzard.com.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 11635
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 2
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;blizzard.com.                  IN      NS

;; AUTHORITY SECTION:
blizzard.com.           172800  IN      NS      ns-east.cerf.net.
blizzard.com.           172800  IN      NS      ns-west.cerf.net.

;; ADDITIONAL SECTION:
ns-east.cerf.net.       172800  IN      A       207.252.96.3
ns-west.cerf.net.       172800  IN      A       192.153.156.3

;; Query time: 108 msec
;; SERVER: 192.5.6.30#53(192.5.6.30)
;; WHEN: Sun Jun  3 10:01:43 2012
;; MSG SIZE  rcvd: 114


$ dig @207.252.96.3 ns blizzard.com.

; &lt;&lt;&gt;&gt; DiG 9.8.2 &lt;&lt;&gt;&gt; @207.252.96.3 ns blizzard.com.
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached


$ dig @192.153.156.3 ns blizzard.com.

; &lt;&lt;&gt;&gt; DiG 9.8.2 &lt;&lt;&gt;&gt; @192.153.156.3 ns blizzard.com.
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached


$ mtr 192.153.156.3
                                                  Packets               Pings
 Host                                           Loss%   Snt   Rcv  Last   Avg  Best  Wrst
 1. gw.home.lan                                  0.0%    21    21   0.3   0.2   0.2   0.3
 2. c-67-180-84-1.hsd1.ca.comcast.net           20.0%    20    16 4932. 4829. 4264. 5128.
 3. te-0-0-0-12-ur05.santaclara.ca.sfba.comcast  0.0%    20    20  97.8  19.0   8.7  97.8
 4. te-1-11-0-1-ar01.sfsutro.ca.sfba.comcast.ne  0.0%    20    20  44.1  24.0  13.0  45.9
 5. 68.86.91.229                                 0.0%    20    20  62.5  25.9  12.1  66.7
 6. pos-0-4-0-0-pe01.11greatoaks.ca.ibone.comca  0.0%    20    20  30.6  20.7  16.8  32.0
 7. 192.205.37.1                                 0.0%    20    20  18.4  29.2  16.1 118.3
 8. cr2.sffca.ip.att.net                         0.0%    20    20  44.4  49.7  39.7  84.7
 9. cr2.la2ca.ip.att.net                         0.0%    20    20  58.0  48.0  39.7  66.3
10. cr1.slkut.ip.att.net                         0.0%    20    20  43.6  50.4  39.3  83.1
11. cr2.slkut.ip.att.net                         0.0%    20    20  56.6  48.6  38.5  87.9
12. 12.123.238.133                               0.0%    20    20  40.7  46.9  37.7  97.1
13. ???


$ mtr 207.252.96.3
                                                  Packets               Pings
 Host                                           Loss%   Snt   Rcv  Last   Avg  Best  Wrst
 1. gw.home.lan                                  0.0%    62    62   0.3   0.3   0.2   0.4
 2. c-67-180-84-1.hsd1.ca.comcast.net            8.2%    61    56 4528. 5193. 4525. 6339.
 3. te-0-0-0-12-ur05.santaclara.ca.sfba.comcast  0.0%    61    61  10.4  15.7   8.0  70.7
 4. te-1-11-0-1-ar01.sfsutro.ca.sfba.comcast.ne  0.0%    61    61  19.9  23.6  10.3  67.2
 5. 68.86.90.93                                  0.0%    61    61  21.8  20.8  11.4  53.8
 6. pos-0-9-0-0-pe01.11greatoaks.ca.ibone.comca  0.0%    61    61  17.7  24.7  16.0  56.1
 7. 192.205.37.1                                 0.0%    61    61  74.2  28.0  15.8 140.6
 8. cr2.sffca.ip.att.net                         0.0%    61    61  45.2  49.6  39.3 104.1
 9. cr2.la2ca.ip.att.net                         0.0%    61    61  41.3  50.3  37.9 114.7
10. cr1.slkut.ip.att.net                         0.0%    61    61  54.1  48.3  38.6  80.8
11. cr2.slkut.ip.att.net                         0.0%    61    61  62.7  50.7  39.7  91.2
12. 12.123.238.137                               0.0%    61    61  39.2  50.6  37.5 183.9
13. ???
14. ???
15. ???
16. ???
17. ???
18. ???
19. n54ny401me3.ip.att.net                       0.0%    58    57  96.6 104.9  94.4 145.6
20. ???


route-views&gt;show ip route 192.153.156.3
Routing entry for 192.153.156.0/24
  Known via &quot;bgp 6447&quot;, distance 20, metric 0
  Tag 7018, type external
  Last update from 12.0.1.63 7w0d ago
  Routing Descriptor Blocks:
  * 12.0.1.63, from 12.0.1.63, 7w0d ago
      Route metric is 0, traffic share count is 1
      AS Hops 2
      Route tag 7018


route-views&gt;show ip route 207.252.96.3
Routing entry for 207.252.96.0/24
  Known via &quot;bgp 6447&quot;, distance 20, metric 0
  Tag 7018, type external
  Last update from 12.0.1.63 7w0d ago
  Routing Descriptor Blocks:
  * 12.0.1.63, from 12.0.1.63, 7w0d ago
      Route metric is 0, traffic share count is 1
      AS Hops 2
      Route tag 7018
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/1813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/1813/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1813&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/06/03/all-blizzard-sites-unreachable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>

		<media:content url="http://koitsu.files.wordpress.com/2012/06/the_parties_involved.png" medium="image">
			<media:title type="html">Diablo 3 / Blizzard outage</media:title>
		</media:content>
	</item>
		<item>
		<title>WD30EZRX and aggressive head parking</title>
		<link>https://koitsu.wordpress.com/2012/05/30/wd30ezrx-and-aggressive-head-parking/</link>
		<comments>https://koitsu.wordpress.com/2012/05/30/wd30ezrx-and-aggressive-head-parking/#comments</comments>
		<pubDate>Wed, 30 May 2012 07:57:44 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=1764</guid>
		<description><![CDATA[For many years Western Digital has been flip-flopping their stance on the issue with aggressive (and excessive) parking of the drive&#8217;s heads, especially in the case of their Green series drives (including their &#8220;Enterprise&#8221; drives with the &#8220;-GP&#8221; suffix). WD &#8230; <a href="https://koitsu.wordpress.com/2012/05/30/wd30ezrx-and-aggressive-head-parking/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1764&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For many years Western Digital has been flip-flopping their stance on the issue with aggressive (and excessive) parking of the drive&#8217;s heads, especially in the case of their Green series drives (including their &#8220;Enterprise&#8221; drives with the &#8220;-GP&#8221; suffix).  WD advertises this as a feature called &#8220;IntelliPark&#8221; &#8212; a feature that, in all honesty, appears to do nothing useful in desktop or server systems.</p>
<p>To end-users and administrators, this behaviour manifests itself in two ways:</p>
<ol>
<li>Degraded performance for occasional I/O, due to the drive having to unlock and move its actuator arms back over the platters,</li>
<li>A rapidly increasing Load_Cycle_Count (SMART attribute 193 / 0xC1).  Internet users often refer to this as &#8220;LCC&#8221;.</li>
</ol>
<p>It was brought to my attention via an Internet forum post that WD may have done away with excessive load cycling on newer Green drives, and also did not require use of WD&#8217;s Idle3 utility (more on that in a moment).  I was ecstatic; the Green drives run at a lower temperature, and for a disk that&#8217;s being used to store backups (e.g. not regularly accessed) but kept spinning at all times (lots of reasons for this), the Green series seemed like a good choice.</p>
<p>So last week I bought a WD30EZRX to see what the behaviour was.</p>
<p><span id="more-1764"></span></p>
<p>Sadly, the behaviour on the WD30EZRX is identical to that of the WD20EARS drive which came out many years ago: the drive is incredibly aggressive about parking its heads, and now there&#8217;s no reliable way to disable this behaviour.</p>
<p>Per the ATA specification IDENTIFY command, the WD30EZRX drive doesn&#8217;t support APM (see line 26 below); why that matters will soon become evident:</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
protocol              ATA/ATAPI-8 SATA 3.x
device model          WDC WD30EZRX-00MMMB0
firmware revision     80.00A80
serial number         WD-WCAWZ1930893
WWN                   50014ee2b179476a
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 4096, offset 0
LBA supported         268435455 sectors
LBA48 supported       5860533168 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes      yes
write cache                    yes      yes
flush cache                    yes      yes
overlap                        no
Tagged Command Queuing (TCQ)   no       no
Native Command Queuing (NCQ)   yes              32 tags
SMART                          yes      yes
microcode download             yes      yes
security                       yes      no
power management               yes      yes
advanced power management      no       no
automatic acoustic management  no       no
media status notification      no       no
power-up in Standby            yes      no
write-read-verify              no       no
unload                         no       no
free-fall                      no       no
data set management (TRIM)     no
</pre>
<p>SMART attributes:</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   100   253   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   163   163   021    Pre-fail  Always       -       8833
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       10
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   100   253   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       0
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       8
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       7
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       15
194 Temperature_Celsius     0x0022   124   121   000    Old_age   Always       -       28
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   000    Old_age   Offline      -       0
</pre>
<p>A count of 15 doesn&#8217;t look that bad, does it?  Yeah well, watch this.</p>
<p>The below sequence of commands prints the current date/time, followed by reading 4KBytes of data from the drive (LBAs 0 to 3), sleeps 10 seconds, then checks SMART statistics and prints out the Load_Cycle_Count attribute and its raw value, rinse lather repeat indefinitely:</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
while true; do echo -n &quot;`date` -- &quot; ; dd if=/dev/ada3 of=/dev/null bs=4k count=1 2&gt;/dev/null ; sleep 10 ; smartctl -a /dev/ada3 | awk '/Load_Cycle_Count/ { print $2 &quot;: &quot; $NF }' ; done
Wed May 30 00:18:17 PDT 2012 -- Load_Cycle_Count: 28
Wed May 30 00:18:28 PDT 2012 -- Load_Cycle_Count: 29
Wed May 30 00:18:38 PDT 2012 -- Load_Cycle_Count: 30
Wed May 30 00:18:49 PDT 2012 -- Load_Cycle_Count: 31
Wed May 30 00:18:59 PDT 2012 -- Load_Cycle_Count: 31
Wed May 30 00:19:10 PDT 2012 -- Load_Cycle_Count: 32
Wed May 30 00:19:20 PDT 2012 -- Load_Cycle_Count: 33
Wed May 30 00:19:31 PDT 2012 -- Load_Cycle_Count: 34
Wed May 30 00:19:41 PDT 2012 -- Load_Cycle_Count: 35
Wed May 30 00:19:52 PDT 2012 -- Load_Cycle_Count: 36
Wed May 30 00:20:02 PDT 2012 -- Load_Cycle_Count: 37
Wed May 30 00:20:13 PDT 2012 -- Load_Cycle_Count: 38
Wed May 30 00:20:23 PDT 2012 -- Load_Cycle_Count: 39
Wed May 30 00:20:34 PDT 2012 -- ^C
</pre>
<p>Every time the drive load cycles, of course, there is an audible noise issued as well (the sound of the actuator arm having to be moved, thus heads unparked).  So as I stated above in item #1, the drive will perform badly (initial I/O will stall/delay while the heads are being unparked), while Load_Cycle_Count increments.</p>
<p>If we try a shorter sleep interval (5 seconds), the issue doesn&#8217;t happen, which further proves that there is an &#8220;idle timeout&#8221; internal to the drive (not that this is anything new) and it&#8217;s probably set somewhere between 6-9 seconds:</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
# while true; do echo -n &quot;`date` -- &quot; ; dd if=/dev/ada3 of=/dev/null bs=4k count=1 2&gt;/dev/null ; sleep 5 ; smartctl -a /dev/ada3 | awk '/Load_Cycle_Count/ { print $2 &quot;: &quot; $NF }' ; done
Wed May 30 00:20:55 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:01 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:06 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:11 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:16 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:21 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:26 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:32 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:37 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:42 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:47 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:52 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:21:57 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:22:02 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:22:07 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:22:12 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:22:18 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:22:23 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:22:28 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:22:33 PDT 2012 -- Load_Cycle_Count: 40
Wed May 30 00:22:38 PDT 2012 -- ^C
</pre>
<p>I should also note here that the load cycle count can/will increment when pulling SMART statistics after the drive has gone into idle state.  The reason: SMART statistics are stored in the <a href="http://en.wikipedia.org/wiki/Host_protected_area">HPA</a> region of the drive, which means for it to read statistics it has to unpark the heads.  A beautiful catch-22&#8230;</p>
<p>And now some links to WD&#8217;s own justification/stance on the &#8220;LCC matter&#8221;:</p>
<ul>
<li><a href="http://wdc.custhelp.com/app/answers/detail/a_id/5357">The S.M.A.R.T Attribute 193 Load/Unload counter keeps increasing on a SATA 2 hard drive</a></li>
<li><a href="http://wdc.custhelp.com/app/answers/detail/a_id/3263">The S.M.A.R.T Attribute 193 Load/Unload counter continue to increase for the WD RE2-GP SATA II hard drives</a></li>
</ul>
<p>Things to note about these documents, and in general, because none of it is made apparent:</p>
<ol>
<li>Neither document mentions the WD30EZRX, nor its brother/sister drives of smaller capacities or less cache (such as the WD25EZRX, WD20EARX, WD15EARX, WD10EARX, WD10EZRX, or the WD20EARS).  However, some WD forum users are referring folks with those models of drives to the above documents, which could result in catastrophic problems (keep reading),</li>
<li>Within the first document you&#8217;ll find preposterous recommendations, such as to disable or adjust syslog (the idea being that disabling logging won&#8217;t unpark the drive heads); this is WD&#8217;s horrible attempt at stating &#8220;try to not issue any drive I/O to the drive and let it sit idle as much as possible&#8221;.  This approach is so moronic and wrong/blind that it&#8217;s unfathomable,</li>
<li>Also within the first document you will see a recommended solution of disabling APM (Advanced Power Management) on the drive itself.  However, the disable-APM advice is only <strong>sometimes</strong> applicable.  Only some models of WD drives have a direct correlation between APM and the idle timeout feature, while others (such as the WD30EZRX) don&#8217;t support APM at all but still have the idle timeout feature.  Furthermore, disabling APM also disables other internal features of the drive, which is a downside,</li>
<li>Deep within the bowels of these documents you will find mention of a WD-specific utility which they call &#8220;Idle3&#8243;.  This utility adjusts an internal &#8220;idle timeout&#8221; value within the drive itself (the config is probably stored in the HPA somewhere).  However, this utility DOS-based, and often does not work with AHCI (and definitely will not work under RAID).  Thus you are forced to not only reboot and deal with booting into MS-DOS or FreeDOS or whatever else you can find, but you&#8217;re forced to adjust your system BIOS to change your SATA controller&#8217;s option ROM mode to native SATA (or worse, PATA emulation) just to get this utility to work.  Once you adjust the setting it stays (permanently, or until set back to defaults), but customers shouldn&#8217;t have to go through this rigmarole in the first place.  <strong>Do not mistake this for TLER or SCT Error Recovery (same thing) &#8212; that is a completely unrelated feature and has no bearing on this issue.</strong></li>
</ol>
<p>So the last choice seems like the best, right?  <a href="http://lime-technology.com/forum/index.php?topic=15554.0">Wrong</a>.  A couple people have commented in that thread stating that their drive performance dropped horribly once they used the Idle3 utility to disable the aggressive idle timeout.</p>
<p>Furthermore, <a href="http://support.wdc.com/product/download.asp?groupid=609&amp;sid=113">Western Digital&#8217;s own product support documentation</a> states that this utility should not be used on this model of drive.</p>
<p>A <a href="http://www.techarp.com/showarticle.aspx?artno=730&amp;pgno=2">review of the WD30EZRX back in 2011</a> indicated that the drive has a load/unload cycle count lifetime of 300,000 cycles.  This came straight from WD&#8217;s <a href="http://www.wdc.com/wdproducts/library/?id=271&amp;type=8">own product documentation</a>.</p>
<p>Furthermore, WD&#8217;s <a href="http://community.wdc.com/t5/Desktop/bd-p/caviar">own forum</a> is filled with people complaining about this problem, even on the WD30EZRX.  <a href="http://community.wdc.com/t5/Desktop/Caviar-Green-3TB-284-379-Load-Cycle-Count-in-only-131-days/td-p/411130">One user</a> has a drive that&#8217;s new/recent and is already reaching 284,000 cycles.</p>
<p>Needless to say, this WD30EZRX drive will be returned to its place of purchase for a full refund.  Very, very disappointing.</p>
<p>I&#8217;ve discussed (ranted) at length with colleagues of mine how the storage industry is making a big mistake doing things like this.  One pointed out that it&#8217;s basically impossible in this day and age to get a hard disk that just does what it&#8217;s supposed to: read/write.  Instead, you have to reenact Riverdance just to get your disk working reliably without any nonsense in the way.  The <a href="http://en.wikipedia.org/wiki/KISS_principle">KISS principle</a> has once again been ignored or forgotten.</p>
<p>Drive manufacturers continue adding new features that do nothing but make a mess for their consumers.  This applies to more than just WD, and it&#8217;s incredibly depressing.  In the case of WD, it&#8217;s quite obvious that the Green and Black drives use the exact same parts and thus are identical in mechanics, with the only difference being firmware.</p>
<p>With that in mind, take this into consideration: the WD2002FAEX (Caviar Black 2TB, 64MBytes cache) <a href="http://www.amazon.com/Western-Digital-Caviar-Internal-Desktop/dp/B004CSIG1G">costs US$192.98</a>, while the WD20EARX (Caviar Green 2TB, 64MBytes cache) <a href="http://www.amazon.com/Western-Digital-Caviar-Desktop-WD20EARX/dp/B004VFJ9MK">costs US$116.00</a> (amounts taken on 2012/05/30).  That&#8217;s a US$76.98 difference, per drive.  This didn&#8217;t used to be the case though&#8230; until the whole <a href="http://www.nytimes.com/2011/11/07/business/global/07iht-floods07.html?pagewanted=all">Thailand flooding</a> situation happened.  It seems to me that as a result of an act of God someone is now using the opportunity to make serious cash where previously they were making much less.  And <a href="http://www.extremetech.com/computing/103711-hdd-pricewatch-you-know-where-its-going-we-tell-you-how-much-its-going-to-hurt">I&#8217;m not the only one</a> who noticed either.  The world can blame the United States&#8217; excessive focus on capitalism as the sole reason for this; it makes me sad.</p>
<p>And finally, if you think all the firmware versions are identical based entirely on the firmware string, you would be sadly mistaken.  The below two Caviar Black 1TB drives are identical, yet they advertise completely different capabilities per the ATA specification IDENTIFY command.  Note the lack of AAM on the 2nd drive, yet it&#8217;s quite clear they advertise the same firmware string:</p>
<pre class="brush: plain; highlight: [3,27]; title: ; toolbar: false; notranslate">
protocol              ATA/ATAPI-8 SATA 3.x
device model          WDC WD1002FAEX-00Z3A0
firmware revision     05.01D05
serial number         WD-WCATR1782965
WWN                   50014ee25a001e1c
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         268435455 sectors
LBA48 supported       1953525168 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes      yes
write cache                    yes      yes
flush cache                    yes      yes
overlap                        no
Tagged Command Queuing (TCQ)   no       no
Native Command Queuing (NCQ)   yes              32 tags
SMART                          yes      yes
microcode download             yes      yes
security                       yes      no
power management               yes      yes
advanced power management      no       no
automatic acoustic management  yes      no      254/0xFE        128/0x80
media status notification      no       no
power-up in Standby            yes      no
write-read-verify              no       no
unload                         no       no
free-fall                      no       no
data set management (TRIM)     no
</pre>
<pre class="brush: plain; highlight: [3,27]; title: ; toolbar: false; notranslate">
protocol              ATA/ATAPI-8 SATA 3.x
device model          WDC WD1002FAEX-00Z3A0
firmware revision     05.01D05
serial number         WD-WCATR7016817
WWN                   50014ee25b1b1639
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         268435455 sectors
LBA48 supported       1953525168 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes      yes
write cache                    yes      yes
flush cache                    yes      yes
overlap                        no
Tagged Command Queuing (TCQ)   no       no
Native Command Queuing (NCQ)   yes              32 tags
SMART                          yes      yes
microcode download             yes      yes
security                       yes      no
power management               yes      yes
advanced power management      no       no
automatic acoustic management  no       no
media status notification      no       no
power-up in Standby            yes      no
write-read-verify              no       no
unload                         no       no
free-fall                      no       no
data set management (TRIM)     no
</pre>
<p>I would love to have a long and detailed chat with present-day storage companies about all of the above.  The KISS principle really needs to be put into effect here, and the sooner the better.  Otherwise what we&#8217;re effectively doing is paying for firmware features &#8212; and ones we cannot disable or toggle.  But then again <a href="http://en.wikipedia.org/wiki/Unfrozen_Caveman_Lawyer">I&#8217;m just a simple engineer</a> &#8212; what do I know of such things, right?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/1764/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/1764/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1764&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/05/30/wd30ezrx-and-aggressive-head-parking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>WD Sentinel DX4000 &#8212; unacceptable power design</title>
		<link>https://koitsu.wordpress.com/2012/01/02/wd-sentinel-dx4000-unacceptable-power-design/</link>
		<comments>https://koitsu.wordpress.com/2012/01/02/wd-sentinel-dx4000-unacceptable-power-design/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 03:55:27 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=1750</guid>
		<description><![CDATA[Update: It appears Western Digital has indirectly responded to my blog post, stating that the concerns over disk power draw on system power-up are incorrect. They state that the disks are spun up individually, with 2 second intervals between each &#8230; <a href="https://koitsu.wordpress.com/2012/01/02/wd-sentinel-dx4000-unacceptable-power-design/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1750&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Update: It appears Western Digital has indirectly responded to my blog post, stating that the concerns over disk power draw on system power-up are incorrect.  They state that <a href="http://www.mswhs.com/2012/01/a-bad-wd-sentinel-dx4000-power-design/comment-page-1/#comment-15084">the disks are spun up individually, with 2 second intervals between each disk</a>.  This is good to know.  I would not have written my &#8220;scathing review&#8221; had Western Digital taken the time to document this behaviour somewhere, especially in their own product specification sheet.  This is why NAS manufacturers need to be fully open with disclosure of how their products work, including low-level engineering details.  This stuff plays a bigger role today than ever.</strong></p>
<p>Western Digital has released a new SoHo NAS product, the <a href="http://www.wdc.com/en/products/products.aspx?id=610">WD Sentinel DX4000</a>, which is driven by an Intel Atom mainboard and CPU, supports dual gigE (for failover, not trunking), and up to 4 disks in RAID-5.  It&#8217;s 8x6x8 inches in size for the 4-disk version.  The cost?  US$1500 retail.</p>
<p>Remember: the product is intended for businesses or high-class end-users.</p>
<p>Now <a href="http://www.wdc.com/global/images/products/models/img5/300/wdfWDSentinel.jpg">take a look</a> at its AC power connectors: two circular female connectors with a male centre pin.  You know, the common &#8220;wall wart&#8221; and &#8220;in-line brick&#8221; crap you&#8217;d see on consumer-grade products that results in cable clutter (and absolutely impossible to properly deal with when placed in a rack)?  No, surely that couldn&#8217;t be, especially for a SoHo device of those physical dimensions&#8230;</p>
<p><span id="more-1750"></span></p>
<p>I thought for a moment it might be a proprietary connector that required a proprietary cable that went directly to a 115V AC plug, so I downloaded the <a href="http://www.wdc.com/wdproducts/library/?id=297&amp;type=25">official User Manual</a>.</p>
<p>Lo and behold, on page 7 of the manual (page 11 per PDF index), an in-line brick (transformer) is shown.  You get only one (the 2nd connector is for failover/redundancy), and its power requirements are miniscule.  Quoting page 9 of the manual (page 13 per PDF index):</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
Input voltage: 100V to 240V AC
Input frequency: 50 to 60 Hz
Output voltage: 19V DC, up to 6.32A
</pre>
<p>I&#8217;m a little surprised by those power requirements: 6.3A at 19V.  The unit comes with 5400rpm drives &#8212; if you were to shove four 7200rpm drives in there, you almost certainly would be taxing that little brick of an AC adapter.  Your drives would start falling off the bus and experiencing strange anomalies during high I/O.  Let me explain:</p>
<p>The WD Digital Caviar Black WD2002FAEX draws 10.7 watts when reading/writing according to WD&#8217;s <a href="http://www.wdc.com/wdproducts/library/?id=213&amp;type=8">own specifications</a>.</p>
<p>Let&#8217;s figure out the percentage of power use a single WD2002FAEX drive would require: (10.7W / (6.3A * 19V)) * 100 = 8.94%.  8.94% * 4 disks = 35.76%.  Not so shabby &#8212; but remember, we also have no idea how much power the Intel Atom motherboard, CPU, RAM, and other things require.  Let&#8217;s just assume 35.76% is acceptable.</p>
<p>Now consider drive spin-up, which draws <a href="http://www.storagereview.com/guide/spinPower.html">significantly more power</a> than during normal operation: almost 4x more.  StorageReview&#8217;s explanation (which I&#8217;ve linked) does not take into consideration technology like <a href="http://en.wikipedia.org/wiki/Spin-up">SSU or PUIS</a>, which we do know the WD2002FAEX supports.  But let&#8217;s assume worst-case scenario, that the WD Sentinel DX4000 spins up all the drives simultaneously.</p>
<p>8.94% * 4 disks * 4x more power = 143.04%.  Oh dear&#8230;</p>
<p>Considering that I cannot find a single white paper or technical document describing in detail the gains from using SSU/PUIS (only actual SATA-IO specifications for how to implement it as part of the ATA protocol), I cannot determine what the power savings are.  However, to be fair, I do imagine that in a worst-case scenario the WD Sentinel DX4000 might spin up each drive with 5 seconds of delay between drives.  That means the entire unit would have to wait 20 full seconds before becoming even remotely operational.  That probably isn&#8217;t what happens in real life.  :-)</p>
<p>I cannot believe that for a US$1500 product, Western Digital would choose this kind of configuration.  Why is it so hard for companies to use internal transformers?  Nobody in a SoHo or business-class environment wants in-line transformers or &#8220;wall warts&#8221;.  Using an internal transformer/PSU would extend the depth of the device by 1-2 inches at most.  RFI is not a concern given good shielding, and airflow wouldn&#8217;t be a problem assuming the PSU was placed along the outside edge and provided with ventilation slits (I&#8217;d be more worried about the drives overheating than the PSU!).</p>
<p>Consider that those in-line transformers are usually of sub-par quality, and are usually the first thing to die/go out on you.</p>
<p>What is it going to take for companies to this kind of cheap engineering?  Even the <a href="http://terrywhite.com/techblog/wp-content/uploads/2011/03/Drobo_FS_Back.jpg">Drobo FS</a> uses the same configuration, although the <a href="http://raoulpop.files.wordpress.com/2009/11/drobo-pro-and-drobo-elite1.jpg">DroboPro and DroboElite</a> definitely got it right (not to mention costs US$250 less than the WD Sentintel DX4000).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/1750/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/1750/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&#038;blog=1703455&#038;post=1750&#038;subd=koitsu&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://koitsu.wordpress.com/2012/01/02/wd-sentinel-dx4000-unacceptable-power-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/678457a454d097e5452a6f6b098d4965?s=96&#38;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
	</channel>
</rss>
