Wikipedia:Reference desk/Archives/Computing/2013 March 16

From Wikipedia, the free encyclopedia
Computing desk
< March 15 << Feb | March | Apr >> March 17 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


March 16[edit]

USB2 drive faster on USB3 port[edit]

I've tested writing to a USB2 external hard drive while connected to a USB2 port and a USB3 port. It is about 16% faster on a USB3 port. Why is that? Bubba73 You talkin' to me?

That's an interesting observation. What are you using for the benchmark? A significant difference between the USB2 and USB3 protocols is that the latter has a lot more pipes and slots; they're briefly described in this document. Obviously with a USB2 drive, that alone doesn't help, as the host controller has to fall back on the USB2 protocol. But it does mean that the driver can use more space (essentially more and/or longer queues) within the host controller itself; it may be that this is allowing it to use smart features like Native Command Queuing better, giving a higher effective throughput. A second, perhaps more prosaic, possibility is simply that the driver for the USB2 path is older and rather conservative, and in writing the USB3 driver (where they had to rewrite that pipe and slot stuff anyway) they did a smarter, more aggressive, job of scheduling the IO, producing the more efficient use you're seeing. -- Finlay McWalterTalk 02:55, 16 March 2013 (UTC)[reply]
I wrote a program to test all of my drives. It writes 1MB blocks to a file repeatedly, for 15 seconds, then calculates the rate. Just out of curiosity, I switched the USB2 external HD to a USB3 port, and it was faster. I've switched back and forth and run it several times, and it is consistently about 16% faster when plugged into the USB3 port, compared to USB2. Bubba73 You talkin' to me? 04:18, 16 March 2013 (UTC)[reply]
You're may be better off with a longer time (so much more data); particularly if the drives are configured for write-behind then you risk the results of the benchmark being confused by different caching behaviour throughout the USB3 stack. Ideally you wouldn't be writing to files either (in case the file system too has some confounding effect), but to the physical disk surface instead. That's trivial on Linux and BSD (and I guess on OS-X), and possible (but increasingly difficult) on Windows (note that this will destroy partitions and data on that disk). -- Finlay McWalterTalk 04:33, 16 March 2013 (UTC)[reply]
It's not much different on Windows than on Linux. paths like \\?\Device\HarddiskVolume1 are the equivalent of /dev/hda1, and you can pass them to dd for Windows. Obviously you should be really careful if you do this on any OS. The "increasingly difficult" article seems to be about a mechanism to prevent writing to a disk region that's also mounted as a filesystem, which seems like a good idea to me. You should unmount any filesystems before clobbering them (by removing the drive letter in Disk Manager). -- BenRG (talk) 05:27, 16 March 2013 (UTC)[reply]
What would the question mark in \\?\Device\HarddiskVolume1 typically need to be substituted with? --NorwegianBlue talk 09:51, 16 March 2013 (UTC)[reply]
Nothing, the ? is a literal in this syntax. See Path_(computing)#Uniform_Naming_Convention or [1].Kram (talk) 19:46, 16 March 2013 (UTC)[reply]

I checked my program for errors and found none. I reran it, testing for 300 seconds on each of USB2 and USB3. On USB3 it was 16.8% faster. Then I thought that maybe I should test the same size of file, so I did 1000MB, and USB3 was 16.0% faster. Bubba73 You talkin' to me? 16:18, 16 March 2013 (UTC)[reply]

This implies that your file I/O bottleneck is not the speed limitation of the USB2.0 protocol, but is in fact an implementation-specific speed limitation somewhere else in your system. To prove this, calculate your data transfer speed, and determine if your USB drive is meeting the theoretical maximum data transfer speed for USB2.0 - 480 Mbits/sec. If you are not hitting this peak - why not? We can enumerate hundreds of reasons, ranging from software to hardware to signal-integrity problems. But it will all be speculation unless you can prove and isolate the root-cause for your drive operating below peak speed. Next, measure your USB2.0 drive connected to the USB3.0 port. Is it performing at the peak theoretical USB2.0 specification, or is it mysteriously outperforming its specification by operating in a non-standard way? We can enumerate hundreds more reasons that could be responsible, from vendor-specific protocol extensions to mislabeled marketing-ese. Prove this by collecting data using a USB protocol analyzer. Colleagues recommend the Beagle USB analyzer because it is cheap and easy, although I have no experience with it. If you have a large budget for this investigation, I recommend the USB analysis suite for your LeCroy scope. (It can also analyze USB3.0).
From what we currently have, all we can say is that your USB3.0 port can yield higher performance - even at USB2.0 speeds - than your USB2.0 port. Your system may use a higher-performance software- or hardware- path to your USB3.0 port, even when it is communicating using the USB2.0 protocol. Nimur (talk) 18:12, 16 March 2013 (UTC)[reply]
Are you using other USB devices on the same machine? My understanding is that frequently when there are multiple USB ports on a computer you effectively have the equivalent of a USB hub in your computer. So while you may have 5+ ports on the machine, they're all multiplexed into a single connection, so you don't actually get 5+ times the bandwidth. If you have other devices active, you'll never get the full USB2.0 data transfer rate, because the have to share. On the other hand, a USB3.0 system will by necessity have a higher bandwidth connection to the processor, so you'll be able to max out the 2.0 protocol bandwidth while still having room for the other devices attached to the computer, even if they're all USB2.0 -- 71.35.100.68 (talk) 19:20, 16 March 2013 (UTC)[reply]
Yes, I have several other USB devices in use (a thumb drive, a mouse, a printer, a scanner, and a connection to the UPS), mostly idle.
In one pair of tests, I got 26.0 MB/sec in USB2 and 31.5+ with USB3, so neither is close to the maximum 60 MB/sec of USB2, assuming 8 bits/byte (some things are 10 bits/byte, which would be 48MB/sec). Bubba73 You talkin' to me? 21:12, 16 March 2013 (UTC)[reply]
Resolved

Bubba73 You talkin' to me? 01:56, 19 March 2013 (UTC)[reply]

Algorithms Hacking[edit]

I think Donald Knuth is the greatest living authority on Algorithms in this planet. I am curious to know that if the so called "Hackers" like Kevin Mitnick or Kevin Poulsen or others have greater knowledge than Donald Knuth. And if advanced Computer Science and Algorithms are necessary to be a security expert like Kevin Mitnick or Julian Assange. Solomon7968 (talk) 15:05, 16 March 2013 (UTC)[reply]

Both Assange and Mitnick used subterfuge, primarily; they did not design algorithms to circumvent computer-security systems. I don't recall any interviews where either person specifically mentioned Knuth, but they both have espoused free software and its associated culture in numerous interviews. Nimur (talk) 15:31, 16 March 2013 (UTC)[reply]
This [2] reliable source implies third best ;-) Dmcq (talk) 19:22, 16 March 2013 (UTC)[reply]
Well, if we're going for esoteric humor, here's a link to my nitpick of Knuth's font nitpick. I still think it's bad form to nitpick a font glyph and then use a crudely-antialiased, badly palettized GIF as your example of "how to do it correctly." I mean, truthfully, seriously, has the man ...never heard of vector graphics? That web-page has baffled me for almost a decade and still has not been fixed. I honestly have come to believe that he leaves that webpage in its current form as a shiboleth to TeX hackers everywhere: always remember, your final output will be rasterized badly by somebody incompetent... no matter how hard you try to preserve the pristinely vectorized fonts, no matter what you do. Nimur (talk) 22:53, 16 March 2013 (UTC)[reply]
The difference between algorithms and hacking into systems is like the difference between architecture and burglary. I don't think there's much overlap in the skill sets. It's also weird to call hackers "security experts". Are burglars security experts? I suppose some are, but they don't have to be, and it's not the first group of people that comes to mind when I hear "security expert".
Kevin Mitnick now works as a security consultant so I suppose he is a security expert, but he's not famous for his consulting work. I don't think Julian Assange can be classified as a security expert. Both of these guys just are/were in the newspapers a lot; that doesn't make them experts on anything. -- BenRG (talk) 03:19, 17 March 2013 (UTC)[reply]
We've articles on both the older meaning Hacker (programmer subculture) and the current idea of Hacker (computer security). Um I see there is also a third article Hacker (term). I think there has been a bit of a WP:POVSPLIT here. Oh dear also Hacker (hobbyist). Dmcq (talk) 12:02, 17 March 2013 (UTC)[reply]

My speestream is diconnecting alot, what can be the problem?[edit]

My speestream internet modem (some example pic of the modem I found: http://www.weeta.net/reseau/free-adsl-efficient-networks-speedstream-5200/images/speedstream-5200-1024-01.jpg) is diconnecting alot, what can be the problem? Right now he is disconnecting almost every 2 minutes, but some days it take 1.5 hours to disconnect.201.78.129.104 (talk) 16:41, 16 March 2013 (UTC)[reply]

The problem probably could be anywhere - in the modem, in the lines to your ISP, or on their end. In the past, my cable modem behaved like that, and the problem turned out to be in the lines between me and them. Bubba73 You talkin' to me? 02:22, 17 March 2013 (UTC)[reply]