I want to use a USB stick as a harddrive - hardware questions

15,481

Solution 1

There are several performance issues with using USB Flash as your main storage.

First off, USB2 is slower than SATA or even PATA. PATA tops out at about 133MB/s IIRC, though possibly 150 or 167. USB2 tops out at about 50 or 60 MB/s, and you rarely even see that in practice.

Second, writes to Flash are significantly slower than reads.

Third, USB flash isn't the same as SSDs. It's designed to be cheap, convenient, and portable. SSDs have very sophisticated controllers doing clever things to make things fast - you shouldn't expect that with USB flash or SD cards. And you should expect the problems to include long latencies (how long it takes to get started) as well as slow sustained transfers (how much happens per second once things are in motion).

One option that may be worth a little research is using a CompactFlash to PATA adapter.

The interface used for CompactFlash is actually heavily based on the interface for PATA. It's so similar that some people in the past have found ways to connect CompactFlash cards to PATA interfaces rather than use a hard disk - IIRC, it was a trick used by some retro computing fanatics at one time. There were certainly some adaptors you could buy, though as far as I know they were produced on a small scale.

I don't know if the CompactFlash-to-PATA thing will support the full PATA speed and DMA, but it might be worth checking. This has been a niche thing for a while, e.g. for retro computing or apparently as a replacement for 1.8 inch HDs in ThinkPads.

Even if the adapter allows full speed, though, the flash card almost certainly won't.

Solution 2

You're asking for trouble IMO. Individual bits on a flash drive are not infinitely rewritable. They're good for a certain number of cycles - the number 100,000 comes to mind. The expected/intended use of flash drives, to drag a bunch of files on and off, is not likely to have a problem with this; but operating system as a whole have no strictures against this.

Share:
15,481

Related videos on Youtube

F. Rakes
Author by

F. Rakes

Updated on September 18, 2022

Comments

  • F. Rakes
    F. Rakes over 1 year

    I installed the latest Ubuntu OS on a USB stick and I'm having some (expected?) lags. Updating packages takes hours, but I can live with that. But the general response time is pretty bad. For instance being able to click on a link it takes several seconds to register. When watching videos on various platforms I need good 20 seconds until it stabilizes.

    What I'm wondering is, which hardware attribute determines the overall performance for using it as a regular harddrive. Do I need to look out for the write or the read speed. My current stick has 18MB/s read and 5MB/s write speed USB 2.0.

    • Admin
      Admin almost 12 years
      The answer is, no hardware attribute determines its overall performance for use as a regular hard drive, because it's not designed for this purpose.
    • Thalys
      Thalys almost 12 years
      You'd have better luck running one of the lighter ubuntu varients, such as lubuntu or xubuntu - i regularly ran the latter off a thumbdrive at one point.
  • Admin
    Admin almost 12 years
    Hard drives don't last forever either. SSDs are increasing used as drop-in replacements for hard drives, and they are just as much based on Flash as USB sticks. That said, their are technologies introduced for SSDs (such as TRIM) that help mitigate the rewriting issue and that don't apply to USB sticks. There have also been some credible scary stories about SSDs, though the ones I've seen were a while ago and the technology is improving rapidly. SSDs might already be more reliable than hard drives and, if not, probably will be soon.
  • Scott Chamberlain
    Scott Chamberlain almost 12 years
    @Steve314 One thing SSD have that usb flash sticks do not is over provisioning of the available NAND chips. Once you wear out a bit on a flash drive it is lost, when you wear out a bit on a SSD it swaps it out to another sector that has less wear on it.
  • Deltik
    Deltik almost 12 years
    I fried my FDD before the flash cells wore out. The operating system heated up the drive way too much.
  • sawdust
    sawdust almost 12 years
    "even old 80s 8-bit micros supported DMA" - Actually DMA is not usually a processor capability (except for SoCs), but a capability that is handled by the DMA controller on the system board. In the original IBM PC, the DMA controller was a discrete IC, the Intel 8237. DMA controllers are now typically integrated into the "southbridge chip" of PC motherboards.
  • sawdust
    sawdust almost 12 years
    "there's the lack of DMA", "One problem with USB is that it doesn't do DMA" - Please substantiate your statements. Certainly USB hubs on some SoCs have DMA capability. And there is this USB+DMA patent: google.com/patents/US6266715 issued in 2001.
  • sawdust
    sawdust almost 12 years
    As long as I can remember (i.e. beyond those 80's you mention) the shorthand for microprocessor was uP, and in EE circles, simply "micros". In the industrial/professional areas where I worked, uPs were installed in single-board computers or embedded systems. We didn't didn't use the term "microcomputer", which sounds like a low-cost computer for home use or hobbyists. The link you provided mentioned nothing about DMA. USB "needs a CPU" does not mean it cannot utilize DMA. That requirement seems to be in regard to device-to-device transfer versus Firewire's peer-to-peer transfer.
  • Admin
    Admin almost 12 years
    @sawdust - On your "The link you provided mentioned nothing about DMA. USB "needs a CPU" does not mean it cannot utilize DMA." - yes, that's why I said "could be a mistake", and added that "possibly mistaken" edit to the answer. There's a good chance I've jumped to a wrong conclusion. I should have just said "I am wrong", as I believe what you say. On "micros" meaning "microcomputers" in the 80s, see e.g. Wikipedia. Interesting that "micro" now means "microcontroller" according to that - I used to work with them in the 90s, yet it's new to me.
  • Admin
    Admin almost 12 years
    @Scott - I've seen references to overprovisioning in USB flash drives, such as here. That doesn't look that reliable, though, and in any case I have no doubt that overprovisioning is greater and its management more sophisticated in SSDs.