From owner-freebsd-usb@FreeBSD.ORG Wed Jun 18 00:47:17 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FE9C106568B for ; Wed, 18 Jun 2008 00:47:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id F0F608FC0C for ; Wed, 18 Jun 2008 00:47:16 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=V7snZCuVm3QA:10 a=ihx7ZZ4X16QA:10 a=6I5d2MoRAAAA:8 a=fcQkrlldzcwKyoTK2vwA:9 a=q55sZbDfFj3tsHmHuRQA:7 a=P6LrVjtz9Edzi6m4SnxegI65zycA:4 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 Received: from [71.120.223.131] (account mc467741@c2i.net HELO [172.20.100.16]) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.4b) with ESMTPA id 977472470; Wed, 18 Jun 2008 01:47:13 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 18 Jun 2008 01:48:46 +0200 User-Agent: KMail/1.9.7 References: <200806170936.m5H9aIJn085539@fire.js.berklix.net> In-Reply-To: <200806170936.m5H9aIJn085539@fire.js.berklix.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806180148.46908.hselasky@c2i.net> Cc: usb@freebsd.org, Julian Stacey Subject: Re: best block size for file systems on USB media ? 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: Wed, 18 Jun 2008 00:47:17 -0000 On Tuesday 17 June 2008, Julian Stacey wrote: > Hi usb@freebsd.org > Do USB flash memory sticks have cache ram ? What are best file > system block sizes to write USB media (to maximise access speed) ? > Any URLS to RTFM welcome ;-) > > I'm using mine to back up my personal tree of private data, (mail > & tech notes & sources etc, lots of smallish files), I'm using > /usr/ports/net/rdist6 to backup. > > My biggest stick, a 2G Sandisk Cruzer micro (vendor 0x0781 product > 0x5151) is awfully slow (much slower per Meg than other manufacturers > smaller sticks) (& other 2G Sandisk sticks bought in same purchase > from same vendor are also awfully slow on Win-XP, so maybe these > have less or no cache ram (if such things have cache at all ?) or > maybe they were a fraudulent batch without cache when they should > have had cache or ... ? ) Maybe some other sticks work on different > block size ? Maybe for many of my small files, the stick needs to > read a big block, before modifying a small chunk & writing back to > block ? > > Block sizes was a question I'd meant to ask earlier, just for normal > sticks with a normal FreeBSD FS on there, now it's become even more > of an interest, using a BSD FS within an encrypted gbde partition > ref. Read > http://www.freebsd.org/doc/en/books/handbook/disks-encrypting.html which > is slower still from encyption overhead (noticeable doing a reload > into new empty FS). > > Some FS issues might be better discussed later on fs@freebsd.org, > but first, what's known about USB hardware block sizes please ? Hi, The blocksize for USB Flash is typically 512 bytes due to wMaxPacketSize being 512 bytes at High Speed USB. The SCSI command set allows you to read up to 32MByte in one go, but FreeBSD typically does not read/write more than 64K. --HPS