On Sun, Feb 7, 2010 at 6:08 PM, Willie Wong <ww...@math.princeton.edu> wrote:
> On Sun, Feb 07, 2010 at 01:42:18PM -0800, Mark Knecht wrote:
>>    OK - it turns out if I start fdisk using the -u option it show me
>> sector numbers. Looking at the original partition put on just using
>> default values it had the starting sector was 63 - probably about the
>> worst value it could be. As a test I blew away that partition and
>> created a new one starting at 64 instead and the untar results are
>> vastly improved - down to roughly 20 seconds from 8-10 minutes. That's
>> roughly twice as fast as the old 120GB SATA2 drive I was using to test
>> the system out while I debugged this issue.
>
> That's good to hear.
>
>>    I'm still a little fuzzy about what happens to the extra sectors at
>> the end of a track. Are they used and I pay for a little bit of
>> overhead reading data off of them or are they ignored and I lose
>> capacity? I think it must be the former as my partition isn't all that
>> much less than 1TB.
>
> As far as I know, you shouldn't worry about it. The
> head/track/cylinder addressing is a relic of an older day. Almost all
> modern drives should be accessed via LBA. If interested, take a look
> at the wikipedia entry on Cylinder-Head-Sector and Logical Block
> Addressing.
>
> Basically, you are not losing anything.
>
> Cheers,
>
> W
> --
> Willie W. Wong                                     ww...@math.princeton.edu
> Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire
>         et vice versa   ~~~  I. Newton
>
>

Hi,
   Yeah, a little more study and thinking confirms this. The sectors
are 4K. WD put them on there. The sectors are 4K.

   Just because there might be extra physical space at the end of a
track doesn't mean I can ever use it.

   The sectors are 4K and WD put them on there and they've taken ALL
that into account already. They are 4K physically with ECC but
accessible by CHS  and by LBA in 512B chunks. The trick for speed at
the OS/driver level is to make sure we are always grabbing 4K logical
blocks from a single 4K physical sector off the drive. If we do it's
fast. If we don't and start asking for a 4K block that isn't in a
single 4K physical block then it becomes very slow as the drive
hardware/firmware/processor has to do multiple reads and piece it
together for us which is slow. (VERY slow...) By using partitions
mapped to sector number values divisible by 8 we do this. (8 * 512B =
4K)

   The extra space at the end of a track/cylinder is 'lost' but it was
lost before we bought the drive because the sectors are 4K so there is
nothing 'lost' by the choices we make in fdisk. I must remember to use
fdisk -u to see the sector numbers when making the partitions and
remember to do some test writes to the partition to ensure it's right
and the speed is good before doing any real work.

   This has been helpful for me. I'm glad Valmor is getting better
results also.

   I wish I had checked the title before I sent the original email it
was supposed to be

1-Terabyte drives - 4K sector sizes? -> bad performance so far

Maybe sticking that here will help others when they Google for this later.

Cheers,
Mark

Reply via email to