Date: Wed, 23 Apr 2003 21:37:45 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: David Kelly <dkelly@hiwaay.net> Cc: FreeBSD-Questions@FreeBSD.org Subject: Re: block and fragment sizes with newfs Message-ID: <20030423193744.GA12282@falcon.midgard.homeip.net> In-Reply-To: <20030423163410.GA25333@grumpy.dyndns.org> References: <20030423163410.GA25333@grumpy.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 23, 2003 at 11:34:10AM -0500, David Kelly wrote: > Playing with UFS on CF (Compact Flash) cards where I'm concerned about > wear and tear, and maximum efficiency. > > It would seem "newfs -b 4096 -f 512" would result in fine grained > control over each and every 512 byte block on my CF card and eliminate > writes to multiple blocks when a write to a single block would do. > > The above creates a lot of "superblock backups", leading me to suspect > what I save in fragment size == block size, I lose in overhead to track > all these fragments. I don't think the overhead in used space for keeping track of the fragments would be significant. You might want to play with the -i parameter to newfs(8) to control how many inodes you need though. > > The default is "-b 16384 -f 2048", which if I understand correctly means > the minimum read/write to the filesystem will be 2048 bytes? > > A middle of the ground compromise is "-b 8192 -f 1024". > > What's the deal? In general you have that: large block size/fragment size => fast operation, lots of wasted space small block size/fragment size => slower operation, little wasted space For a solid state device (like flash memory) I suspect that the speed loss for smaller blocksizes would be less than it would be for a normal disk. I would suggest you try different block sizes and if there is no noticable speed difference between them you should use the smallest one (that would be 4096/512 for block/fragment size.) If there is a speed difference you would have to decide which is more important: speed or space. -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030423193744.GA12282>