From owner-freebsd-hackers Tue May 16 05:25:46 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id FAA08836 for hackers-outgoing; Tue, 16 May 1995 05:25:46 -0700 Received: from mail.cs.tu-berlin.de (root@mail.cs.tu-berlin.de [130.149.17.13]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id FAA08812 for ; Tue, 16 May 1995 05:25:41 -0700 Received: from opal.cs.tu-berlin.de (root@opal.cs.tu-berlin.de [130.149.17.5]) by mail.cs.tu-berlin.de (8.6.10/8.6.10) with ESMTP id OAA22263; Tue, 16 May 1995 14:03:22 +0200 From: Wolfram Schneider Received: from ole.cs.tu-berlin.de (wosch@ole.cs.tu-berlin.de [130.149.28.1]) by opal.cs.tu-berlin.de (8.6.9/8.6.9) with ESMTP id NAA24785; Tue, 16 May 1995 13:54:44 +0200 Received: (wosch@localhost) by ole.cs.tu-berlin.de (8.6.10/8.6.6) id NAA06414; Tue, 16 May 1995 13:54:40 +0200 Date: Tue, 16 May 1995 13:54:40 +0200 Message-Id: <199505161154.NAA06414@ole.cs.tu-berlin.de> To: Bruce Evans Cc: hackers@FreeBSD.org, John Matzner Subject: Re: slow floppy In-Reply-To: <199505151653.CAA04994@godzilla.zeta.org.au> References: <199505151653.CAA04994@godzilla.zeta.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: hackers-owner@FreeBSD.org Precedence: bulk Bruce Evans writes: >>My floppy is very very very slow. > >>copy 1.2 MB: >>1) mcopy 50 sec >>2) cat 165 sec >>3) dd 165 sec >>4) mount -t msdos 585 sec (!!!) > >>4) mean that I need 1 1/2 h for installing bindist! A poor null modem >>is faster. > >cat and `dd bs=18k' on the raw device should be faster. The default >block size for /dev/fd0 is stupid (2k) while the default block size >for /dev/rfd0 is better (16k) although it still has nothing to do >with a hardware. dd if=/dev/fd0 of=/tmp/fd bs=18k 153 sec dd if=/dev/rfd0 of=/tmp/fd bs=18k 49 sec :-)) Hack without mread: $ dd if=/dev/rfd0 of=/tmp/fd bs=18k $ vnconfig -c /dev/vn0c /tmp/fd $ mount -t msdos /dev/vn0c /mnt $ cp /mnt/* /usr/distrib $ umount /mnt $ vnconfig -u /dev/vn0c $ rm /tmp/fd $ eject ~55 sec I hope we have some bytes on boot floppy for vnconfig? The following text shound be in the FAQ or Handbook (FreeBSD improve, TODO long) >The good performance for mcopy is probably because it uses the raw >device with a large block size and the especially bad performance >for msdosfs is probably because it uses the tiny file system block >size of 512 bytes. msdosfs apparently reads only one block at a >time and your system is apparently just slow enough that reading >adjacent blocks in separate i/o's requires waiting a full disk >revolution between the blocks. Thus you get a speed of about 1/5 >second per block and it takes at least 2880 / 5 = 576 seconds to >read the whole disk. > >To fix this, msdosfs needs to be improved. It doesn't call the vfs >clustering routines. It needs to call them or do its own clustering. >(The original version of it should have done its own clustering since >vfs clustering didn't exist then. ufs didn't suffer so much from >the lack of clustering because of its larger block size.) > >Bruce Gruß Wolfram -- http://hyperg.cs.tu-berlin.de/C~wosch