LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-26-2009, 08:37 PM   #1
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18

Rep: Reputation: 0
Strange DD Speed Problem


I am often creating clones of hard drives and I have come across something I don't understand. If I DD to a hard drive that has been previously used, the DD takes about 35 minutes. If I clone to a completely brand new drive, the DD takes over 100 minutes. If I immediately run the DD command again, on the same set of drives, the DD now only takes 35 minutes. Why are brand new drives causing the DD to take 70 extra minutes?
 
Old 10-27-2009, 02:04 PM   #2
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
what happens if you delete all partitions and dd it again
is it slow again?
 
Old 10-27-2009, 05:42 PM   #3
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18

Original Poster
Rep: Reputation: 0
I have not tried that. I'll try that some time this week. How would I delete all the partitions?
 
Old 10-27-2009, 08:22 PM   #4
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by benchmarkman View Post
I have not tried that. I'll try that some time this week. How would I delete all the partitions?
fdisk
 
Old 10-30-2009, 04:57 PM   #5
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18

Original Poster
Rep: Reputation: 0
So I cleaned the drive before DD and it only took 40 minutes. I'm really confused why would a brand new drive cause DD to take twice as long. I've reproduced this more than 10 times so I know it wasn't random.
 
Old 10-30-2009, 05:07 PM   #6
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by benchmarkman View Post
So I cleaned the drive before DD and it only took 40 minutes. I'm really confused why would a brand new drive cause DD to take twice as long. I've reproduced this more than 10 times so I know it wasn't random.
maybe there is some sort of first time use setup? i do not know.
 
Old 10-30-2009, 05:23 PM   #7
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by smeezekitty View Post
maybe there is some sort of first time use setup? i do not know.
I thought DD was straight dumb copy to copy ?
 
Old 11-07-2009, 07:10 AM   #8
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18

Original Poster
Rep: Reputation: 0
Nobody has a reasonable explenation on what I am seeing?
 
Old 11-07-2009, 12:35 PM   #9
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,120

Rep: Reputation: 549Reputation: 549Reputation: 549Reputation: 549Reputation: 549Reputation: 549
I'm not sure exactly why DD does this, but I do know new drives are written many times with solid binary 1s (ones), or 0xff, over the entire drive. Whereas a used drive has all the free space written as binary zeroes. The DD buffers may be choking on the binary 1s. DD buffers every block 4 times for each read/write. It could be a programming flaw. The other thing is if MSWindows was installed on the drive, DD won't overwrite the whole drive on the first try. If you DD a drive with zeroes, but Windows is on the drive, parts of the drive won't erase until the second time you run DD. Windows has some way of causing this to happen. I never did figure it out. So, the way around the Windows problem is to run DD for a count=10,000, several times in a row, reboot, and run a full DD.
 
Old 11-07-2009, 01:31 PM   #10
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AwesomeMachine View Post
I'm not sure exactly why DD does this, but I do know new drives are written many times with solid binary 1s (ones), or 0xff, over the entire drive. Whereas a used drive has all the free space written as binary zeroes. The DD buffers may be choking on the binary 1s. DD buffers every block 4 times for each read/write. It could be a programming flaw. The other thing is if MSWindows was installed on the drive, DD won't overwrite the whole drive on the first try. If you DD a drive with zeroes, but Windows is on the drive, parts of the drive won't erase until the second time you run DD. Windows has some way of causing this to happen. I never did figure it out. So, the way around the Windows problem is to run DD for a count=10,000, several times in a row, reboot, and run a full DD.
Thanks for the reply. It's not a windows thing because the drivers are brand spanking new. Have you ever encountered this problem yourself? Is there anyway around this?
 
Old 11-07-2009, 01:48 PM   #11
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
maybe dd is buggy?
 
Old 11-07-2009, 02:52 PM   #12
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18

Original Poster
Rep: Reputation: 0
If thee was a bug in dd this significant wouldn't other people have experienced this problem? It seems like nobody else is having this problem.
 
  


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
Strange speed problems on Apache tmr_leon Linux - Server 2 10-22-2008 12:54 AM
strange behavior with setting GPS serial port speed dovkruger Programming 1 11-17-2007 04:55 PM
strange, strange alsa problem: sound is grainy/pixellated? fenderman11111 Linux - Software 1 11-01-2004 06:16 PM
Strange Samba speed problem jpc82 Linux - Networking 0 05-26-2004 05:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:53 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration