From owner-freebsd-usb@FreeBSD.ORG Thu Dec 8 14:38:36 2011 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA316106566B; Thu, 8 Dec 2011 14:38:36 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.c2i.net [212.247.154.98]) by mx1.freebsd.org (Postfix) with ESMTP id 150468FC0C; Thu, 8 Dec 2011 14:38:35 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe04.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 213700629; Thu, 08 Dec 2011 15:38:33 +0100 From: Hans Petter Selasky To: Matthias Apitz Date: Thu, 8 Dec 2011 15:35:59 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <20111208063711.GA6482@tinyCurrent> <201112081147.46641.hselasky@c2i.net> <20111208112418.GA2370@tinyCurrent> In-Reply-To: <20111208112418.GA2370@tinyCurrent> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-1?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-1?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201112081535.59262.hselasky@c2i.net> Cc: freebsd-questions@freebsd.org, freebsd-usb@freebsd.org Subject: Re: restore(8) to UFS on USB key: terrible slow X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2011 14:38:36 -0000 On Thursday 08 December 2011 12:24:18 Matthias Apitz wrote: > El d=EDa Thursday, December 08, 2011 a las 11:47:46AM +0100, Hans Petter= =20 Selasky escribi=F3: > > > I know (as I said) that dd(1) per default writes in blocks of 512 > > > bytes; but this is not the problem; the problem is the poor > > > performance of restore(8); the dd(1) was just to see if the USB key > > > performs fast enough in general; please read my post again :-) > >=20 > > Hi, > >=20 > > The "restore" utility also has a -b option for blocksize. Did you try > > that? >=20 > Hi, >=20 > I know, but I think this does not make any diff, because at the moment > restore(8) is only creating (empty) dirs and not storing files to the > disk; if one watches the restore(8) with truss(1) it looks like this: >=20 > # truss -p 2123 > write(1,"Make node ./home/guru/myThings/F"...,80) =3D 80 (0x50) > lseek(4,0x0,SEEK_CUR) =3D 4517312 (0x44edc0) > lseek(4,0x44ec98,SEEK_SET) =3D 4517016 (0x44ec98) > read(4,"7t\^W\0\f\0\^D\^A.\0\0\0(t\^W\0"...,1024) =3D 1024 (0x400) > lseek(4,0x0,SEEK_CUR) =3D 4518040 (0x44f098) > mkdir("./home/guru/myThings/FreeBSD/9-CURRENT/src/secure/libexec/sftp-ser= ve > r/.svn",0777) =3D 0 (0x0) > write(1,"Make node ./home/guru/myThings/F"...,85) =3D 85 (0x55) > lseek(4,0x0,SEEK_CUR) =3D 4518040 (0x44f098) > lseek(4,0x44ece0,SEEK_SET) =3D 4517088 (0x44ece0) > read(4,"8t\^W\0\f\0\^D\^A.\0\0\0007t\^W"...,1024) =3D 1024 (0x400) > lseek(4,0x0,SEEK_CUR) =3D 4518112 (0x44f0e0) >=20 > i.e. it goes through the DUMP and makes the directories; and any > mkdir(2) takes seconds!!! >=20 > one can even see this with: >=20 Hi, If it is a umass problem you will see USB timeouts. Else it is not a USB=20 problem. Try setting hw.usb.ehci.lostintrbug=3D1 in /boot/loader.conf. =2D-HPS