xfs
[Top] [All Lists]

Re: Strange system behaviour when copying disks

To: linux-xfs@xxxxxxxxxxx
Subject: Re: Strange system behaviour when copying disks
From: Ethan Benson <erbenson@xxxxxxxxxx>
Date: Fri, 16 May 2003 00:51:12 -0800
In-reply-to: <1053073784.1718.28.camel@venus>
Mail-copies-to: nobody
Mail-followup-to: linux-xfs@xxxxxxxxxxx
References: <1052916810.2395.15.camel@venus> <1053005705.952.13.camel@venus> <20030516062500.GX27626@xxxxxxxxxxxxxxx> <1053073784.1718.28.camel@venus>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Fri, May 16, 2003 at 10:29:43AM +0200, Olaf Fr?czyk wrote:
> On Fri, 2003-05-16 at 08:25, Ethan Benson wrote:
> > 
> > what happens if you use bs=4096 to dd ? 
> > 
> > doing a strace of cat shows it appears to do read/writes in 4096 byte
> > blocks perhaps this is making a difference.
> I have tried 512,1024,2048,4096,8192,16384.
> It works smoothly with all above values.
> The only difference was with 512: the speed was cut about half.
> dd if=/dev/zero of=/dev/hda1 bs=1 count=100000000 also doesn't make the
> system unresponsive
> 
> So, it is not because of block size.
> Also cat /dev/hda1 > /dev/null doesn't hurt.
> 
> But cat /dev/zero > /dev/hda1 makes the system even more unresponsive
> than doing cat /dev/hda1 > /dev/hdc1
> 
> So the output redirection from bash does something strange for normal
> block devices. I think.

no not really, all bash is doing is setting stdout to the file you
specify for the redirect before it execs cat.  looking at strace tests
i don't really see any real difference between what dd is doing and
what cat ends up doing.

> Does someone has an idea what is the cause?

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpiM3KPSkyZA.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>