2

For using an Windows XP with SSD, it is recommended that you align your partitions manually (or use eg. 7 for partitioning).

Background

It is explained that XP by its default alignment needs to use two "disk operations" (generally speaking) instead of only one because it aligns partitions like this:

NAND page vs partition alignment

source via "Micron"

Then guides recommend you to use diskpar.exe with an offset of 128 to set up a better partition alignment. For example this one:

diskpar with 128 offset

Problem

What I don't understand is that if there is 63 sectors per track as shown in the diskpar information printout, then two track takes 126 sectors and thus the third track should start at offset 127 I suppose.

Thinking

I thought that I may mess up indexing, here is my thinking. First I thought that both SectorsPerTrack and offset is indexed base-1, since the former only makes sense as a counter like that, and the latter should tell me which is the sector count where I want to start. 128 wouldn't make sense because the count value for the sector where I skipped 2*63 sectors is 127.

So then I asserted that SectorsPerTrack is indexed base-1, but offsets are indexed base-0. (Well "offsets" may not exactly be "indexed" but its value can be 0.) So offset can be thought of "how many sectors to skip". If you don't skip any sectors your offset is 0. If you skip the first sector your offset is 1. If I want to skip a track that is reported to contain 63 sectors then my offset should be 63. And if I want to skip two tracks my offset should be 126. But this is now off by two to 128.

I thought about SectorsPerTrack may being 0-indexed. But this would not make sense. "0 sectors per track" should mean just 0 sectors. There is no reason to use a 0-based indexing here as it would just introduce confusion for nothing.

edit Something that would make sense but I can not confirm is this: If the NAND pages are what matter and they are 4096 bytes in size and I should disregard Sectors and Tracks as something that is purely legacy information, may be even fake and has nothing to do with the reason for alignment, then 128 sectors (each 512 byte) being 16 NAND pages, would put the partition to the beginning of the next NAND page that may be the real reason. If this is the case, could anyone back it up with some reference information / source / citation?

Question

So in the end, I do not understand: why do these guides suggest using an 128 sector offset?

0

1 Answer 1

7

What I don't understand is that if there is 63 sectors per track as shown in the diskpar information printout, then two track takes 126 sectors and thus the third track should start at offset 127 I suppose.

The 63 sectors per track is on old BIOS lie having nothing to do with reality. It's just that somebody reserved 6 bits for this field some thousands years ago. The disks became much larger in the meantime and the sectors per track number meaningless as there are more sectors on the outer (longer) tracks than near the spindle axis. With SSD this all became even more absurd.

Maxing out the numbers was necessary in order to be able to use big disks. That's why all disks seem to have 255 heads and 63 sectors per track. These are mines:

Disk /dev/sde: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors

You don't really believe that all my disks look like this.

Maybe the links in my SSD question could help.

3
  • The 64 sectors per track is on old BIOS lie - did you meant 63? The numbers actually say 63.
    – n611x007
    Oct 13, 2013 at 16:05
  • @naxa: Thx, fixed.
    – maaartinus
    Oct 13, 2013 at 16:46
  • The SSD alignment calculator from your question is a great help.
    – n611x007
    Oct 13, 2013 at 16:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .