[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How long will this take?



On 2020-06-08 13:22, Matthew Campbell wrote:
I bought a new 4 terrabyte hard drive that is connected with a USB cable using USB2. It took about 32 hours to read every sector on the drive to look for bad sectors. I started blanking the sectors using /dev/zero last Friday night. It still isn't done. Is there a way I can find out how much data a particular process has written to the disk? I'm using Debian 10.4.

dd if=/dev/zero of=/dev/sdb ibs=4096 count=976754646

name=Matthew%20Campbell&email=trenix25%40pm.me

Install 'nmon'. Then start a terminal and run 'nmon'. Press 'd' to display the disk monitoring screen. This will show read throughput, write throughput, and percent utilization.


Alternatively, if you are using the Xfce desktop, add a Disk Performance Monitor applet to the panel and configure it for the correct device node /dev/sdX:

	Device			/dev/sdX
	unchecked Label		sdX
	Update interval(s)	1.000
	Monitor			Busy time
	checked Combine Read/Write data

Then hover your mouse pointer over the applet and it will show you read, write, and total statistics for both throughput and for busy time.


USB 2.0 ports have a maximum write speed around 25 MB/s. eSATA ports (version 1) get much closer to their theoretical maximum of 150 MB/s. USB 3.0 beats them both. Of course, you must have a fast drive and a fast program.


When using dd(1) to write blocks to a raw drive, use a block size of 1M (e.g. 1 Mibabyte). As others have stated, a small block size of 4K will significantly reduce throughput due to I/O overhead.


Also as others have stated, writing zeros to an SSD may wear it out prematurely (depends upon internals of SSD). The best approach is to do a "secure erase".


Rather than wiping storage devices with GNU/Linux userland tools, your best bet is to use the manufacturer's diagnostic utility. In the ideal case, the utility sends a command to the drive controller and everything gets done internally at maximum speed. I prefer the bootable "Live" tools, if available. Each manufacturer has their own toolkit. Get the one for your drive brand. For example, SeaTools Bootable:

https://www.seagate.com/support/downloads/seatools/


David


Reply to: