From owner-freebsd-questions@FreeBSD.ORG Thu Sep 18 18:48:44 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B26BC16A4B3 for ; Thu, 18 Sep 2003 18:48:44 -0700 (PDT) Received: from smtp.covadmail.net (mx04.covadmail.net [63.65.120.64]) by mx1.FreeBSD.org (Postfix) with SMTP id 988C343FAF for ; Thu, 18 Sep 2003 18:48:43 -0700 (PDT) (envelope-from strick@covad.net) Received: (covad.net 5399 invoked from network); 19 Sep 2003 01:48:38 -0000 Received: from unknown (HELO ice.nodomain) (68.164.193.169) by sun-qmail03 with SMTP; 19 Sep 2003 01:48:38 -0000 Received: from ice.nodomain (localhost [127.0.0.1]) by ice.nodomain (8.12.8p1/8.12.8) with ESMTP id h8J1mgGo000708; Thu, 18 Sep 2003 18:48:42 -0700 (PDT) (envelope-from dan@ice.nodomain) Received: (from dan@localhost) by ice.nodomain (8.12.8p1/8.12.8/Submit) id h8J1mgZX000707; Thu, 18 Sep 2003 18:48:42 -0700 (PDT) Date: Thu, 18 Sep 2003 18:48:42 -0700 (PDT) From: Dan Strick Message-Id: <200309190148.h8J1mgZX000707@ice.nodomain> To: freebsd-questions@freebsd.org cc: dan@ice.nodomain Subject: improbably slow CD-ROM I/O X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2003 01:48:44 -0000 X-List-Received-Date: Fri, 19 Sep 2003 01:48:44 -0000 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