Skip to contentSkip to conversation

What are the correct mkfs.xfs parameters for a lying WD-EARS HDD?

DISCUSSION Matthias Schniedermeyer 4 participants 7 messages Mar 8, 2010 – Mar 10, 2010

lore
Share & tools
lore
#0 lore raw

Hi

More than a month ago i bought 4 Western Digital WD15EARS (1.5 TB) which are (AFAIK) the first general/commercial available 4k sector SATA-HDDs.

Unfortunatly the HDDs lie about the 4k physical sector size and the most prominent drawback is a worse than abysmal delete performance. ("Normal" Read & Write-performance is OK)

So if i wanted to (re-)mkfs the filesystems what would the correct parameters be?

Kernel/Userspace is pretty recent (Debian-SID):
mkfs.xfs version 3.1.1, kernel v2.6.33, util-linux 2.16.0 Not that that should matter when the HDDs lies.

Bis denn

Signature · 9 lines
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#1 lore raw
Quoted 10 lines · Matthias Schniedermeyer

Hi

More than a month ago i bought 4 Western Digital WD15EARS (1.5 TB) which are (AFAIK) the first general/commercial available 4k sector SATA-HDDs.

Unfortunatly the HDDs lie about the 4k physical sector size and the most prominent drawback is a worse than abysmal delete performance. ("Normal" Read & Write-performance is OK)

Quoted 6 lines

So if i wanted to (re-)mkfs the filesystems what would the correct parameters be?

Kernel/Userspace is pretty recent (Debian-SID):
mkfs.xfs version 3.1.1, kernel v2.6.33, util-linux 2.16.0 Not that that should matter when the HDDs lies.

Recent kernel+util-linux-ng++fdisk+parted+xfsprogs -should- do the right thing for you.... Oh, but this was maybe the drive that didn't output the right stuff when queried.

Make sure your partitions, if any, are on 4k boundaries.(*) older fdisk at least won't do this by default, not sure about parted.

once that is done, tell mkfs.xfs "-s size=4096" to set the 4k sector size (again, all-upstream should do this magically for sane drives)

-Eric

(*)unless the drive has an offset to make 512-sector 63 line up on a nice boundary... in which case I guess you could experiment with perf both ways to be sure...

Quoted 3 lines

Bis denn

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw
Quoted 14 lines · Eric Sandeen
Quoted 13 lines · Matthias Schniedermeyer

Hi

More than a month ago i bought 4 Western Digital WD15EARS (1.5 TB) which are (AFAIK) the first general/commercial available 4k sector SATA-HDDs.

Unfortunatly the HDDs lie about the 4k physical sector size and the most prominent drawback is a worse than abysmal delete performance. ("Normal" Read & Write-performance is OK)

So if i wanted to (re-)mkfs the filesystems what would the correct parameters be?

Quoted 6 lines
Quoted 3 lines

Kernel/Userspace is pretty recent (Debian-SID):
mkfs.xfs version 3.1.1, kernel v2.6.33, util-linux 2.16.0 Not that that should matter when the HDDs lies.

Recent kernel+util-linux-ng++fdisk+parted+xfsprogs -should- do the right thing for you.... Oh, but this was maybe the drive that didn't output the right stuff when queried.

hdparm -I /dev/sdg | grep "Sector size"
Logical/Physical Sector size: 512 bytes

hdparm -V
hdparm v9.27

I vagely remember a posting on LKML that said it's a "known problem" that the WD??EARS lie about physical sector size.

Quoted 2 lines

Make sure your partitions, if any, are on 4k boundaries.(*) older fdisk at least won't do this by default, not sure about parted.

It's an encrypted loop at am 4k offset to leave space for a fake MBR (and more importantly a signature for a custom udev-script).

Quoted 1 line

once that is done, tell mkfs.xfs "-s size=4096" to set the 4k sector size

So that should be enough?
Time for backup/mkfs/restore then.

Bis denn

Signature · 9 lines
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#5 lore raw
In reply to Eric Sandeen
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Sandeen <[email protected]> writes:

Eric> Make sure your partitions, if any, are on 4k boundaries.(*) older Eric> fdisk at least won't do this by default, not sure about parted.

You can use the expert mode in fdisk to ensure that the partition begins on a 4KB boundary.

Eric> (*)unless the drive has an offset to make 512-sector 63 line up on Eric> a nice boundary... in which case I guess you could experiment with Eric> perf both ways to be sure...

