You are not logged in.

#1 2010-03-03 14:26:26

punkmikey
Member
From: Sheffield, UK
Registered: 2008-12-27
Posts: 12

4kb Advanced Format Drives & Partitioning

As people are probably aware, Western Digital have started shipping their 'Advanced Format' drives which use 4k sectors instead of 512 bytes. Quick summary here: http://www.anandtech.com/storage/showdoc.aspx?i=3691.

I've also seen multiple posts around the internets about people getting terrible performance with these drives, even though in theory they should yield better slightly performance than their 512b counterparts. So, a small step forward in storage technology and reports of poor performance. What's is the discerning geek to do? Buy one to investigate of course! One of the WD 1TB drives (WD10EARS) should be on its way to me in the next couple of days.

After a bit of digging, it appears most problems stem from the use of MS-DOS partition tables which start the first partition on sector 63, which is not divisible by 8 meaning that the sectors are not aligned properly. Or something(?).

So, how can I check what sector size the drive is reporting (hdparm?)? How can I make sure the first partition is aligned properly i.e. to a sector divisible by 8 such as 40, 64 or 80 ((G)parted?)? How do I create a GUID Partition Table in Linux (I understand MS-DOS version is used by default for compatibility). And finally, would changing the alignment or switching to GPT cause any problems with booting (either Linux or Windows)?

Hopefully someone who knows more about this than me can point me in the right direction. The drive will eventually just be added as an extra storage device, but I wanted to have a look at any potential benefits/limitations of these new Advanced Format drives as it may be beneficial for my job etc.

I'll also be installing Windows XP & 7 on the drive to see how they handle it as well (it'll be formatted with ext4 or XFS afterwards though smile).

Offline

#2 2010-03-03 15:25:23

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: 4kb Advanced Format Drives & Partitioning

Yeah, read that article too. There's a paragraph that starts like this:

Notably, Linux and Mac OS X are not affected by this issue.

That got me thinking that maybe Linux is not affected by this issue. smile

I'm open to correction, but overall I'm not likely to be concerned either way until I'm in the market for a new drive.

Offline

#3 2010-03-03 17:13:42

punkmikey
Member
From: Sheffield, UK
Registered: 2008-12-27
Posts: 12

Re: 4kb Advanced Format Drives & Partitioning

Yep, so it says. But I also read this: http://www.osnews.com/story/22872/Linux … ard_Drives

Which suggests that maybe a bit of user intervention/magic is required before they work as expected, hence me deciding to get one of these drives and look into it myself. As I work do pre/post sales tech support, I figured it would be worth looking into, even if the end result is "Linux works, Windows fails". lol.

Offline

#4 2010-03-03 21:19:54

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: 4kb Advanced Format Drives & Partitioning

Interesting - thanks for the link.

Offline

#5 2010-04-07 13:44:02

keeperofdakeys@hotmailcom
Member
Registered: 2010-04-07
Posts: 5

Re: 4kb Advanced Format Drives & Partitioning

Edit:
Been doing some more reading, namely http://www.linuxquestions.org/questions … ost3879772
Since I have the old fdisk (I don't know what arch uses), I used -u and I could just change the partitions starting sector to 63 instead of 64. I tried both values and I seem to still be getting good transfer speeds in linux, I will have to try it on XP to determine what is happening properly

< suggest reading above before following link >
Try reading this, post 5 http://community.wdc.com/t5/Desktop/Pro … 1EE7DF2C7#

From what I have read the slow speeds occur because the partition is started at sector 63, not 64, which makes the drive have to correct all sector calls (adding one to the sector reference). There are two solutions I have seen. Use an advanced tool like fdisk and try to set it to 64 manually, or try using a tool from western digital called WD align. It will take a partition that is not aligned and re-align it for you, from what I have read it will work faster on an empty partition.
I'm not totally sure on this, but from my understanding once the drive has a properly aligned partition, it will work perfectly on a XP box.

Last edited by keeperofdakeys@hotmailcom (2010-04-07 14:15:53)

Offline

#6 2010-04-07 16:34:56

punkmikey
Member
From: Sheffield, UK
Registered: 2008-12-27
Posts: 12

Re: 4kb Advanced Format Drives & Partitioning

When it turned up, I really couldn't be bothered performing any kind of tests. I just partitioned as normal and then used the advanced option in fdisk (x) to start the partition from sector 64. Then formatted (XFS) as usual. Getting about 60-70 MB/s write speed which is about what I'd expect for a 'green' drive.

Offline

#7 2010-04-08 01:55:16

keeperofdakeys@hotmailcom
Member
Registered: 2010-04-07
Posts: 5

Re: 4kb Advanced Format Drives & Partitioning

Here's an update.
I formatted my drive under linux using the default sectors, and I seemed to be able to get in the 20MB/s (usb), I then downloaded this tool: http://support.wdc.com/product/downloadsw.asp?sid=123 and let it re-align (faster with no data, it also says it may restart your computer). After that the copy seemed a little faster (although I had been getting 11MB/s in linux when I had gotten in the 20s when I tried formatting re-aligned.

So basically run the above program on a windows machine, with empty partitions and it should find and align all partitions that are bad. In linux starting them at sector 64 instead of 63 seemed to help, but I didn't test to see if the program then thought it was misaligned.

Offline

#8 2010-04-08 21:17:10

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: 4kb Advanced Format Drives & Partitioning

If you use fdisk with -c it will take care of all your alignment needs, don't forget you have to align _all_ partitions, not only the first.

From the tests I've done 'fdisk -c' will partition the drive exactly as it comes from factory, at least with just one partition, with more partitions fdisk will always put the start of the partitions in a sector divisible by 8. fdisk already warns that -c should be used, I guess flash disks also benefit from having partitions aligned (although the alignment boundaries may be different, if that is the case there is no gain).

You lose a little bit more space at the start of the disc this way but it's not really significant (the start of the first partition will be sector 2048, 512Byte sector that is).

I've seen somewhere (can't remember where) that parted (or gparted) will also leave all partitions aligned but I haven't tested that.

I can't say much about speed because the usb interface is the limiting factor here.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#9 2010-04-11 11:32:36

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: 4kb Advanced Format Drives & Partitioning


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#10 2010-08-09 16:09:43

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: 4kb Advanced Format Drives & Partitioning

I think a wiki page should be started for info on non-512 byte sector drives as these drives will have degraded performance if they are not properly partitioned and formatted.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

Board footer

Powered by FluxBB