View Single Post
  #1   (View Single Post)  
Old 16th June 2010
sharris sharris is offline
Package Pilot
 
Join Date: Jun 2010
Posts: 146
Default Why is FreeBSD dd so slow?

Hello daemon forum,

May 8, 2010 I pass my Linux+ on-line course and I jump ship for FreeBSD the first chance I got. I been searching google for an answer for many months off and on, and today, all day and night all because I decided to give FreeBSD another try at dd'ng. I finally found a few threads with the same possible problem.

I notice while searching, many times there is a solution but no comparison which would makes the solution only a work around and truth is never gain in some cases. Here's an example and out of all of the hints I typed in google search box I only came up with these two thread from the entire world of BSD.

daemonforums.org/showthread.php?t=2077

and another one else where ...

Below should give you a general idea of the problem. I retested with clean partitions, reformatted exactly the same, complete shutdown and re-boot so there would be no side effects... I even done complete reinstall of all 21 partitions and 4 OS's many times and all FreeBSD's is always slow and get slower for no reason at all when you reverse steps, no matter what you do or how you do it. I use to say to myself, "LINUX is skipping something and FreeBSD is taking its time to do things right", but I never had a problem out any of my Arch-Linux dd style backups so today I concluded it's foolish of me to keep making excuses for FreeBSD. I'm at the point I don't beleive what I been seeing and I need some real life answers from experienced people.

Could someone please tell me what's going one here and how could this possibly affect a production system. It got to be something even if dd is not used directly, because if other functions use some of what dd (same line of code or two) does for other things in the systems and if so, there got to be some kind of unnoticeable effect. FreeBSD seems to be chewing on the wrong bits and pieces.

WIPE A PARTITION - FINAL:
dd if=/dev/zero of=/dev/ad4s2 (arch) 10,742,215,680 - 11.0GB - 114s = 2.0m - 94.0MB/s
dd if=/dev/zero of=/dev/ad4s2 (arch) 10,742,215,680 - 11.0GB - 793s = 13.0m - 17.0MB/s
dd if=/dev/zero of=/dev/ad4s2 (freebsd)10,742,215,680 - 11.0GB - 1418s = 23.0m - 7572536b/s


As you see it takes FreeBSD twice the time as it does Arch-Linux, even when Arch jump to 793sec but never over. FreeBSD will jump to over an hours at times which makes no since on a 10GB partition.

Also at this very minute it finishing:

CLONE A PARTITION - FINAL:
dd if=/dev/ad4s1 of=/dev/ad4s11 (arch) 10,742,183,424 - 11.0GB - 305s = 5.0m - 32.2MB/s
dd if=/dev/ad4s2 of=/dev/ad4s12 (arch) 10,742,183,424 - 11.0GB - 305s = 5.0m - 32.2MB/s
dd if=/dev/ad4s3 of=/dev/ad4s13 (arch) 42,952,379,904 - 43.0GB - 1231s = 21.0m - 34.9MB/s


As you see above, "CLONE A PARTITION" Arch-Linux has always did a good job and it is consistence 95% of the time no matter how many back to back repeats I do, 5 min for 10GB and 21 min for 40GB is the working average I always get.

But at this moment while writing this thread, cloning with FreeBSD has taken over three hour. Here are the final results and I am burn-out. The average is usually only ½ hour or a hour and 5 minutes even for FreeBSD, depending on how freebsd feel at the moment, I guest

20980827+0 record in
20980827+0 record out
10742183424 bytes transferred in 12376.074103 secs (867980 bytes/sec)


That's 3 hours and 26 min and it strange that record in and out are even??? That not the correct way I been getting. Should be (last three digits) 827-826 or vice-versa. Things change so much I can't remember anymore. I was suppose to be learning pf and ALTQ options today but you seen what I get ... 3-hours per 10GB


I have no programs installed so far except bash.

Partition 1: FreeBSD AMD - 10GB
Partition 2: FreeBSD i386 - 10GB
Partition 3: pcbsd AMD - 40GB
Partition 4: Arch-Linux and three happy back-up partiion
of same size 10GB - 10GB - 40GB and the rest for stoarge

As you may have figure, I am a real noob but my plan is, when I make a major changes, I may save one optimized for pf and another as a databbase and so on so. I rather dd to make a backup of the entire partition so there will be no possible flaws and moving from one machine to another is more easy for me to keep up with. Sorry for the long thread but I did'nt want to leave out any important detail.

Thanks in advance
Reply With Quote