Vdbench and SSD alignment
By Henk Vandenbergh on Apr 22, 2010
These last months I have heard a lot about issues related to solid state devices not properly being aligned to the expected data transfer sizes. Each OS has its own way of creating volumes and partitions so trying to figure out if everything is neatly aligned is not an easy job. Add to that the possibility of the OS thinking everything is in order but alignment somewhere down the line not being accurate in one of the many possible layers of software when we have virtual volumes.
Without really being interested in the 'how to figure it all out and how to fix alignment issues' I created a small Vdbench parameter file that will allow you to at least figure out whether things are properly aligned or not. It revolves around the use of the Vdbench 'offset=' parameter that allows you to artificially change the alignment from Vdbench's point of view.
If your SSDs are on a storage subsystem that has a large cache, make sure that your volume is much larger than that cache. You rally need to make sure you are getting your data from the SSD, not from cache.
These are the 'avg' lines:
offset=0000 avg_2-3 19223.00 75.09 4096 100.00 1.580 2.803 0.231 1.1 0.9
offset=0512 avg_2-3 3655.50 14.28 4096 100.00 8.772 9.473 0.067 0.3 0.2
offset=1024 avg_2-3 3634.00 14.20 4096 100.00 8.784 9.390 0.064 0.3 0.2
offset=1536 avg_2-3 3633.00 14.19 4096 100.00 8.799 9.472 0.062 0.3 0.2
offset=2048 avg_2-3 3614.50 14.12 4096 100.00 8.831 9.440 0.066 0.3 0.2
offset=2560 avg_2-3 3604.00 14.08 4096 100.00 8.852 9.477 0.067 0.2 0.2
offset=3072 avg_2-3 3602.50 14.07 4096 100.00 8.853 9.430 0.059 0.3 0.2
offset=3584 avg_2-3 3597.50 14.05 4096 100.00 8.888 9.468 0.069 0.2 0.2
offset=4096 avg_2-3 20050.50 78.32 4096 100.00 1.584 2.811 0.231 1.0 0.9
As you can see, the runs with offset=0 and offset=4096 offer more than 5 times the throughput than the others. This tells me that this volume is properly aligned.
If for instance the run results would show that offset=512 has the best results the volume is on a 512 byte offset.
To then run properly 4k aligned tests with Vdbench, add to all your runs:
and Vdbench, after generating each lba, will always add 512.