I’ve been reading up on using a USB flash drive as an L2ARC for ZFS. Some reason that since the bandwidth of USB is much lower than SATA. However, others reason that since the USB flash drive has no seek time, it will speed up non-sequential reads, which is what the L2ARC is there for. (ZFS is supposed to bypass the L2ARC for sequential workloads.)
I set out to test run-of-the-mill USB drives to see what sort of performance they give. Both magnetic and solid-state drives perform much better with sequential workloads than with random-access workloads. However, I concluded that SSD’s performance doesn’t suffer nearly as badly.
Price
This will all change, but at the time of writing (January 2011):
True SATA-based SSD’s cost a little over $2/GB–if you’re willing to get a large one. 16 GB are around $3/GB, and 8GB around $4/GB.
USB 2.0 flash drives can be had for around $1/GB (on sale, but $2/GB nominally) in the 8GB – 16GB range. SDHC and CompactFlash cards are around $2/GB–especially if you want high performance (class 10 SDHC or 133x CF).
The thing is that a small drive will do the job, and I don’t want to spend more than I need to.
Performance
In all cases, I used the exceptional Crystal Disk Mark.
The two USB flash drives were by Imation: a 4GB and a 16GB, both the “swivel” kind (capless). I don’t know the model # of the 4GB, but I think the 16GB is Imation USB 2.0 Swivel Flash Drive – USB flash drive – 16 GB – Hi-Speed USB. It should be also noted that the 4GB model is pretty beat up by being in my backpack for a couple years. The 16GB is like new (been in my dad’s drawer probably for a year and a half).
Work Laptop
This is my baseline fast computer, which has an SSD, so I can test a true SSD’s performance.
SSD via SATA:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
----------------------------------------------------------------------- CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo Crystal Dew World : http://crystalmark.info/ ----------------------------------------------------------------------- * MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s] Sequential Read : 96.947 MB/s Sequential Write : 43.899 MB/s Random Read 512KB : 95.752 MB/s Random Write 512KB : 9.350 MB/s Random Read 4KB (QD=1) : 13.694 MB/s [ 3343.3 IOPS] Random Write 4KB (QD=1) : 5.794 MB/s [ 1414.5 IOPS] Random Read 4KB (QD=32) : 16.623 MB/s [ 4058.4 IOPS] Random Write 4KB (QD=32) : 0.951 MB/s [ 232.3 IOPS] Test : 1000 MB [C: 59.5% (70.9/119.2 GB)] (x5) Date : 2011/01/05 7:46:50 OS : Windows 7 Ultimate Edition [6.1 Build 7600] (x64) |
4GB Imation Swivel USB flash:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
----------------------------------------------------------------------- CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo Crystal Dew World : http://crystalmark.info/ ----------------------------------------------------------------------- * MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s] Sequential Read : 18.189 MB/s Sequential Write : 9.824 MB/s Random Read 512KB : 18.262 MB/s Random Write 512KB : 2.377 MB/s Random Read 4KB (QD=1) : 5.637 MB/s [ 1376.1 IOPS] Random Write 4KB (QD=1) : 0.017 MB/s [ 4.1 IOPS] Random Read 4KB (QD=32) : 5.966 MB/s [ 1456.7 IOPS] Random Write 4KB (QD=32) : 0.018 MB/s [ 4.3 IOPS] Test : 1000 MB [D: 0.1% (3.1/3813.9 MB)] (x9) Date : 2011/01/05 11:48:59 OS : Windows 7 Ultimate Edition [6.1 Build 7600] (x64) |
16 GB Imation Swivel USB Flash:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
----------------------------------------------------------------------- CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo Crystal Dew World : http://crystalmark.info/ ----------------------------------------------------------------------- * MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s] Sequential Read : 29.150 MB/s Sequential Write : 5.795 MB/s Random Read 512KB : 30.050 MB/s Random Write 512KB : 2.173 MB/s Random Read 4KB (QD=1) : 5.644 MB/s [ 1377.9 IOPS] Random Write 4KB (QD=1) : 0.022 MB/s [ 5.3 IOPS] Random Read 4KB (QD=32) : 6.766 MB/s [ 1651.8 IOPS] Random Write 4KB (QD=32) : 0.023 MB/s [ 5.6 IOPS] Test : 1000 MB [D: 0.0% (0.0/15.0 GB)] (x9) Date : 2011/01/05 12:55:38 OS : Windows 7 Ultimate Edition [6.1 Build 7600] (x64) |
Summary
The SSD has a 3x-5x performance over the USB drives for sequential reads. However, this margin reduces to 2x for random reads. The 16 GB works better for sequential reads than the 4 GB flash. However, there is no difference for random reads.
Atom D525 PC
I was curious whether the above would hold on a different PC. Namely, I wanted to test the target (for FreeBSD/ZFS) computer to make sure it could handle the I/O.
C: drive (60 GB partition on 500 GB SATA)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
----------------------------------------------------------------------- CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo Crystal Dew World : <a href="http://crystalmark.info/">http://crystalmark.info/</a> ----------------------------------------------------------------------- * MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s] Sequential Read : 122.885 MB/s Sequential Write : 106.660 MB/s Random Read 512KB : 28.331 MB/s Random Write 512KB : 59.847 MB/s Random Read 4KB (QD=1) : 0.532 MB/s [ 129.9 IOPS] Random Write 4KB (QD=1) : 0.917 MB/s [ 223.9 IOPS] Random Read 4KB (QD=32) : 1.381 MB/s [ 337.1 IOPS] Random Write 4KB (QD=32) : 0.440 MB/s [ 107.4 IOPS] Test : 1000 MB [C: 31.2% (18.7/60.0 GB)] (x5) Date : 2011/01/04 21:12:52 OS : Windows Server 2008 R2 [6.1 Build 7600] (x64) |
16 GB Imation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
----------------------------------------------------------------------- CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo Crystal Dew World : <a href="http://crystalmark.info/">http://crystalmark.info/</a> ----------------------------------------------------------------------- * MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s] Sequential Read : 32.487 MB/s Sequential Write : 6.687 MB/s Random Read 512KB : 32.480 MB/s Random Write 512KB : 2.059 MB/s Random Read 4KB (QD=1) : 7.753 MB/s [ 1892.9 IOPS] Random Write 4KB (QD=1) : 0.021 MB/s [ 5.2 IOPS] Random Read 4KB (QD=32) : 7.966 MB/s [ 1944.8 IOPS] Random Write 4KB (QD=32) : 0.023 MB/s [ 5.7 IOPS] Test : 1000 MB [F: 0.0% (0.0/15.0 GB)] (x5) Date : 2011/01/05 5:33:01 OS : Windows Server 2008 R2 [6.1 Build 7600] (x64) |
Summary
The magnetic HDD performance drops off like a cliff for random workloads–presumably due to drive-head seek times. This confirms the notion that even a USB flash drive can improve the performance.
I was surprised to see the sequential read (and write) on the eSATA magnet HDD beat the flash SSD in my work laptop.
Dell Dimension 8400 Pentium 4
Mostly for completeness.
250 GB SATA Magnetic HDD
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
----------------------------------------------------------------------- CrystalDiskMark 3.0.1 (C) 2007-2010 hiyohiyo Crystal Dew World : <a href="http://crystalmark.info/">http://crystalmark.info/</a> ----------------------------------------------------------------------- * MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s] Sequential Read : 37.262 MB/s Sequential Write : 28.937 MB/s Random Read 512KB : 18.930 MB/s Random Write 512KB : 23.564 MB/s Random Read 4KB (QD=1) : 0.291 MB/s [ 71.1 IOPS] Random Write 4KB (QD=1) : 0.917 MB/s [ 223.8 IOPS] Random Read 4KB (QD=32) : 0.519 MB/s [ 126.7 IOPS] Random Write 4KB (QD=32) : 0.936 MB/s [ 228.4 IOPS] Test : 1000 MB [D: 90.6% (211.0/232.8 GB)] (x9) Date : 2011/01/05 19:32:50 OS : Windows 7 Ultimate Edition [6.1 Build 7600] (x86) <h4>8 GB SDHC Class 10 (A-Data)</h4> <pre>----------------------------------------------------------------------- CrystalDiskMark 3.0.1 (C) 2007-2010 hiyohiyo Crystal Dew World : <a href="http://crystalmark.info/">http://crystalmark.info/</a> ----------------------------------------------------------------------- * MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s] Sequential Read : 19.756 MB/s Sequential Write : 9.379 MB/s Random Read 512KB : 19.524 MB/s Random Write 512KB : 0.942 MB/s Random Read 4KB (QD=1) : 3.527 MB/s [ 861.1 IOPS] Random Write 4KB (QD=1) : 0.010 MB/s [ 2.5 IOPS] Random Read 4KB (QD=32) : 3.926 MB/s [ 958.4 IOPS] Random Write 4KB (QD=32) : 0.010 MB/s [ 2.5 IOPS] Test : 1000 MB [G: 0.0% (0.1/7879.0 MB)] (x9) Date : 2011/01/07 6:06:35 OS : Windows 7 Ultimate Edition [6.1 Build 7600] (x86) |
Post a Comment