Friday, September 28, 2007

USB = Unimaginably Slow Bus?

The desktop PC which we use has a couple of USB ports. The PC is about four years old (insert which in computer years is here), so it only has two. Well, four, but the other two are in a weird place on the keyboard, and they don't seem to always work. In fact, they usually don't.

About a year ago, I was gifted with a USB hub, which appears to be nothing more than a one male/four female (hmm....good ratio!) deal. We plugged the one male into one of the two ports on the PC, and plugged the keyboard, the mouse, and the printer into three of the four ports. Everything works as before, except that when the PC boots, it gives a Keyboard Failure message, which I'm guessing is some antediluvian code that assumes that of course the keyboard will be plugged directly into the keyboard slot; where else could it possibly be? Which of course leads to the jokes about Keyboard Not Found: Press Any Key To Continue.

When we got the external hard drive (the one that seems unimaginably huge at the moment, and will within two years, possibly one year, seem rather cramped), I connected the laptop to it and moved the file of photographs from the laptop to the hard drive. That was a big space user; this laptop has a 50 gig hard drive, and those photographs were using about 20 gig. This morning, having set up the jobs to automagically back up files, I wanted to move the resulting files over to the hard drive. I haven't figured out how to just make this happen, yet, but NBD, I'll just move them manually. One of those backup files contains the Photographs, as well as some other images. I opened that folder, and thought "Thats odd, it seems awfully small. This 7Zip package must have an amazing compression ratio". Then, just to see, I opened the original of the Photographs, selected the first folder, and found: nothing. Empty. What the... So I opened the second. And the third. And then four or five at random. They were all empty. It was at this point that I began doing deep breathing exercises, but I thought Okay, don't panic, you have that backup that you moved over to the external hard drive, just make sure it's still around.

I went to the external hard drive, and found: Nothing. Well, almost nothing -- there was one backup of some folders that I'd run as a test. But nothing that looked in the least like photographs. I resumed doing deep breathing exercises. Eventually, I found that yes, the backups of the photographs were there; when I'd opened the pointer from the laptop to the external hard drive, I'd pointed it to a small subfolder, whereas the backups were there in the root folder. Okay. But by now, I was a little paranoid, shall we say, so I thought 'You know, before I clean up the way folders are named and ranked on the external hard drive, I think I'll just take that backup and copy it back to the laptop, just to hang onto it for a little while." So I plugged the laptop into the USB connector, addressed the drive to which I'd mapped the external hard drive, and started transferring. I knew it would take a while, so I went out to the library (where I picked up a terrific book called The Baker's Manual; yum). I got back around two hours later. It was still transferring. It was only about a third done.

Huh?

I cancelled the transfer, unplugged the external hard drive from the USB hub, plugged it directly into my laptop, initiated the transfer again. In just under an hour, it was done.

Now, being a kind of performance person (though knowing very little about PC performance bottlenecks), this strongly suggests to me that that USB hub somehow slows the EHD to laptop transfer way the hell down. I'm guessing that its not so much the hub itself as the fact that its a common pipe within the desktop PC, so that the desktop has to tag and route every damn packet coming from the EHD to the laptop. When the EHD was plugged directly into the laptop, there wasn't that traffic cop function, and it just flowed.

Does that sound reasonable? And if it does, does that mean I can't use the structure I had been using -- common hub to which the laptop, desktop, and EHD all talk -- to do any kind of high speed or bulk data transfer? If so, its not a big, big deal -- I don't do it that often -- but its somewhat of a disappointment. I mean, I thought I was onto something, with that architecture. It'd be a real bummer to find out that it was the equivalent of tin cans and string!

No comments: