From owner-freebsd-questions@FreeBSD.ORG Thu Dec 8 06:37:16 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9B6B1065670 for ; Thu, 8 Dec 2011 06:37:16 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id 446148FC0C for ; Thu, 8 Dec 2011 06:37:16 +0000 (UTC) Received: from [88.217.23.127] (helo=localhost.my.domain) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1RYXbW-0004M7-O5; Thu, 08 Dec 2011 07:37:15 +0100 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.my.domain (8.14.4/8.14.3) with ESMTP id pB86bC5s006496; Thu, 8 Dec 2011 07:37:13 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.14.4/8.14.3/Submit) id pB86bC3M006495; Thu, 8 Dec 2011 07:37:12 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Thu, 8 Dec 2011 07:37:12 +0100 From: Matthias Apitz To: freebsd-questions@freebsd.org Message-ID: <20111208063711.GA6482@tinyCurrent> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 9.0-CURRENT r214444 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Originating-IP: 88.217.23.127 Cc: freebsd-usb@freebsd.org Subject: restore(8) to UFS on USB key: terrible slow X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2011 06:37:16 -0000 Hello, I encounter the following problem with UFS file systems on USB keys, i.e. the problem is not only with one key, but with all I have; the key in question here is: Dec 7 22:17:47 tinyCurrent kernel: umass0: on usbus4 Dec 7 22:17:47 tinyCurrent kernel: umass0: SCSI over Bulk-Only; quirks = 0x4101 Dec 7 22:17:47 tinyCurrent root: Unknown USB device: vendor 0x058f product 0x6387 bus uhub4 Dec 7 22:17:48 tinyCurrent kernel: umass0:0:0:-1: Attached to scbus0 Dec 7 22:17:48 tinyCurrent kernel: da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 Dec 7 22:17:48 tinyCurrent kernel: da0: Removable Direct Access SCSI-2 device Dec 7 22:17:48 tinyCurrent kernel: da0: 40.000MB/s transfers Dec 7 22:17:48 tinyCurrent kernel: da0: 7650MB (15667200 512 byte sectors: 255H 63S/T 975C) and the system is: $ uname -a FreeBSD tinyCurrent 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r214444: Thu Oct 28 10:56:32 CEST 2010 The key was formatted the usual way for receiving a complete FreeBSD system for installation purpose: # fdisk -I da0 # fdisk -B da0 # bsdlabel -w da0s1 auto # bsdlabel -B da0s1 # bsdlabel -e da0s1 # newfs /dev/da0s1a # mount /dev/da0s1a /mnt When I now bulk write a big file to the file system, the write performance is reasonable fast, even with blocks of 512 bytes, it gives 2 MByte / sec: # dd if=usb.dmp of=/mnt/byte 10926520+0 records in 10926520+0 records out 5594378240 bytes transferred in 2538.942585 secs (2203428 bytes/sec) the file of ~5 GByte was written and I removed it again; to be sure that the file system is synced, I do an unmount(8) and mount(8) it again before: # df -kh /mnt Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 7.2G 5.2G 1.4G 79% /mnt tinyCurrent# umount /mnt tinyCurrent# mount /dev/da0s1a /mnt tinyCurrent# df -kh /mnt Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 7.2G 5.2G 1.4G 79% /mnt tinyCurrent# rm /mnt/byte tinyCurrent# df -kh /mnt Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 7.2G 24M 6.6G 0% /mnt when I now restore a DUMP into the filesystem, the restore(8) creates first the directory tree: # cd /mnt # restore rvf /home/guru/usb.dmp this goes very fast (as far as I see from the lines scrolling) for the first few thousand dirs: ... Make node ./src/src/contrib/sendmail/.svn Make node ./src/src/contrib/sendmail/.svn/tmp Make node ./src/src/contrib/sendmail/.svn/tmp/text-base Make node ./src/src/contrib/sendmail/.svn/tmp/prop-base Make node ./src/src/contrib/sendmail/.svn/tmp/props Make node ./src/src/contrib/sendmail/.svn/prop-base Make node ./src/src/contrib/sendmail/.svn/props Make node ./src/src/contrib/sendmail/.svn/text-base after a while it get stuck and only does create the dirs with a frequence of one per second; also the used space is growing very slow: # df -kh /mnt Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 7.2G 42M 6.6G 1% /mnt this is after an hour or so: only 42 MBytes are written now; Any idea, what is broken with this? Thanks matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.unixarea.de/ UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5