Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] 1-Terabyte drives - 4K sector sizes? -> bar performance so far
Date: Mon, 15 Feb 2010 03:18:25
Message-Id: 5bdc1c8b1002141917tabba6a6g511e9aa8e68682bc@mail.gmail.com
In Reply to: Re: [gentoo-user] 1-Terabyte drives - 4K sector sizes? -> bar performance so far by Willie Wong
1 2010/2/14 Willie Wong <wwong@××××××××××××××.edu>:
2 > On Mon, Feb 15, 2010 at 01:48:01AM +0100, Frank Steinmetzger wrote:
3 <SNIP>
4 >>
5 >> action         SS (1st)   SS (2nd)   SS+2       SS+4       SS+6       SS+8
6 >> -------------+----------+----------+----------+----------+----------+----------
7 >> untar portage  3m12.517   2m55.916   1m46.663   1m35.341   1m47.829   1m43.677
8 >> rm portage     4m11.109   3m54.950   3m18.820   3m11.378   3m21.804   3m12.433
9 >> cp 1GB file 0m21.383 0m13.558 0m14.920 0m12.813 0m13.407 0m13.681
10
11
12
13
14 >
15 > Instead of guessing using this rather imprecise metric, why not just
16 > look up the serial number of your drive and see what the physical
17 > sector size is? If you don't want to open your box, you can usually
18 > get the information from dmesg.
19
20
21 hdparm capital eye works very nicely:
22
23 gandalf ~ # hdparm -I /dev/sda
24
25 /dev/sda:
26
27 ATA device, with non-removable media
28 Model Number: WDC WD10EARS-00Y5B1
29 Serial Number: WD-WCAV55464493
30 Firmware Revision: 80.00A80
31 Transport: Serial, SATA 1.0a, SATA II Extensions,
32 SATA Rev 2.5, SATA Rev 2.6
33 Standards:
34 Supported: 8 7 6 5
35 Likely used: 8
36 <SNIP>
37
38 >
39 > Only caveat: don't trust the harddrive to report accurate geometry.
40 > This whole issue is due to the harddrives lying about their physical
41 > geometry to be compatible with older versions of Windows. So the
42 > physical sector size listed in dmesg may not be the real one. Which is
43 > why you are advised to look up the model number on the vendor's
44 > website yourself to determine the physical sector size.
45 >
46 > W
47 > --
48 > Willie W. Wong                                     wwong@××××××××××××××.edu
49
50 Very true...
51
52 Since this thread started and you help (me at least1) understand what
53 I was dealing with I got in contact with Mark Lord - the developer and
54 maintainer of the hdparm program. I was interested in seeing if we
55 could get hdparm to recognize this aspect of the drive. He was very
56 interested and asked me to send along additional info which he then
57 analyzed and decided that, at least at this time, even drives that we
58 __know__ are 4K sector sizes are not implementing any way of reading
59 it from the drive's firmware which is supported, at least in the newer
60 SATA specs. With that he decided that even for his own new 4K drives
61 he cannot do anything except either assume they are 4K and partition
62 appropriately or look up specs specifically as you suggest.
63
64 Currently I'm partial to the idea that all my sector starting
65 addresses will end in '000'. It's easy to remember and at most that
66 wastes (I think) 512K bytes between sectors so it's not much in terms
67 of the overall disk space. Just a couple of megabyte on a drive with 4
68 partitions.
69
70 = Mark