VOGONS


First post, by songoffall

User metadata
Rank Member
Rank
Member

I know this topic is more discussed in relation to SSD and other flash media, as partition misalignment will cause faster wear of flash memory.

I had surprisingly long boot times on one of my Windows XP machines. The HDD health was fine, the BIOS settings were normal, the drivers were installed. I wouldn't call the system slow, the specs are as follows:

MB Asus P5B
CPU Intel Core2Duo E6850 3GHz
RAM 2x1Gb DDR2 800MTs, dual channel mode
GPU Asus GeForce 8600GT Silent
HDD Seagate Barracuda 75Gb 7200rpm SATA

The boot times for an almost clean install of Windows XP were >1 minute, after POST to desktop, which was quite surprising, even for a retro machine.

So after exhausting all other options I set up the necessary software, Minitool Partition Wizard Free Edition 9.1 and Paragon Alignment Tool 4 and checked for partition misalignment.

For those new to the topic, partitions are supposed to be aligned in the same way the drive is physically organized in sectors, and a proper partition's beginning should be on a sector that has an address that is a multiple of 8.

Misalignment happens when partitioning the hard drive, especially newer and larger hard drives on retro operating systems. On HDDs, it will affect performance. On flash media like SSDs, SD and CF cards it will also affect the longevity of the media.

My boot disk was misaligned, and as it was mostly a clean install, fixing the alignment did not take long. After a restart, my boot times were reduced to 40 seconds, after POST to desktop, and I feel like the overall responsively of the system has improved too.

As I am yet to find software to align partitions on Windows 98 SE, I took apart my other computers, took the hard drives out, hooked them to the XP machine and checked them for misalignment. And my heart sank at what I saw. Almost every machine that was not as fast as I expected it to be had partition misalignment issues.

At this point in time, I'm aligning all the hard drives that had this problem. And by the end of it, I'll be able to see if the effect is the same on other machines too.

Care to share your experience with this issue? I feel like it is not discussed as much as it should be.

Compaq Deskpro 2000/P2 300MHz/256Mb SDRAM/Matrox Mystique/Sound Blaster AWE 32 Value/Aureal Vortex 2
MSI 865P Neo/Pentium 4 HT 3.0GHz/512Mb DDR DRAM/GeForce FX 5500/Creative Audigy 2
Asus P5Q Pro/Core2 Quad Q9400/2Gb DDR2/GeForce 8800GT/Creative X-Fi

Reply 1 of 12, by RetroPCCupboard

User metadata
Rank Member
Rank
Member

Funny. I just watched a video on partition alignment today, and downloaded Minitool Partition Wizard. I was unable to find 9.1 though. I downloaded 10.2 of the Windows version, and also a versions 7 and 8 bootable CD. I assume those will work on Win98 machines, as long as the machine supports booting from CD. There was also flash bootable images, but I didn't download those.

Reply 2 of 12, by weedeewee

User metadata
Rank l33t
Rank
l33t

maybe you can try the following.
partition a harddisk with msdos, pcdos, freedos, w95, w98, wme, w2k, wxp, wvista, w7, ... linux, bsd, ... os2, ...
and after each partition creation use your alignment program to check for misalignment and report here your findings 😀

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 3 of 12, by RetroPCCupboard

User metadata
Rank Member
Rank
Member

Note that I've not tested any of what I downloaded yet, so not sure if they support partition alignment.

Reply 5 of 12, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

Misalignment was the norm because the first partition would start on the second 'cylinder' which was represented as 63 sectors. What's the rationale to explain why this would affect performance on drives that use native 512-byte sectors?

GBAJAM 2024 submission on itch: https://90soft90.itch.io/wreckage

Reply 6 of 12, by songoffall

User metadata
Rank Member
Rank
Member
bakemono wrote on 2025-01-01, 22:06:

Misalignment was the norm because the first partition would start on the second 'cylinder' which was represented as 63 sectors. What's the rationale to explain why this would affect performance on drives that use native 512-byte sectors?

IBM has a paper on that which I am reading right now. As far as I know, it is an issue on drives with large sectors.

https://www.ibm.com/support/pages/misalignmen … n-be-twice-cost

