NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Disks w/non-512-byte sectors?
On Sun, 18 Jan 2015 21:08:48 -0500, Greg Troxel <gdt%ir.bbn.com@localhost> wrote:
> Agreed on all of that, but to respond to John's question: the disk
> has 4K sectors on the media, but has an interface that acts like 512B
> sectors. So if you do a write which is aligned to start on 4K and is
> a multiple of 4K, it will be a straightforward write of some number
> of underlying whole sectors. If the write is misaligned or fractional,
> it will result in read-modify-write by the disk controller.
I was of the impression that the 4K sector business was to address(!)
the problem of disk capacity outrunning the addressing capacity of the
Task File interface on IDE/PATA/SATA disks, evening with all the funky
bit reassignments to squeeze out more address space and LBA tricks.
The above sounds like it's just a performance issue at the DAC level.
Admittedly, larger sectors with less overhead per sector is going to
speed things up. I seem to have had a completely erroneous view of it.
> In particular, the common PCism of starting at sector 63 (1 floppy
There are so many things I consider broken about the IDE/ATA/PATA
interface and legacy-mode SATA. Particularly the short-sightedness
of designers building to PC-DOS limitations and operating systems
taking the old WD1002HDO limitations as permanent. Sector numbers
starting at 1 instead of 0, wasting 75% of the address space with
a limit of 63 sectors/track. (I did some work interfacing then-modern
IDE disks to old Z80 CP/M systems in the mid-1990s).
Oddly enough, from my perspective SCSI actually eventually won--it's
just wearing a couple of funny hats (SATA, SAS). If only FibreChannel
hadn't been prohibitively expensive (I think artificially so) we'd be
at least a decade ahead in storage technology than where we are now.
> track in) is a really bad idea. So many disks are 4K these days (or
> the ones you buy later to replace a failed member of a RAID set) that
I wonder if some I already have are 4K underneath. That might account
for the rather poor performance I get. Is there any way to tell? I
forget where IBM/Hitachi disks ended up so I know where to look.
> all partitions should be aligned to 8 sectors, or arguably 64 or some
> higher power of 2. Amazingly 1MB as mlelstv@ suggests is only 2048
> sectors. It's hard to believe we once used disks with only about 5000
> sectors (e.g. DEC RK05, on which I used 6th Edition...). Wasting part
> of 1MB seems bad until you realize it's only 0.25 ppm of a 4T disk!
Yes, I remember using things like that, although I don't go that far
back with UN*X. I actually have the opposite problem sometimes. The
available disks are so huge that some of my applications will end up
wasting a good 90% or more of the available space. Finding SMALL disks
is difficult and expensive.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index