improbably slow CD-ROM I/O

2003-09-18 Thread Dan Strick
On FreeBSD-4.8 I am trying to copy an iso image from a CD-ROM
onto disk with the command:

dd if=/dev/cd0c of=disk.iso bs=2k

The reason for the small buffer size is that I don't want to risk
losing the last few sectors on the CD-ROM because they didn't fill
a full dd buffer.  (Some disk drivers will not return a partially
filled input buffer if you run off the end of a drive.  I don't
know if the cd driver is one of them.  So I pick a buffer size that
I know evenly divides the CD size.  CD-ROMs generally use a
sector size of 2K byte.)

The dd starts off at a couple of MB/sec.  This may be a reasonable
I/O rate given the small buffer size.  Then it starts to slow down.
After reading several hundred MB, it slows down to the point where
the input rate is hard to measure.  Sometimes it even seems to stop
entirely.

This happens not only reading a SCSI CD on FreeBSD-4.8, but also
when reading an ATAPI CD on both FreeBSD-4.8 and FreeBSD-5.1.
It also slows down if I use a larger buffer size, though not to
such a ridiculous extent.

Can someone explain what is happening?  How should I go about making
a copy of a CD?

Dan Strick
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: improbably slow CD-ROM I/O

2003-09-18 Thread Guillaume
Le Jeu 18/09/2003 à 21:48, Dan Strick a écrit :
> Can someone explain what is happening?  How should I go about making
> a copy of a CD?
> 

Thomas just sent me a patch for a similar problem. 

Check this thread:

http://groups.google.ca/groups?q=cd0+ATAPICAM&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=bjcu47%242qc2%241%40FreeBSD.csie.NCTU.edu.tw&rnum=1

> Dan Strick
> [EMAIL PROTECTED]
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"