EARS is the one that's lying about the physical block size. It's zero-aligned unless somebody messed with the jumper.

Signature · 6 lines
Martin K. Petersen	Oracle Linux Engineering

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#6 lore raw
Quoted 7 lines · Martin K. Petersen
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Sandeen <[email protected]> writes:

Eric> Make sure your partitions, if any, are on 4k boundaries.(*) older Eric> fdisk at least won't do this by default, not sure about parted.

You can use the expert mode in fdisk to ensure that the partition begins on a 4KB boundary.

and use -u to give it sector units ...

Quoted 7 lines

Eric> (*)unless the drive has an offset to make 512-sector 63 line up on Eric> a nice boundary... in which case I guess you could experiment with Eric> perf both ways to be sure...

EARS is the one that's lying about the physical block size. It's zero-aligned unless somebody messed with the jumper.

Ok, that's good.

Thanks Martin!

-Eric

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw
In reply to Matthias Schniedermeyer
Quoted 12 lines · Matthias Schniedermeyer
Quoted 11 lines · Eric Sandeen
Quoted 10 lines · Matthias Schniedermeyer

Hi

More than a month ago i bought 4 Western Digital WD15EARS (1.5 TB) which are (AFAIK) the first general/commercial available 4k sector SATA-HDDs.

Unfortunatly the HDDs lie about the 4k physical sector size and the most prominent drawback is a worse than abysmal delete performance. ("Normal" Read & Write-performance is OK)

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

So if i wanted to (re-)mkfs the filesystems what would the correct parameters be?

once that is done, tell mkfs.xfs "-s size=4096" to set the 4k sector size

So that should be enough?
Time for backup/mkfs/restore then.

backup/mkfs/restore is finished.

I'm currently testing delete-performance.
And it improved to abysmal performance. (As expected)

Read-latency, while deleting, has also improved drastically. Before the FS was near unusable while deleting. But that is also to be expected from such a HDD when it is doing RMW like there is no tomorrow. ;-)

Bis denn

Signature · 9 lines
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#4 lore raw

Hi,

You can use GPT fdisk (gdisk) to do the partitioning. The author had the exact same problem with the performance of WD 4 kB sector drives. The tool automatically sets the partition start and end at 4 kB boundaries. You can in fact set the partition start and end at any sector you want.

It is the firmware in the WD drives that translates the physical 4 kB sector to 512 byte sectors.

GL

Quoted 51 lines · Matthias Schniedermeyer

From: Matthias Schniedermeyer <[email protected]>
Subject: Re: What are the correct mkfs.xfs parameters for a lying WD-EARS HDD?
To: "Eric Sandeen" <[email protected]>
Cc: [email protected]
Date: Wednesday, 10 March, 2010, 5:41 AM

Quoted 6 lines · Matthias Schniedermeyer
Quoted 5 lines · Eric Sandeen
Quoted 4 lines · Matthias Schniedermeyer

Hi

More than a month ago i bought 4 Western

Digital WD15EARS (1.5 TB) which

Quoted 1 line
Quoted 1 line
Quoted 1 line

are (AFAIK) the first general/commercial

available 4k sector SATA-HDDs.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Unfortunatly the HDDs lie about the 4k

physical sector size and the most

Quoted 1 line
Quoted 1 line
Quoted 1 line

prominent drawback is a worse than abysmal

delete performance.

Quoted 1 line
Quoted 1 line
Quoted 1 line

("Normal" Read & Write-performance is

OK)

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

So if i wanted to (re-)mkfs the filesystems

what would the correct

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

parameters be?

once that is done, tell mkfs.xfs "-s size=4096"

to set the 4k sector size

Quoted 3 lines

So that should be enough?
Time for backup/mkfs/restore then.

backup/mkfs/restore is finished.

I'm currently testing delete-performance.
And it improved to abysmal performance. (As expected)

Read-latency, while deleting, has also improved drastically. Before the
FS was near unusable while deleting. But that is also to be expected
from such a HDD when it is doing RMW like there is no tomorrow. ;-)

Quoted 16 lines

Bis denn

Signature · 12 lines
Real Programmers consider "what you see is what you get" to
be just as 
bad a concept in Text Editors as it is in women. No, the
Real Programmer
wants a "you asked for it, you got it" text editor --
complicated, 
cryptic, powerful, unforgiving, dangerous.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

New Email names for you!
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/sg/

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs