Partition Alignment for SSD’s

Microsoft Support: Article ID: 929491 – Last Review: June 8, 2009 – Revision: 4.0 (Summary)

“Disk performance may be slower than expected when you use multiple disks in Microsoft Windows Server 2003, in Microsoft Windows XP, and in Microsoft Windows 2000. For example, performance may slow when you use a hardware-based redundant array of independent disks (RAID) or a software-based RAID.

This issue may occur if the starting location of the partition is not aligned with a stripe unit boundary in the disk partition that is created on the RAID. A volume cluster may be created over a stripe unit boundary instead of next to the stripe unit boundary. This is because Windows uses a factor of 512 bytes to create volume clusters. This behavior causes a misaligned partition. Two disk groups are accessed when a single volume cluster is updated on a misaligned partition.

To verify that an existing partition is aligned, divide the size of the stripe unit by the starting offset of the RAID disk group. Use the following syntax:

((Partition offset) * (Disk sector size)) / (Stripe unit size)

Example of alignment calculations in bytes for a 256-KB stripe unit size:

(63 * 512) / 262144 = 0.123046875
(64 * 512) / 262144 = 0.125
(128 * 512) / 262144 = 0.25
(256 * 512) / 262144 = 0.5
(512 * 512) / 262144 = 1

Example of alignment calculations in kilobytes for a 256-KB stripe unit size:

(63 * .5) / 256 = 0.123046875
(64 * .5) / 256 = 0.125
(128 * .5) / 256 = 0.25
(256 * .5) / 256 = 0.5
(512 * .5) / 256 = 1

These examples shows that the partition is not aligned correctly for a 256-KB stripe unit size until the partition is created by using an offset of 512 sectors (512 bytes per sector).”

SMART Modular Technologies (author: Esther Spanjer), April 2010

“NAND flash devices are divided into erasable blocks composed of multiple pages (up to 256 pages per block, and up to 8KB per page). A flash block must be fully erased prior to re-writing, and a single-block erase process can take up to several milliseconds. The write speed may suffer a great deal if the SSD controller has to perform unnecessary block erase operations due to partition misalignment. Proper partition alignment is one of the most critical attributes that can greatly boost the I/O performance of an SSD due to reduced read modify‐write operations.

Windows XP or Windows Server 2000/2003 start partition offset at 31.5KB (32,256 bytes). Due to this misalignment, clusters of data are spread across physical memory block boundaries, incurring read-modify-write penalty. As a result, the host ends up writing at least 2X more I/O for every write as illustrated in this figure:

Alignment
When choosing a partition starting offset, SMART Modular recommends system integrators to correlate the partition offset with the RAID stripe size and cluster size to achieve the optimal SSD I/O performance. The figure shows an example of a misaligned partition offset and an example of an aligned partition offset for Windows Server.”

Chatwin says: Based on the conclusions as mentioned above, I would recommend the following alignment and cluster settings for NAND flash devices (unit = 512 bytes):

((Partition offset / Flash unit) * (Disk sector size)) / (Erase block)

((2048 / 2) * .5) / 512K = 1
((4096 / 4) * .5) / 512K = 1

With a flash unit of 2 for SLC flash (aka. 1K, 1 byte/cell group [32×32]) and 4 for MLC flash (aka. 2K, 2 bytes/cell group [32×32]), this results in an offset of 1 MB (2048) for SSD’s with Single Layer Cell memory, and 2 MB (4096) for Multi Layer Cell memory, when you want to align your partitions on erase block boundaries. The best cluster size (allocation unit) can be calculated with this formula:

((Single erase block / Flash unit) * (Disk sector size)) = Cluster Size

((128 / 2) * .5) = 32K (SLC),
((512 / 4) * .5) = 64K (MLC, “The Force“)

With 8K as the ideal sector size for flash memory (4K SLC), this is in my opinion the best choice when you want the fastest performance for your SSD (Indilinx, Samsung, JMicron controllers), unless you’re more concerned about maximizing your storage capacity at any price. And not to forget: a longer lifespan, for reducing a lot of overhead and fragmentation compared to the standard NTFS formatting of 4096 bytes. Keep in mind that this setting was default in a time that hard disks were limited to 2-4 GB, instead of 2 TB in this time and age.

Advertisements

AS SSD Benchmark

Benchmark Reviews (© 2010):

“Solid State Drives have traveled a long winding course to finally get where they are today. Up to this point in technology, there have been several key differences separating Solid State Drives from magnetic rotational Hard Disk Drives. While the DRAM-based buffer size on desktop HDDs has recently reached 32 MB and is ever-increasing, there is still a hefty delay in the initial response time. This is one key area in which flash-based Solid State Drives continually dominates because they lack moving parts to “get up to speed”. However the benefits inherent to SSDs have traditionally fallen off once the throughput begins, even though data reads or writes are executed at a high constant rate whereas the HDD tapers off in performance. This makes the average transaction speed of a SSD comparable to the data burst rate mentioned in HDD tests, albeit usually lower than the HDD’s speed. Comparing a Solid State Disk to a standard Hard Disk Drives is always relative; even if you’re comparing the fastest rotational spindle speeds. One is going to be many times faster in response (SSDs), while the other is usually going to have higher throughput bandwidth (HDDs).”

Patriot Inferno SSD Kit PI100GS25SSDR (24 May 2010)

“The biggest mistake PC hardware enthusiast make with SSDs is grading them by their speed. File transfer speed is important, but only so long as the operational IOPS performance can sustain that bandwidth under load. Benchmark Reviews tests the 100GB Patriot Inferno SSD, model PI100GS25SSDR, against some of the most popular storage devices available and demonstrates that 4K IOPS performance is more important than speed. For decades, the slowest component in any computer system was the hard drive. Most modern processors operate within approximately 1 ns (nanosecond = one billionth of one second) response time, while system memory responds between 30-90 ns. Traditional Hard Disk Drive (HDD) technology utilizes magnetic spinning media, and even the fastest spinning desktop storage products exhibit a 9,000,000 ns – or 9 ms (millisecond = one thousandth of one second) initial response time. In more relevant terms, The processor receives the command and waits for system memory to fetch related data from the storage drive. The difference a SSD makes to operational reaction times and program speeds is dramatic, and takes the storage drive from a slow ‘walking’ speed to a much faster ‘driving’ speed. Solid State Drive technology improves initial response times by more than 450x (45,000%) for applications and Operating System software, when compared to their HDD counterparts. Alex Schepeljanski of Alex Intelligent Software develops the free AS SSD Benchmark utility for testing storage devices. The AS SSD Benchmark tests sequential read and write speeds, input/output operational performance, and response times. Because this software receives frequent updates, Benchmark Reviews recommends that you compare results only within the same version family. Beginning with sequential read and write performance, the Patriot Inferno Solid State Drive produced 207.95 MB/s read speed, and 130.60 MB/s write performance. The sequential file transfer speeds have traditionally been low with this benchmark tool, especially for SandForce controllers, which is why we will concentrate on the operational IOPS performance for this section. Single-threaded 4K IOPS performance delivers 21.54 MB/s read and 61.18 MB/s write, which is among the highest results we’ve recorded. Similarly, the 64-thread 4K reads recorded 124.05 MB/s while write performance was 94.46… both earning the Patriot Inferno SSD a spot at the very top of our charts.”

Chatwin’s opinion: The Patriot Inferno (on the left) has excellent random R/W values, thanks to the SandForce controller, which uses complex algorithms to compress small user-data into 4K flash pages. The manufacturer also implements some kind of data redundancy, to ensure data integrity. All of this increases the IOPS and efficiency of the SSD and reduces the need for high quality (SLC) NAND flash or large DRAM buffers. The Indilinx controller of the Vertex Turbo (on the right) has a straight forward page level mapping (with 64 MB memory cache to combine write requests). In combination with a logical/physical 1:1 mapping (LBA/SSD), the Vertex (RAID 0, specifications: “The Force“) outperforms every other MLC SSD I’ve seen so far in access time (except the Intel X25-M G2 Postville, with a narrowed write bandwidth of 95 MB/s and 32K clustering on-the-fly, these SSD’s are simply unbeatable…). The sequential read/write speed is quite impressive. The two OCZ Vertex Turbo’s score lower IOPS values than the Patriot, but the bandwidth is much higher, even for RAID configurations.

Besides an exceptional response time, the result is better write coalescing when using my workstation for day-to-day stuff: email checking, editing office documents, internet browsing (caching redirected to hard disk of course). An average of 30 MB/hour at the most (zero to 3 when left for idle). I use Diskeeper HyperFast for maintenance, but so far it never initiated an automatic (free space) defragmentation. Even after several months of installing software and restoring system backups.

Note: AS SSD Benchmark was run in 2 sessions (first: Seq./Acc. Time, then 4K (-64) Thrd). No tricks or manipulations involved…
as-ssd-bench_Patriot-Inferno-AHCIas-ssd-bench Vertex0 18-6-2010

My Workstation PC (“The Force”)

PC: Self-concept / Assembled by: Informatique BV / Computer Store: Berkel & Rodenrijs (Rotterdam)

IMAGE_00111

Mobo Gigabyte GA-EP45T-UD3R (Bios: F6)
CPU Intel Core 2 Duo E8400 @ 3.400 MHz, 1.136V (FSB: 400×8.5)
Memory 2 x OCZ Platinum PC3-12800 1600MHz DDR3 (4GB) @ 7-7-7-20, 2T (1N)
Boot Drive 2 x OCZ Vertex Turbo SSD 30GB @ 60GB RAID 0 (128K stripe, 8K sectors [1:1], 2MB offset) – random access time [AS SSD Benchmark R/W]: 0.13/0.20 ms
2nd Drive 2 x Seagate Barracuda 7200.12 HDD 500GB @ 1TB RAID 0 (128K stripe, 8K sectors [16:1], 2MB offset) – average access time [short stroked]: 8 ms
GPU Asus EN9600GT Silent/2D/HTDI 512MB, PCIe
Sound Asus Xonar D1 7.1, LP, PCI
CPU Cooler Arctic Cooling Freezer Xtreme Rev.1
Gamer Case Antec Nine Hundred Two
Power Supply Be Quiet! Dark Power Pro Edition (P7), 450W
Optical Drive Pioneer DVR-117F DVDRW
OS XP Professional x64 Edition SP2 (SXP June 2009)
System Tools LSoft Active Boot Disk Suite v4.1.4
Paragon Partition Manager v10.0 Server
O&O DiskImage 4Professional Edition (x64)
Diskeeper 2010 Home Edition with HyperFast

%d bloggers like this: