From owner-freebsd-fs@FreeBSD.ORG Tue Sep 13 10:01:01 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 030471065670 for ; Tue, 13 Sep 2011 10:01:01 +0000 (UTC) (envelope-from freebsd-fs@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id B068E8FC0C for ; Tue, 13 Sep 2011 10:01:00 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R3PnX-0003PG-Q3 for freebsd-fs@freebsd.org; Tue, 13 Sep 2011 12:00:59 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Sep 2011 12:00:59 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Sep 2011 12:00:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-fs@freebsd.org From: Ivan Voras Date: Tue, 13 Sep 2011 12:00:46 +0200 Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0.1) Gecko/20110907 Thunderbird/6.0.1 In-Reply-To: X-Enigmail-Version: 1.1.2 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 10:01:01 -0000 On 13/09/2011 11:38, Mark Blackman wrote: > > 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? Luckily, you just need to create a new file system and move/copy the data over and back again.