Last edited by songoffall on 2025-01-01, 22:28. Edited 1 time in total.

Compaq Deskpro 2000/P2 300MHz/256Mb SDRAM/Matrox Mystique/Sound Blaster AWE 32 Value/Aureal Vortex 2
MSI 865P Neo/Pentium 4 HT 3.0GHz/512Mb DDR DRAM/GeForce FX 5500/Creative Audigy 2
Asus P5Q Pro/Core2 Quad Q9400/2Gb DDR2/GeForce 8800GT/Creative X-Fi

Reply 7 of 12, by songoffall

User metadata
Rank Member
Rank
Member
weedeewee wrote on 2025-01-01, 21:43:

maybe you can try the following.
partition a harddisk with msdos, pcdos, freedos, w95, w98, wme, w2k, wxp, wvista, w7, ... linux, bsd, ... os2, ...
and after each partition creation use your alignment program to check for misalignment and report here your findings 😀

All my drives have a single partition.

From what I have found, misalignment had a correlation with the size and the age of the drive, and not the OS which formatted it.

My Conner CFS270A 270Mb had no misalignment problems. Neither did the 2.1Gb Seagate SCSI Hdd. SATA drives formatted in Windows XP, 150 and 500Gb, had no misalignment. SATA HDD, 75Gb, formatted in Windows XP, had misalignment. 40Gb Seagate HDD limited to 32Gb via jumper, formatted and used in a Pentium 2, Windows 98SE, had no misalignment. A Seagate 40Gb and a Maxtor 60Gb, used in another Windows 98 PC (Athlon XP 2000+) did have misalignment. So at this point in time I don't know why and how it happens.

What was important is - I was using those disks without even knowing they were misaligned. And fixing one of them shaved 20+ seconds off my boot time on one PC.

Compaq Deskpro 2000/P2 300MHz/256Mb SDRAM/Matrox Mystique/Sound Blaster AWE 32 Value/Aureal Vortex 2
MSI 865P Neo/Pentium 4 HT 3.0GHz/512Mb DDR DRAM/GeForce FX 5500/Creative Audigy 2
Asus P5Q Pro/Core2 Quad Q9400/2Gb DDR2/GeForce 8800GT/Creative X-Fi

Reply 8 of 12, by songoffall

User metadata
Rank Member
Rank
Member
Grem Five wrote on 2025-01-01, 21:57:

Phil mostly concentrates on flash media deterioration.

Compaq Deskpro 2000/P2 300MHz/256Mb SDRAM/Matrox Mystique/Sound Blaster AWE 32 Value/Aureal Vortex 2
MSI 865P Neo/Pentium 4 HT 3.0GHz/512Mb DDR DRAM/GeForce FX 5500/Creative Audigy 2
Asus P5Q Pro/Core2 Quad Q9400/2Gb DDR2/GeForce 8800GT/Creative X-Fi

Reply 9 of 12, by Zup

User metadata
Rank Oldbie
Rank
Oldbie
bakemono wrote on 2025-01-01, 22:06:

Misalignment was the norm because the first partition would start on the second 'cylinder' which was represented as 63 sectors. What's the rationale to explain why this would affect performance on drives that use native 512-byte sectors?

Maybe to be on the safe side.

Many disks have "hardware" 4k sectors but are capable to use "logical" 512 byte sectors.

The performance decreases (and wear increases!) when partition and/or clusters are misaligned with "hardware" sector size. Or so they say. In most of my flash cards, the sector and cluster size are way smaller than the ERASE BLOCK SIZE. So if your device has 128k memory page size, I guess the correct place to align partitions should be at 128k boundaries. Also, first cluster should be aligned to that boundary and the cluster size should be a 128k multiple... or you'll end erasing the whole page every time it has to erase a single cluster.

Modern OSs and software hide (or does not explain well) what are doing at every moment. Some questions...
- Alignment programs DO take care about first cluster alignment or only about start of partition alignment?
- Does an OS "know" how long is the erase block size on an flash device and/or takes it in account to minimize erase/write cycles?
- Or can the memory controller on the flash device "group" writes?

I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!

Reply 10 of 12, by songoffall

User metadata
Rank Member
Rank
Member

Just an update; unlike Windows XP, realigning the HDD partitions on the Windows 98SE computer did not result I any noticeable performance increase.

Compaq Deskpro 2000/P2 300MHz/256Mb SDRAM/Matrox Mystique/Sound Blaster AWE 32 Value/Aureal Vortex 2
MSI 865P Neo/Pentium 4 HT 3.0GHz/512Mb DDR DRAM/GeForce FX 5500/Creative Audigy 2
Asus P5Q Pro/Core2 Quad Q9400/2Gb DDR2/GeForce 8800GT/Creative X-Fi

Reply 11 of 12, by songoffall

User metadata
Rank Member
Rank
Member
Zup wrote on 2025-01-02, 08:51:
Modern OSs and software hide (or does not explain well) what are doing at every moment. Some questions... - Alignment programs D […]
Show full quote

Modern OSs and software hide (or does not explain well) what are doing at every moment. Some questions...
- Alignment programs DO take care about first cluster alignment or only about start of partition alignment?
- Does an OS "know" how long is the erase block size on an flash device and/or takes it in account to minimize erase/write cycles?
- Or can the memory controller on the flash device "group" writes?

That's actually a very good question. Will need to dig into the documentation to see if those features are well documented.

Minitools actually moved my primary partition 1mb ahead to align it, while Paragon did what I expected it to do.

In contrast, Paragon broke my Windows 98 installation (the MBR was fine, but after that I only got a pulsing cursor - no IO.SYS, no LOGO.SYS, no activity on the HDD).
Booting from Win98SE installation media and trying to run WIN would BSOD the system. I had no issues formatting the aligned partition and reinstalling Windows98SE. This time I remembered to backup my Morrowind saves.

Minitools did not break any of my Windows installations.

Compaq Deskpro 2000/P2 300MHz/256Mb SDRAM/Matrox Mystique/Sound Blaster AWE 32 Value/Aureal Vortex 2
MSI 865P Neo/Pentium 4 HT 3.0GHz/512Mb DDR DRAM/GeForce FX 5500/Creative Audigy 2
Asus P5Q Pro/Core2 Quad Q9400/2Gb DDR2/GeForce 8800GT/Creative X-Fi

Reply 12 of 12, by Disruptor

User metadata
Rank Oldbie
Rank
Oldbie
Zup wrote on 2025-01-02, 08:51:
Maybe to be on the safe side. […]
Show full quote
bakemono wrote on 2025-01-01, 22:06:

Misalignment was the norm because the first partition would start on the second 'cylinder' which was represented as 63 sectors. What's the rationale to explain why this would affect performance on drives that use native 512-byte sectors?

Maybe to be on the safe side.

Many disks have "hardware" 4k sectors but are capable to use "logical" 512 byte sectors.

The performance decreases (and wear increases!) when partition and/or clusters are misaligned with "hardware" sector size. Or so they say. In most of my flash cards, the sector and cluster size are way smaller than the ERASE BLOCK SIZE. So if your device has 128k memory page size, I guess the correct place to align partitions should be at 128k boundaries. Also, first cluster should be aligned to that boundary and the cluster size should be a 128k multiple... or you'll end erasing the whole page every time it has to erase a single cluster.

That's not the only thing your should consider.

Legacy operating systems use CHS address scheme and need to be aligned at least to a starting cylinder/head value (sector number 1). Most legacy partition tools align them even to a starting cylinder with head number 0. An exception is the first partition which will be aligned to the 64th sector which will be unaligned on any disk that uses sectors bigger than 512k like almost every SSD. Unaligned access does not mean simple write a sector but will cause a read and write operation everytime if not cached by the disk.
Modern operating systems use LBA address scheme. They do not care about being aligned to CHS sectors.
Operating systems since Windows Vista, 7, 8, 8.1, 10, 11 create megabyte-aligned partitions. They are compatible with 4k alignment of course.

Best is when your partition and format (!) scheme is when the layout has first data sector aligned to your physical disk behaviour (512 bytes, 4k, or ERASE BLOCK SIZE).
For FAT16 you have to calculate bootsector + FAT + copy of FAT + rootdirectory.

For myself, I do not know any of the operating systems tools that considers this.