From owner-freebsd-usb@FreeBSD.ORG Wed Nov 17 14:09:22 2010 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 E717C106564A for ; Wed, 17 Nov 2010 14:09:22 +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 7864E8FC16 for ; Wed, 17 Nov 2010 14:09:22 +0000 (UTC) Received: from [193.31.11.193] (helo=current.Sisis.de) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PIihL-0005db-Lh; Wed, 17 Nov 2010 15:09:19 +0100 Received: from current.Sisis.de (current [127.0.0.1]) by current.Sisis.de (8.14.3/8.14.3) with ESMTP id oAHE9Ix5003166; Wed, 17 Nov 2010 15:09:18 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by current.Sisis.de (8.14.3/8.14.3/Submit) id oAHE9ITV003165; Wed, 17 Nov 2010 15:09:18 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: current.Sisis.de: guru set sender to guru@unixarea.de using -f Date: Wed, 17 Nov 2010 15:09:18 +0100 From: Matthias Apitz To: Alexander Best Message-ID: <20101117140918.GA3123@current.Sisis.de> References: <20101117120852.GA2458@current.Sisis.de> <201011171314.19524.hselasky@c2i.net> <20101117133914.GA2895@current.Sisis.de> <201011171444.35916.hselasky@c2i.net> <20101117135259.GA74544@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20101117135259.GA74544@freebsd.org> X-Operating-System: FreeBSD 8.0-CURRENT (i386) User-Agent: Mutt/1.5.19 (2009-01-05) X-Con-Id: 51246 X-Originating-IP: 193.31.11.193 Cc: freebsd-usb@FreeBSD.ORG Subject: Re: restore(8) to USB key: terrible slow X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 14:09:23 -0000 El día Wednesday, November 17, 2010 a las 01:52:59PM +0000, Alexander Best escribió: > > > Thanks; I have to build a kernel for this ... > > > > > > When I write the key just with dd(1) it performs normal with big blocks: > > > > > > # dd if=/home/guru/usb9root.dmp of=/dev/da0 bs=1m count=100 > > > 100+0 records in > > > 100+0 records out > > > 104857600 bytes transferred in 16.650550 secs (6297546 bytes/sec) > > > > > > and slow with 512 byte blocks: > > > > > > # dd if=/home/guru/usb9root.dmp of=/dev/da0 count=100 > > > 100+0 records in > > > 100+0 records out > > > 51200 bytes transferred in 1.997130 secs (25637 bytes/sec) > > > > > > any idea or do we need the debug output? > > > > > > matthias > > > > What block size does the dump utility use? > > dump(8) says 10k. The -b of dump(8) is for the output device (which in my case was a plain file, and the 3 GByte was dumped in ~10 minutes). I think it does not influence the write performance of restore(8). Interestingly, after the above write with dd(1) over sector 0 (...) and after recreating the FreeBSD layout on the key (fdisk(8), bsdlabel(8), newfs(8)), the restore(8) now works much faster. There are a lot of small files (a complete /usr/src/sys after SVN checkout with all SVN control files) and a complete FreeBSD live system in this dump(8). The dump(8) and restore(8) is only to make from a 16 GByte bootable USB key with a lot of free space on it a smaller 4 GByte key to give it away to some FreeBSD lovers in Cuba so that they can distribute it there, not needing such a big 16 GByte USB key. Any other idea to shrink a 16 GB file system to 4 GB on a 2nd key? matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.unixarea.de/