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/
pgpxHABWWBKWB.pgp
Description: PGP signature
|