Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 46968

Re: Howto: maximize USB drive life

$
0
0
PBG4 emphasizes an excellent point: devices sold as SSDs are much much better at wear management than devices sold as USB sticks. To which I would add that even if you find a USB stick that works well, the probability is extremely high that just when you get comfortable with it, the manufacturer will change the firmware/controller/flash vendor, and new versions will behave differently (and usually not for the better).

(I made a presentation to a well known North American Navy on this very topic, and successfully got them to abandon USB sticks as their preferred "mission planning" media, in favor of an SLC mSATA SSD in a USB 3.0 package).

In order of preference:
  • SLC SSDs
  • eMLC / MLC-HET SSDs
  • SLC flash cards (CompactFlash, Secure DIgital)
  • MLC SSDs
  • MLC flash cards
  • USB sticks

(Yes, obviously there are some examples of any type that are better -- or worse -- than that list would suggest. But it's a good starting point).

Another point is that "overprovisioning" can make a huge difference, but only if the flash controller is smart enough to take advantage of it. So getting an MLC SSD and only partitioning ~60-75% of the space will massively increase the operating life of the device... but this trick doesn't work with dumb controllers, which leaves out most sticks.

But using a log-structured file systems (like F2FS as I mentioned, plus NILFS with which I am less familiar) will ensure that the logical blocks being written are constantly changing, which in turn means that you can "overprovision" at the filesystem level -- F2FS has a "reserved percentage" flag, which I tend to set at anything up to 50%!

Viewing all articles
Browse latest Browse all 46968

Trending Articles