![]() |
Flash Drive Lifespan SurveyFlash memory is known to support a finite number of write/erase cycles. This limited lifespan may make it less suitable than a hard disk for some storage applications. In order to gauge the actual lifespan that NSLU2 users get from their flash drives, please take part in this survey. Please add details of all your flash drives: it's important that we have details of working drives, not just failed ones. Expected LifespanAll modern flash drives should include wear levelling, so you shouldn't need to worry about some parts of the drive wearing out before others. If a flash device supports, say, 10000 write/erase cycles, then a 1 GByte flash drive should be able to do 10000 x 1 GByte = 10 TBytes of writes before failing. 10000 write cycles is at the bottom end of the expected range. At a write rate of 1 MByte/second it would take 10 million seconds to write 10 TBytes; that's about 100 days. So even if your NSLU2 is spending 10% of its time writing at that speed, you should still expect to get at least a few years life from your drive before any sectors fail. The iostat program can give you an idea of the write rate on your system. (One factor that this doesn't allow for is short writes; a whole sector will be erased if you write just a few bytes.) An interesting article on this subject can be found at http://www.storagesearch.com/ssdmyths-endurance.html. Measuring Total WritesTo accumulate the total writes over the life of the disk you need to log periodic measurements. Scripts to do this are described on LogFlashDiskWriteStats. Failure ModesOne would expect that a flash drive with bad sectors would fail gracefully, i.e. writes might become impossible but the drive would still be readable. Catastrophic failure, i.e. none of the disk can be read, have been known to occur. It is likely that this is the result of an effect other than the lifespan of the flash, and could be related to the quality of the manufacturing process. Read and write speedsSome flash drives are faster than others. Please also measure the speed of your drive as follows: $ dd if=/dev/zero of=/file/on/drive bs=8192 count=1024 conv=fsync 1024+0 records in 1024+0 records out 8388608 bytes (8.4 MB) copied, 6.66182 seconds, 1.3 MB/s ((Request: I could not get dd to work despite changing the output file and many attempts [always "No Help available"]. Read several man pages and examples, looks like conv=fsync should be conv=sync. Anyone who can elucidate, please do so.)) $ hdparm -t /dev/drivedevicenode Timing buffered disk reads: 28 MB in 3.03 seconds = 9.23 MB/sec I am not convinced that conv=fsync really ensures that the data is flushed to the drive - any suggestions? These numbers are only a guide. I suggest running these commands at least 3 times and reporting the median value. They may be affected by other activity on your system. Tips for minimizing writes
$ cat /proc/sys/vm/swappiness 60 $ echo "0" > /proc/sys/vm/swappiness To make it permanent add the following line to /etc/sysctl.conf vm.swappiness=0 The SurveyPlease add your details below.
view ·
edit ·
print ·
history ·
Last edited by dbh.
Based on work by Rigas, Riga, Massimiliano Fantuzzi, fantuznet, fcarolo, socors, fareale, mhornsby, Steffen Kremsler, johlin, Phil Endecott, cyrxi, iwo, joshin, and Steve G. Originally by Phil Endecott. Page last modified on February 06, 2009, at 09:49 PM
|