Date: Thu, 18 Sep 2003 18:48:42 -0700 (PDT) From: Dan Strick <strick@covad.net> To: freebsd-questions@freebsd.org Cc: dan@ice.nodomain Subject: improbably slow CD-ROM I/O Message-ID: <200309190148.h8J1mgZX000707@ice.nodomain>
next in thread | raw e-mail | index | archive | help
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 strick@covad.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309190148.h8J1mgZX000707>