Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Dec 2011 15:35:59 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        Matthias Apitz <guru@unixarea.de>
Cc:        freebsd-questions@freebsd.org, freebsd-usb@freebsd.org
Subject:   Re: restore(8) to UFS on USB key: terrible slow
Message-ID:  <201112081535.59262.hselasky@c2i.net>
In-Reply-To: <20111208112418.GA2370@tinyCurrent>
References:  <20111208063711.GA6482@tinyCurrent> <201112081147.46641.hselasky@c2i.net> <20111208112418.GA2370@tinyCurrent>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112081535.59262.hselasky>