From owner-freebsd-questions Sat Jul 8 11:50:25 2000 Delivered-To: freebsd-questions@freebsd.org Received: from implode.root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id 61E4B37B7C7 for ; Sat, 8 Jul 2000 11:50:22 -0700 (PDT) (envelope-from dg@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.8/8.8.5) with ESMTP id LAA27699; Sat, 8 Jul 2000 11:38:20 -0700 (PDT) Message-Id: <200007081838.LAA27699@implode.root.com> To: "James A. Mutter" Cc: Emmanuel Gravel , freebsd-questions@FreeBSD.ORG Subject: Re: Performance issues with dd In-reply-to: Your message of "Fri, 07 Jul 2000 22:27:10 CDT." From: David Greenman Reply-To: dg@root.com Date: Sat, 08 Jul 2000 11:38:20 -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > As a backup measure, I'm using two hard drives of the same size, > > but only mounting one, and I have a cron job that dd's one to > > the other every night. The drives are 18 GB U160 SCSI, on a > > AHA-29160N. The whole process takes 45 minutes. A quick calc > > tells me it should be finished at best in 2 minutes, at peak > > rate. This is over a 20x difference. > > > > Does anyone have any idea why it's taking so long? Is it just > > dd that's the problem? The CPU is a PIII 650, and there's more > > than enough memory to go, so I don't think the CPU would be > > any kind of an impact here. Is there a better app out there > > to do the job? I'm dumping one full raw device to the other, > > not individual partitions. Could that be another problem? > > > >Since you're duplicating an entire disk why not try RAID 0? It's >probably a better solution than "dd" and will keep you spare as current >as possible. You mean RAID 1 (mirroring). RAID 0 is just striping and offers no redundancy. >As far as "dd" goes, consider ditching it and using dump/restore, pax, >or tar. You may not know it, but "dd" is duplicating the entire disk, >bad sectors and all. Worse than that, if the filesystem changes during the dd, you could end up with a copy that is completely trashed and worthless. It's really much smarter to do as you suggest and use something else to copy the contents. I personally prefer tar. -DG David Greenman Co-founder, The FreeBSD Project - http://www.freebsd.org Manufacturer of high-performance Internet servers - http://www.terasolutions.com Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message