Why is Disk Utility / diskutil taking so long to zero out data?
Solution 1:
3TB external USB hard drive
There's your answer. 3TB is a lot of space.
I'm sure your 3TB disk is a spinning disk, that can effectively only sustain writes of about 60MBytes/sec (maybe recent drives are a little faster but any caching, etc. won't help you with a simple all-LBA random write).
It may go faster with being directly connected as suggested by @LeeHarrison.
Solution 2:
yes, writing random data across a 3tb volume will take a very long time. it generally takes about 8 hours per TB for formatting (not quick formatting), and that doesn't involve the extra overhead of having the CPU generate random data for each bit before its written. 1%/hour does seem a little slow, but I would still expect the job to take two days or so. the USB is probably whats really slowing you down, since the random generation has to cross every bus and bridge between the removable disk and the cpu.
Solution 3:
3TB is a lot of data and USB is both relative slow and has a lot of overhead.
Assuming you have USB 2 and a reasonably good performance of 30-35MB/sec. (this is about the max write speed for USB 2)
30 MB / sec
100 MB per 3 seconds
2000 MB per 60 seconds
2GB per min
120GB per hour, or 25 hours for 3 TB.
That is a long time. And speeds can differ somewhat. In your case it seems four times as slow. Decidedly not fast, but well within reasonably speeds. Especially if there are other USB devices busy on the same USB controller.
There are at least three ways to deal with this:
- Wait a long time.
- Use a faster bus to the disk (e.g. an eSATA enclosure. Or mount the disk internally)
- Do not send any data to the drive to wipe it. Instead tell the drive to wipe itself. Useful for this: DBAN and secure erase.