Date: Thu, 8 Dec 2011 07:37:12 +0100 From: Matthias Apitz <guru@unixarea.de> To: freebsd-questions@freebsd.org Cc: freebsd-usb@freebsd.org Subject: restore(8) to UFS on USB key: terrible slow Message-ID: <20111208063711.GA6482@tinyCurrent>
next in thread | raw e-mail | index | archive | help
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: <Generic Mass Storage, class 0/0, rev 2.00/1.02, addr 3> 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: <Generic Flash Disk 8.07> 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 <guru@unixarea.de> - 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111208063711.GA6482>