From owner-freebsd-fs@FreeBSD.ORG Wed May 19 14:53:56 2010 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 01735106566C for ; Wed, 19 May 2010 14:53:56 +0000 (UTC) (envelope-from bfriesen@simple.dallas.tx.us) Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74]) by mx1.freebsd.org (Postfix) with ESMTP id BE24F8FC08 for ; Wed, 19 May 2010 14:53:55 +0000 (UTC) Received: from freddy.simplesystems.org (freddy.simplesystems.org [65.66.246.65]) by blade.simplesystems.org (8.13.8+Sun/8.13.8) with ESMTP id o4JErs03024839; Wed, 19 May 2010 09:53:54 -0500 (CDT) Date: Wed, 19 May 2010 09:53:54 -0500 (CDT) From: Bob Friesenhahn X-X-Sender: bfriesen@freddy.simplesystems.org To: Arnaud Houdelette In-Reply-To: <4BF3A0DD.4080404@tzim.net> Message-ID: References: <4BF3A0DD.4080404@tzim.net> User-Agent: Alpine 2.01 (GSO 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (blade.simplesystems.org [65.66.246.90]); Wed, 19 May 2010 09:53:54 -0500 (CDT) Cc: freebsd-fs@freebsd.org Subject: Re: ZFS Recordsize tuning & transmission (bittorent daemon) 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: Wed, 19 May 2010 14:53:56 -0000 On Wed, 19 May 2010, Arnaud Houdelette wrote: > > ZFS recordsize on both pools are default (128k). But as transmission > bittorrent client has no write (nor read) cache, it could mean that data is > written is smaller chunks during download. Could this lead to data being > stored in many not-full records ? Does those unfull records would have to be > read as whole (128k) during the move, which would explain the above > difference on read/write ? Zfs always writes full blocks. If bittorrent updates just part of the blocks, then the whole block will be re-written to a new location via COW. This causes file fragmentation. The file fragmentation will be worse if the pool is very full. There should be less fragmentation if the system has quite a lot of RAM for buffering the writes. With a lot of RAM, zfs will write less often (waiting as long as 30 seconds). If your filesystem is only used for bittorrent and if bittorrent always uses the same block size, then it may be useful to set the receiving filesystem to use the bittorrent block size. If the bittorrent block size is variable, then this tuning is not possible. Bob -- Bob Friesenhahn bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/