<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Aligning filesystems to an SSD&#8217;s erase block size</title>
	<atom:link href="http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/feed/" rel="self" type="application/rss+xml" />
	<link>http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/</link>
	<description>Musings about Open Source, Linux, and Life by Theodore Tso</description>
	<lastBuildDate>Mon, 22 Feb 2010 22:39:59 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: A note about SSDs and partition alignment &#124; John Lewis: IT Support</title>
		<link>http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/comment-page-2/#comment-3065</link>
		<dc:creator>A note about SSDs and partition alignment &#124; John Lewis: IT Support</dc:creator>
		<pubDate>Thu, 18 Feb 2010 11:12:42 +0000</pubDate>
		<guid isPermaLink="false">http://thunk.org/tytso/blog/?p=265#comment-3065</guid>
		<description>[...]   17266689s   primary  ext3 3      17580032s  125204480s  107624449s  primary  ext3  http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/  [...]</description>
		<content:encoded><![CDATA[<p>[...]   17266689s   primary  ext3 3      17580032s  125204480s  107624449s  primary  ext3  <a href="http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/" rel="nofollow">http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/</a>  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Solid state hard drives</title>
		<link>http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/comment-page-2/#comment-2935</link>
		<dc:creator>Solid state hard drives</dc:creator>
		<pubDate>Mon, 18 Jan 2010 10:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://thunk.org/tytso/blog/?p=265#comment-2935</guid>
		<description>SSDs need to get cheaper and we need larger capacities. I wont be using SSDs anytime soon. Will be sticking to SATA for my personal computers and SCSI for my servers.</description>
		<content:encoded><![CDATA[<p>SSDs need to get cheaper and we need larger capacities. I wont be using SSDs anytime soon. Will be sticking to SATA for my personal computers and SCSI for my servers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oliver</title>
		<link>http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/comment-page-2/#comment-2858</link>
		<dc:creator>oliver</dc:creator>
		<pubDate>Wed, 13 Jan 2010 00:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://thunk.org/tytso/blog/?p=265#comment-2858</guid>
		<description>Re: #96

Absolutly. USB pen drivers have erase blocks as well. Trying to find them is hard though. I tried having no partition on them and just dumping an vfat filesystem on it, but the other OS didn&#039;t agree. Ubuntu/linux worked just fine with it.

I went ahead and created a partition starting at 1024 (fdisk -u /dev/sdb) which should be okay.

If you are using it linux exclusive, or your other OS has no issues with un-partitioned disks, just don&#039;t make a partition at all! if you use ext* you can specify a stride size still, I do think to have stride sizes for ext* makes them more efficient as bitmaps etc are on erase block sizes as well.</description>
		<content:encoded><![CDATA[<p>Re: #96</p>
<p>Absolutly. USB pen drivers have erase blocks as well. Trying to find them is hard though. I tried having no partition on them and just dumping an vfat filesystem on it, but the other OS didn&#8217;t agree. Ubuntu/linux worked just fine with it.</p>
<p>I went ahead and created a partition starting at 1024 (fdisk -u /dev/sdb) which should be okay.</p>
<p>If you are using it linux exclusive, or your other OS has no issues with un-partitioned disks, just don&#8217;t make a partition at all! if you use ext* you can specify a stride size still, I do think to have stride sizes for ext* makes them more efficient as bitmaps etc are on erase block sizes as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elias Amaral</title>
		<link>http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/comment-page-2/#comment-2857</link>
		<dc:creator>Elias Amaral</dc:creator>
		<pubDate>Thu, 07 Jan 2010 04:45:50 +0000</pubDate>
		<guid isPermaLink="false">http://thunk.org/tytso/blog/?p=265#comment-2857</guid>
		<description>This applies to usb pen drives too? I am with LVM partitions and didn&#039;t paid attention to this. I can only use firefox if I disable the cache. The UI delays I was experiencing was about 1~5 seconds!</description>
		<content:encoded><![CDATA[<p>This applies to usb pen drives too? I am with LVM partitions and didn&#8217;t paid attention to this. I can only use firefox if I disable the cache. The UI delays I was experiencing was about 1~5 seconds!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anon</title>
		<link>http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/comment-page-2/#comment-2828</link>
		<dc:creator>Anon</dc:creator>
		<pubDate>Mon, 21 Dec 2009 18:48:13 +0000</pubDate>
		<guid isPermaLink="false">http://thunk.org/tytso/blog/?p=265#comment-2828</guid>
		<description>Ted, has this improved? Storage vendors are apparently saying Linux/OSX/Vista+ have no issues (one assumes no performance loss) with 4k blocks - http://www.anandtech.com/storage/showdoc.aspx?i=3691 .</description>
		<content:encoded><![CDATA[<p>Ted, has this improved? Storage vendors are apparently saying Linux/OSX/Vista+ have no issues (one assumes no performance loss) with 4k blocks &#8211; <a href="http://www.anandtech.com/storage/showdoc.aspx?i=3691" rel="nofollow">http://www.anandtech.com/storage/showdoc.aspx?i=3691</a> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ZNiP</title>
		<link>http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/comment-page-2/#comment-2821</link>
		<dc:creator>ZNiP</dc:creator>
		<pubDate>Sat, 19 Dec 2009 18:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://thunk.org/tytso/blog/?p=265#comment-2821</guid>
		<description>I have a Samsung 128GB SSD in my laptop (model: MMCRE28G8MXP-0VBL1, firmware: VBM1EL1Q).  I would like to create my partitions so that they are aligned to erase block boundaries as suggested, but I can&#039;t find any information about this drive, like what the erase block size is.  I would also like to know if this SSD (with this firmware version) supports TRIM, and if so, how use that feature with ext4.  Thanks, any help is appreciated.</description>
		<content:encoded><![CDATA[<p>I have a Samsung 128GB SSD in my laptop (model: MMCRE28G8MXP-0VBL1, firmware: VBM1EL1Q).  I would like to create my partitions so that they are aligned to erase block boundaries as suggested, but I can&#8217;t find any information about this drive, like what the erase block size is.  I would also like to know if this SSD (with this firmware version) supports TRIM, and if so, how use that feature with ext4.  Thanks, any help is appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yuhong Bao</title>
		<link>http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/comment-page-2/#comment-2820</link>
		<dc:creator>Yuhong Bao</dc:creator>
		<pubDate>Fri, 18 Dec 2009 18:11:20 +0000</pubDate>
		<guid isPermaLink="false">http://thunk.org/tytso/blog/?p=265#comment-2820</guid>
		<description>WD just released the first 4K sector disks, calling it Advanced Format.
tytso: Care to blog about this?</description>
		<content:encoded><![CDATA[<p>WD just released the first 4K sector disks, calling it Advanced Format.<br />
tytso: Care to blog about this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oliver</title>
		<link>http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/comment-page-2/#comment-2812</link>
		<dc:creator>oliver</dc:creator>
		<pubDate>Fri, 11 Dec 2009 15:53:33 +0000</pubDate>
		<guid isPermaLink="false">http://thunk.org/tytso/blog/?p=265#comment-2812</guid>
		<description>I was actually thinking along the same lines myself #91.

What I was thinking of was, getting the LBA (which is &#039;physical&#039; enough) addresses of certain bits.
E.g. query your partition start&#039;s LBA, say LBA 4, which would be an alignment of 1k (512 *4) (this being for demonstration purposes). Then, query your md start block somehow, let&#039;s say this returns anything other than LBA 4 you are miss-aligned. Next query your FS start blok (or lvm) and same routine.
Then you know that your starting bits are all on the same blocks and thus physically aligned. Of course all other offsets need to match then, e.g. stride size etc etc.</description>
		<content:encoded><![CDATA[<p>I was actually thinking along the same lines myself #91.</p>
<p>What I was thinking of was, getting the LBA (which is &#8216;physical&#8217; enough) addresses of certain bits.<br />
E.g. query your partition start&#8217;s LBA, say LBA 4, which would be an alignment of 1k (512 *4) (this being for demonstration purposes). Then, query your md start block somehow, let&#8217;s say this returns anything other than LBA 4 you are miss-aligned. Next query your FS start blok (or lvm) and same routine.<br />
Then you know that your starting bits are all on the same blocks and thus physically aligned. Of course all other offsets need to match then, e.g. stride size etc etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas K.</title>
		<link>http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/comment-page-2/#comment-2810</link>
		<dc:creator>Nicholas K.</dc:creator>
		<pubDate>Wed, 09 Dec 2009 17:55:12 +0000</pubDate>
		<guid isPermaLink="false">http://thunk.org/tytso/blog/?p=265#comment-2810</guid>
		<description>Regarding my previous comment and alignment verification in particular (sorry, apparently I&#039;m not thinking clearly, too tired trying to set up PXE boot on a silly machine):

Maybe it would be possible to write a few files starting with a known magic value and then get their position on the disk relative to the start of the file system, using fs-specific commands? Then one would check the disk on a physical level with &quot;dd skip=$(calculated position of fs start + position of files IN the fs, rounded at 128k multiples)&quot; trying to find those magic numbers. But this has several drawbacks: It assumes that the fs is contiguously allocated (no LVM!) and that the SSD itself starts with an aligned (=full) block (a safe assumption, i think) and also still requires some calculations. Also it would be fs-specific. But it could be automated.

Still, trying a few values and observing the impact on performance would probably be easier, although time-consuming. Performance is what we care about after all. However, performance differences could be VERY small, since generation 2 drives tend to be a bit too &quot;smart&quot;. Do you know any reliable and suitable benchmark? (Maybe bonnie++ ?)

The problem with that method is that performance differences could be negligible (and thus not enough to check the alignment), but the impact of misalignment on the drive wearing could still be very significant.

Oh well! I hope that my new, shiny SSD is smart enough by itself! Sorry for the bad English,
    Nicholas K.</description>
		<content:encoded><![CDATA[<p>Regarding my previous comment and alignment verification in particular (sorry, apparently I&#8217;m not thinking clearly, too tired trying to set up PXE boot on a silly machine):</p>
<p>Maybe it would be possible to write a few files starting with a known magic value and then get their position on the disk relative to the start of the file system, using fs-specific commands? Then one would check the disk on a physical level with &#8220;dd skip=$(calculated position of fs start + position of files IN the fs, rounded at 128k multiples)&#8221; trying to find those magic numbers. But this has several drawbacks: It assumes that the fs is contiguously allocated (no LVM!) and that the SSD itself starts with an aligned (=full) block (a safe assumption, i think) and also still requires some calculations. Also it would be fs-specific. But it could be automated.</p>
<p>Still, trying a few values and observing the impact on performance would probably be easier, although time-consuming. Performance is what we care about after all. However, performance differences could be VERY small, since generation 2 drives tend to be a bit too &#8220;smart&#8221;. Do you know any reliable and suitable benchmark? (Maybe bonnie++ ?)</p>
<p>The problem with that method is that performance differences could be negligible (and thus not enough to check the alignment), but the impact of misalignment on the drive wearing could still be very significant.</p>
<p>Oh well! I hope that my new, shiny SSD is smart enough by itself! Sorry for the bad English,<br />
    Nicholas K.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas K.</title>
		<link>http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/comment-page-2/#comment-2809</link>
		<dc:creator>Nicholas K.</dc:creator>
		<pubDate>Wed, 09 Dec 2009 00:30:08 +0000</pubDate>
		<guid isPermaLink="false">http://thunk.org/tytso/blog/?p=265#comment-2809</guid>
		<description>Hello Ted!
This is a late reply, but as a PC hobbyist (and Linux user) I&#039;ve really enjoyed your posts, in particular the ext4 and SSD-related stuff.

I&#039;ve ordered an Intel G2 solid state drive and it should arrive in a few days, so in the meantime I decided to apply your instructions on a regular hard-drive and dd the result on the SSD once it arrives. However, I won&#039;t be using LVM and this poses some problems. I&#039;ve got two questions:
1) I used cfdisk and manually set &#039; -h 224 -s 56 &#039; but I had to create quite a few &quot;logical&quot; partitions. Doesn&#039;t that screw up the alignment? According to Wikipedia the Extended Boot Record takes up some space...
http://en.wikipedia.org/wiki/Extended_boot_record
2) Is there any method to verify the alignment of the data of a data-filled, arbitrary partition regardless of the partitioning method used (MBR/GPT/LVM etc), at least when using ext3/ext4? (Without having to repartition or calculate by hand!) I&#039;m thinking something like a benchmark-based program but it probably doesn&#039;t exist yet (and it would probably require write access).

Thank you in advance. Greetings from Europe,
    Nicholas K.

PS. Keep up your great kernel-hacking job!</description>
		<content:encoded><![CDATA[<p>Hello Ted!<br />
This is a late reply, but as a PC hobbyist (and Linux user) I&#8217;ve really enjoyed your posts, in particular the ext4 and SSD-related stuff.</p>
<p>I&#8217;ve ordered an Intel G2 solid state drive and it should arrive in a few days, so in the meantime I decided to apply your instructions on a regular hard-drive and dd the result on the SSD once it arrives. However, I won&#8217;t be using LVM and this poses some problems. I&#8217;ve got two questions:<br />
1) I used cfdisk and manually set &#8216; -h 224 -s 56 &#8216; but I had to create quite a few &#8220;logical&#8221; partitions. Doesn&#8217;t that screw up the alignment? According to Wikipedia the Extended Boot Record takes up some space&#8230;<br />
<a href="http://en.wikipedia.org/wiki/Extended_boot_record" rel="nofollow">http://en.wikipedia.org/wiki/Extended_boot_record</a><br />
2) Is there any method to verify the alignment of the data of a data-filled, arbitrary partition regardless of the partitioning method used (MBR/GPT/LVM etc), at least when using ext3/ext4? (Without having to repartition or calculate by hand!) I&#8217;m thinking something like a benchmark-based program but it probably doesn&#8217;t exist yet (and it would probably require write access).</p>
<p>Thank you in advance. Greetings from Europe,<br />
    Nicholas K.</p>
<p>PS. Keep up your great kernel-hacking job!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
