LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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
 
Thread Tools
Old 10-26-2009, 08:37 PM   #1
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18
Thanked: 0
Strange DD Speed Problem


[Log in to get rid of this advertisement]
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?
windows_vista benchmarkman is offline     Reply With Quote
Old 10-27-2009, 02:04 PM   #2
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: washington U.S.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 1,246
Thanked: 60
what happens if you delete all partitions and dd it again
is it slow again?
windows_vista smeezekitty is offline     Reply With Quote


Old 10-27-2009, 05:42 PM   #3
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18
Thanked: 0

Original Poster
I have not tried that. I'll try that some time this week. How would I delete all the partitions?
windows_vista benchmarkman is offline     Reply With Quote


Old 10-27-2009, 08:22 PM   #4
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: washington U.S.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 1,246
Thanked: 60
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
windows_vista smeezekitty is offline     Reply With Quote


Old 10-30-2009, 04:57 PM   #5
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18
Thanked: 0

Original Poster
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.
windows_vista benchmarkman is offline     Reply With Quote


Old 10-30-2009, 05:07 PM   #6
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: washington U.S.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 1,246
Thanked: 60
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.
windows_vista smeezekitty is offline     Reply With Quote


Old 10-30-2009, 05:23 PM   #7
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18
Thanked: 0

Original Poster
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 ?
windows_vista benchmarkman is offline     Reply With Quote


Old 11-07-2009, 07:10 AM   #8
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18
Thanked: 0

Original Poster
Nobody has a reasonable explenation on what I am seeing?
windows_vista benchmarkman is offline     Reply With Quote


Old 11-07-2009, 12:35 PM   #9
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA
Distribution: Debian Squeeze, SuSE 11.0, F8, F10, F11 x86_64
Posts: 1,130
Thanked: 16
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.
linuxfedora AwesomeMachine is offline     Reply With Quote


Old 11-07-2009, 01:31 PM   #10
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18
Thanked: 0

Original Poster
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?
windows_vista benchmarkman is offline     Reply With Quote


Old 11-07-2009, 01:48 PM   #11
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: washington U.S.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 1,246
Thanked: 60
maybe dd is buggy?
windows_vista smeezekitty is offline     Reply With Quote


Old 11-07-2009, 02:52 PM   #12
benchmarkman
LQ Newbie
 
Registered: Feb 2006
Posts: 18
Thanked: 0

Original Poster
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.
windows_vista benchmarkman is offline     Reply With Quote



Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 01:22 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration