User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mission:log:2011:01:24:4k-partition-alignment-primer [2013/06/05 14:34]
127.0.0.1 external edit
mission:log:2011:01:24:4k-partition-alignment-primer [2013/06/30 12:50] (current)
chrono [Conclusion]
Line 43: Line 43:
 The key to misalignment lies in the partition table which consumes either 512 byte (LBA 0) in case of a legacy msdos type mbr or LBA0-33 for the Primary GUID Partition Table (GPT).  The key to misalignment lies in the partition table which consumes either 512 byte (LBA 0) in case of a legacy msdos type mbr or LBA0-33 for the Primary GUID Partition Table (GPT). 
  
-<note important>**Misalignment will occur by default if the first partition is placed immediately after the partition table, as the next block is LBA 1 for msdos type MBRs and LBA 34 for GPT**.</note>+<WRAP round important>**Misalignment will occur by default if the first partition is placed immediately after the partition table, as the next block is LBA 1 for msdos type MBRs and LBA 34 for GPT**.</WRAP>
  
 In order to align the 4k logical block with the physical 4k on the platter the sectors following the partition table have to be left empty until a sector is reached that is divisible by 8 (sector 8 for msdos and sector 40 for GPT). In order to align the 4k logical block with the physical 4k on the platter the sectors following the partition table have to be left empty until a sector is reached that is divisible by 8 (sector 8 for msdos and sector 40 for GPT).
Line 149: Line 149:
 ==== Run benchmark ==== ==== Run benchmark ====
  
-<note warning>+<WRAP round alert>
 The following tests **will erase the complete disk**. The following tests **will erase the complete disk**.
 Only continue when you feel confident that you know what you are doing. Take special care to check that your hdd really is /dev/sda or change the -d option according to your own setup!  Only continue when you feel confident that you know what you are doing. Take special care to check that your hdd really is /dev/sda or change the -d option according to your own setup! 
-</note>+</WRAP>
  
 <code bash> <code bash>
Line 179: Line 179:
 ==== Results ==== ==== Results ====
  
-<sortable> 
 ^Device^Sector 0^Sector 8^Sector 34^Sector 40^Sector 42^ ^Device^Sector 0^Sector 8^Sector 34^Sector 40^Sector 42^
 |WD    |12.545s|12.436s|65.792s|12.211s|66.341s| |WD    |12.545s|12.436s|65.792s|12.211s|66.341s|
 |HD204UI|10.141s|10.153s|59.064s|10.126s|59.010s| |HD204UI|10.141s|10.153s|59.064s|10.126s|59.010s|
-</sortable> 
- 
- 
  
 misaligned cp: misaligned cp:
Line 212: Line 208:
   * misaligned: 17MB/s   * misaligned: 17MB/s
  
-<note important>Partitions should begin on sectors that can be divided by 8 (8 sectors == 4 kB internal sector of HDD)</note>+<WRAP round important>Partitions should begin on sectors that can be divided by 8 (8 sectors == 4 kB internal sector of HDD)</WRAP>
  
 Alignment: Alignment:
Line 221: Line 217:
  
 The msdos partition table/mbr is 512bytes long, so theoretically sector 8 would be the start sector for the first partition. The msdos partition table/mbr is 512bytes long, so theoretically sector 8 would be the start sector for the first partition.
-