Friday, May 23. 2008How Long Does a Flash Drive Last?Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
You really should be doing your test with EXT2, mounted with 'noatime', not EXT3. With EXT3, the filesystem writes to the journal every time you sync metadata to the file. With EXT3 and default options, it is going to update the metadata every time you write to update atime/mtime. This means that it updates several other blocks other than your file data.
The noatime is a good call, but I was well aware of the journal updates and having them there was intentional. My goal wasn't so much to get an exact number of writes, but just a general idea of how a typical filesystem I run would stand up.
I'm certain there are lots of things I could have done to make this test more exact. Perhaps I'll put this knowledge to use in a future run. Thanks.
Were you still able to read off of it even after the write died? Or was it all just burnt out?
I am using ext3 on Ubuntu with 8 GB A-data USB flash drive.
I use: noatime in /etc/fstab tmpfs on /tmp I tried to raise commit interval, but dont know if it works correctly. I disabled disk cache in Firefox but it still seems to me that firefox is doing most of the writes do the drive. My machine writes several hundreds of megabytes to the drive each day, while browsing Internet and doing normal stuff. You left very small space for wear leveling to kick in. If I leave approx 1GB of 8GB free at all times how long can the flash drive live? I would make an experiment if you gave your testing software to the public.
thanks a lot for this study. this is exactly the kind of information i was looking for. i reached your site through wikipedia
hello, can you please put here the script you used or at least some explications how to bypass caching using that flag??
i create a small script in fedora that generates the test-file continously on the usb key with a simple counter to show me how much the file has been written but i dont think it works beacose of the caching !
It's not a script, but rather a small C program I wrote. You can get them here:
http://www.bress.net/~bress/sync-file.c http://www.bress.net/~bress/sync-random.c Just build them with gcc, no extra libraries are needed. The sync-file.c will copy a file using the O_DIRECT flag. The sync-random.c will write random data to the output file. This is most useful as if the flash drive is smart, they will only flip the bits that change, so writing the same data over itself, wouldn't result in an actual write. |
Calendar
QuicksearchCategoriesBlog Administration |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||