From owner-freebsd-fs@FreeBSD.ORG Tue Sep 13 09:56:49 2011 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 E82B41065675; Tue, 13 Sep 2011 09:56:49 +0000 (UTC) (envelope-from mark@exonetric.com) Received: from relay0.exonetric.net (relay0.exonetric.net [82.138.248.161]) by mx1.freebsd.org (Postfix) with ESMTP id 74CB58FC12; Tue, 13 Sep 2011 09:56:49 +0000 (UTC) Received: from [172.16.0.129] (94-30-105-106.xdsl.murphx.net [94.30.105.106]) by relay0.exonetric.net (Postfix) with ESMTP id 5010A57013; Tue, 13 Sep 2011 10:38:21 +0100 (BST) Mime-Version: 1.0 (Apple Message framework v1244.3) From: Mark Blackman In-Reply-To: Date: Tue, 13 Sep 2011 10:38:20 +0100 Message-Id: References: To: Ivan Voras X-Mailer: Apple Mail (2.1244.3) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-fs@freebsd.org Subject: Re: ZFS-lighttpd2-sendfile, too high IO 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: Tue, 13 Sep 2011 09:56:50 -0000 On 13 Sep 2011, at 10:31, Ivan Voras wrote: >> >> Zfs reads whole 128K blocks (or whatever the filesystem blocksize is) at >> a time. It does not read partial blocks from underlying storage. This >> makes it very expensive to perform many small read accesses if the reads >> are not subsequently cached in the ARC. > > Yes! > > Which makes it particularly "interesting" if you try to run a database > on it while forgetting to reset the block size to e.g. 8K before the > database is initialized - you get 16x more IO than you expected. > Yes, I got this but what can you do if the database has already been initialized? I'm guessing the only realistic option is to set the block size, then copy the database files to a new directory and rename the old and new directories so the new directory is the database store. Perhaps you need to use an entirely new dataset? - Mark