From owner-freebsd-fs@FreeBSD.ORG Sun Oct 7 20:07:48 2007 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A29716A417 for ; Sun, 7 Oct 2007 20:07:48 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id C992213C494 for ; Sun, 7 Oct 2007 20:07:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c220-239-235-248.carlnfd3.nsw.optusnet.com.au (c220-239-235-248.carlnfd3.nsw.optusnet.com.au [220.239.235.248]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id l97K7bZA028273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Oct 2007 06:07:41 +1000 Date: Mon, 8 Oct 2007 06:07:36 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Dmitry Marakasov In-Reply-To: <20071007181429.GB1082@hades.panopticon> Message-ID: <20071008051733.T29782@delplex.bde.org> References: <20071005004820.GA29814@hades.panopticon> <20071006080406.S689@besplex.bde.org> <20071007181429.GB1082@hades.panopticon> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-fs@FreeBSD.org Subject: Re: Very slow writes on flash + msdosfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2007 20:07:48 -0000 On Sun, 7 Oct 2007, Dmitry Marakasov wrote: > * Bruce Evans (brde@optusnet.com.au) wrote: >> However, clustering won't help much for small files, due to BSD's >> fundamental design error of per-vnode buffering. With 340 files in a >> >> Async mounts would reduce the minimum number of writes per file to >> about 1 (for the data block). msdosfs doesn't implement them yet. > Hm, true. I just found out that UFS is slow as well. Though it can write > large files at almost 11 MB/s, small files are even slower. Async mount > helps a lot, too bad msdosfs can't do it. So if this problem is > fundamenal, and msdosfs can't work async, msdosfs can work async. My version does. > isn't there some GEOM class > that does simple memory caching? I think there is, but I wouldn't use it for political reasons. > I don't care what happens to data on > flash if the power goes down in the middle of writing, but I'm just too > jealous of how good Linux forks with the very same flash (I have 4Gb mem > Linux box on my work, and whatever you copy to flash - movies, or tons > of small files, cp finishes in a moment - all data is actually copied to > memory, and than flushed on umount or sync - I guess on the maximum > speed possible). Linux might still take a long time for the unmount/sync. Linux's block devices are useful for avoiding the corresponding slowness for newfs -- there is no need to bloat all utilities with buffering; you just run them on the block device. They are also useful for working around the corresponding slowness for reading of small file systems on slow media (maybe not flash drives, but CD/DVD) on machines with large RAM -- preread the entire file system into the buffer cache via a block device. Bruce