LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-01-2008, 06:18 AM   #1
knappster
Member
 
Registered: Mar 2004
Posts: 175

Rep: Reputation: 30
dd performance on external hard drive


I've seen a lot of posts about dd for backing up dead hard drives, etc. I just used it to clear an external hard drive because Darik's Boot and Nuke does not work on external hard drives. I just wanted to post the results on this in case anybody wants to know how long it takes on external drives.

Note: I used the default block size.

Code:
dd if=/dev/urandom of=/dev/sdb
Quote:
dd: writing to `/dev/sdb': No space left on device
625142449+0 records in
625142448+0 records out
320072933376 bytes (320 GB) copied, 182781 seconds, 1.8 MB/s
For those of you who have not had math in a while, 182781 seconds = 50.7725 hours, which is just over 2 days. I just started another pass on the drive using a byte size of 1M, so I will post back with the results of it once it is completed (hopefully much quicker)
 
Old 11-01-2008, 07:15 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594
Check out frandom:
Code:
]# dd if=/dev/urandom of=/randfile bs=512 count=20000
10240000 bytes (10 MB) copied, 9.09083 seconds, 1.1 MB/s

]# dd if=/dev/frandom of=/randfile bs=512 count=20000
10240000 bytes (10 MB) copied, 0.924123 seconds, 11.1 MB/s

]# dd if=/dev/urandom of=/randfile bs=1M count=10
10485760 bytes (10 MB) copied, 8.73572 seconds, 1.2 MB/s

]# dd if=/dev/frandom of=/randfile bs=1M count=10
10485760 bytes (10 MB) copied, 0.504821 seconds, 20.8 MB/s
If you think fast can't be qualitatively good: just finish off writing some [PATTERN], then use your (forensic) tools to see if you can unearth something else than [PATTERN].
 
Old 11-01-2008, 09:41 PM   #3
knappster
Member
 
Registered: Mar 2004
Posts: 175

Original Poster
Rep: Reputation: 30
Hello unSpawn,

That sounds interesting. I am not that concerned about my data, I am RMAing a drive because the SATA data adapter broke, and I just wanted to do something a little better than formatting it to discourage anything. There's really nothing to hide on it anyway. But the results are:

Code:
dd bs=1M if=/dev/urandom of=/dev/sdb
Quote:
dd: writing `/dev/sdb': No space left on device
305246+0 records in
305245+0 records out
320072933376 bytes (320 GB) copied, 51600.7 seconds, 6.2 MB/s
14.3 hours is a pretty big improvement over 50+. I just thought maybe somebody would find this information useful.
 
Old 11-02-2008, 04:31 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594
Quote:
Originally Posted by knappster View Post
14.3 hours is a pretty big improvement over 50+.
Then imagine how fast it would be using frandom. Maybe set it up and post results as comparison? After all setting up frandom only takes you 5 minutes if you have the kernel source for your current kernel available and configured...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-04-2007 11:28 PM
external enclosure for an internal hard drive vs external USB hard drive powah Linux - Hardware 1 03-10-2006 09:03 AM
Linux Performance on an External Hard Drive ssimontis Linux - General 2 01-06-2006 06:57 AM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
external usb 2.0 hard drive performance experiences ad572 Linux - Hardware 7 10-15-2004 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration