There are some anomalies in the previous graphs, notably the incongruent results for stripe cache sizes of 768 and 32768. So I ran some more tests with a smoother range of I/O blocksize.
NB : Each variable was tested three times, with all caches synced and flushed before and after. The average of those three tests were used to plot the data points on the graphs.
Caveat : I also reduced the test file size to 650MB (I know, I know, very bad practice to change multiple variables whilst testing).
Having been using this WD Passport Essential SE 1TB USB removable drive (formatted as ext3) to backup my NAS for the last few months, I’ve been consistently underwhelmed by it’s performance. So I tried aligning the sectors to a 4kb boundary on the off chance it behaved like the WD10TPVT drives in use within the NAS itself, and I’m seeing write performance increases of such magnitude I’m left thinking the drive within (a WD10TMVV model) has 4kb physical sectors as well, Western Digitals so called ‘Advanced Format’.
A very simple benchmark of I/O write performance with non-4kb-aligned-sectors:
# fdisk -lu /dev/sds Disk /dev/sds: 999.5 GB, 999501594624 bytes 255 heads, 63 sectors/track, 121515 cylinders, total 1952151552 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/sds1 * 63 1952138474 976069206 83 Linux
# time dd if=/dev/zero of=zero count=1000 bs=1M 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 65.5702 s, 16.0 MB/s real 1m5.869s user 0m0.015s sys 0m8.167s
And again with 4kb-aligned-sectors:
# fdisk -lu /dev/sds Disk /dev/sds: 999.5 GB, 999501594624 bytes 255 heads, 63 sectors/track, 121515 cylinders, total 1952151552 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/sds1 * 8 1952151551 976075772 83 Linux
# time dd if=/dev/zero of=./zero count=1000 bs=1M 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 36.2553 s, 28.9 MB/s real 0m36.577s user 0m0.009s sys 0m7.906s
A near 100% improvement in write performance!
These are details from the WD10TPVT, a 2.5” 1TB (12.5mm) SATA drive from Western Digital.
It’s the Advanced Format (4096-byte physical sectors) version of their WD10TEVT disk, though with it’s current firmware you might not know it except for the small warning label on the top sticker of the drive itself.
This label suggests every OS other than Windows XP will work with this drive without any special adjustments, but I’d like to know if this is really true, or if there is a tangible performance impact of using this drive with a default partition layout on other operating systems, notably Linux.
Tejun Heo (of LKML fame) posted a very informative wiki article about the 4kb sector issue here : https://ata.wiki.kernel.org/index.php/ATA_4_KiB_sector_issues
SMART details :
Device Model: WDC WD10TPVT-00HT5T0 Serial Number: W -DXW151CU0xxxx Firmware Version: 01.01A01 User Capacity: 1,000,204,886,016 bytes
Linux detection :
scsi 6:0:0:0: Direct-Access WDC WD10TPVT-00HT5T0 01.0 PQ: 0 ANSI: 3 sd 6:0:0:0: [sdd] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB) sd 6:0:0:0: [sdd] Write Protect is off sd 6:0:0:0: [sdd] Mode Sense: 23 00 10 00 sd 6:0:0:0: [sdd] Write cache: enabled, read cache: enabled, supports DPO and FUA
Oddly, WD seem to have purposefully made the drive advertise itself as having only 512-byte sectors, surely this is going to cause confusion with software trying to correctly identify and partition these 4096-byte sectored Advanced Format disks?