[Novalug] need dd help

Jason Kohles jkohles@palantir.com
Mon Feb 13 16:25:22 EST 2012


Replacing the computer with something else won't solve the problem, the
bottleneck is the bus speed.

For a USB 2.0 drive, the theoretical maximum transfer speed is 480Mbps,
but most drives don't get near the theoretical max, and actually give you
a transfer rate of somewhere around 320Mbps (or 40MB/s).  For a 1TB drive,
40MB/s means that you can write to the entire drive in 26,214.4 seconds,
or slightly over 7 hours.

The other problem comes with the fact that USB is a shared bus, so if you
have more than one USB drive on the same controller they share the total
bandwidth available for that controller (so if you are trying to erase
multiple drives you will probably be done much sooner if you do them one
at a time.  In addition, if you plug USB drives into a hub or have drives
on the same controller as USB 1.0 devices, the bus will run much slower at
that point as well.

This second problem could be resolved by using a dedicated device (then
you don't have to worry about the shared bus), but it would need to be a
dedicated computer, rather than something like an Arduino.

The current models of Arduino have an onboard USB controller chip
(ATMega32U2) which is programmed to act as a USB-to-Serial adapter.  It is
possible to program this chip to act as a USB host (though I don't think
you could do this with an Arduino, since it lacks the circuitry required
to act as a host) that could write to a USB hard drive.  This would not
increase the speed though, even if you could get it to work, since this
chip is not fast enough to be used as a high-speed USB device.  So once
you had figured out all the programming needed to write to the hard drive
(assuming you could fit it in the 32K of flash memory of the chip), the
theoretical maximum bus speed is now 12Mbps, or roughly 1.5MB/s, so the
time to write to every block of your 1TB drive is now just under 700,000
seconds, or slightly more than 8 days.

-- 
Jason Kohles
Palantir Technologies | UNIX Systems Engineer
jkohles@palantir.com  | 703.957.5784







On 2/13/12 4:03 PM, "Ed James" <edward.james@gmail.com> wrote:

I've been wondering what the main bottleneck is for this
issue which Jason addresses.  I'm also wondering if a dedicated
"gadget", say an Arduino board set up strictly to null-out or erase a
large HD would be a good solution?  If so, it seems like
this concept would also apply to a HD tester device.

I'm guessing that a special interface would need to be
wired up.  My reading (no hands-on experience yet) says
that the Arduino conceptualizes an RS232 interface but
implements a USB interface to the outside world.  It
actually sounds like a low-cost but interesting and useful
project.

Ed James

On 2/13/12, Jason Kohles <jkohles@palantir.com> wrote:
> How long it takes depends primarily on the bus speed of the drive and the
> number of passes you tell it to do, which tool you use to do it is
>largely
> irrelevant..
...
_______________________________________________
Novalug mailing list
Novalug@calypso.tux.org
http://calypso.tux.org/mailman/listinfo/novalug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4634 bytes
Desc: not available
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20120213/50d20f76/attachment.p7s>


More information about the Novalug mailing list