Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
1  
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. –  user3463 Jul 29 '12 at 19:32
    
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. –  Journeyman Geek Jul 30 '12 at 0:06
add comment

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
"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 Jul 29 '12 at 22:20
    
"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 Jul 29 '12 at 22:28
    
@sawdust - in the 80s, "micros" was short for "microcomputers". I don't think I've seen "micros" for "microprocessors", so I never considered possible confusion. About the only thing that involved the processor in DMA 80s-style was blocking the CPU from accessing the bus. On USB, saying DMA could be a mistake, but there's certainly stuff going on in software on USB that is handled in hardware for firewire. For a not-necessarily-definitive reference - "http://www.technibble.com/firewire-vs-usb/. –  Steve314 Jul 30 '12 at 1:25
    
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. –  sawdust Jul 30 '12 at 2:34
    
@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. –  Steve314 Jul 30 '12 at 2:53
show 2 more comments

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|improve this answer
    
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. –  Steve314 Jul 29 '12 at 19:35
    
@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. –  Scott Chamberlain Jul 29 '12 at 20:20
    
I fried my FDD before the flash cells wore out. The operating system heated up the drive way too much. –  Deltik Jul 29 '12 at 20:35
    
@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. –  Steve314 Jul 30 '12 at 3:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.