From owner-freebsd-fs@FreeBSD.ORG Thu Jul 21 18:32:24 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 B9B071065676; Thu, 21 Jul 2011 18:32:24 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 65D2E8FC14; Thu, 21 Jul 2011 18:32:24 +0000 (UTC) Received: by gxk28 with SMTP id 28so929957gxk.13 for ; Thu, 21 Jul 2011 11:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8f7SvxYEU30L/Y8mJ2s3mTr0Zm7KK0+RN9M5kB//888=; b=xk3tZWpUpmuCEvIDC3JSEOmhSb1CEtyQ9g7GY99dVu6gNXzx7v5cbZK0dH2ApUV3vU RP8aV3obM4Mtmek0DmJRMVrzCE72mQUAfCHcAC6RbK7wVgXJP+nMnyFQqshElWPrVM4j jC6bvj3OqCYXWbtkcVjtdNRvznUd1h1ozbzQQ= MIME-Version: 1.0 Received: by 10.91.10.8 with SMTP id n8mr1062153agi.17.1311273143326; Thu, 21 Jul 2011 11:32:23 -0700 (PDT) Received: by 10.90.209.12 with HTTP; Thu, 21 Jul 2011 11:32:23 -0700 (PDT) In-Reply-To: <4E286F1F.6010502@FreeBSD.org> References: <4E286F1F.6010502@FreeBSD.org> Date: Thu, 21 Jul 2011 11:32:23 -0700 Message-ID: From: Freddie Cash To: Martin Matuska Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-fs@freebsd.org, Ivan Voras Subject: Re: ZFS and large directories - caveat report 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: Thu, 21 Jul 2011 18:32:24 -0000 On Thu, Jul 21, 2011 at 11:25 AM, Martin Matuska wrote: > Quoting: > ... The default record size ZFS utilizes is 128K, which is good for many > storage servers that will harbor larger files. However, when dealing > with many files that are only a matter of tens of kilobytes, or even > bytes, considerable slowdown will result. ZFS can easily alter the > record size of the data to be written through the use of attributes. > These attributes can be set at any time through the use of the "zfs set" > command. To set the record size attribute perform "zfs set > recordsize=32K pool/share". This will set the recordsize to 32K on share > "share" within pool "pool". This type of functionality can even be > implemented on nested shares for even more flexibility. ... > > The recordsize property in ZFS is the "max" block size used. It is not the only block size used for a dataset. ZFS will use any block size from 0.5 KB to $recordsize KB, as determined by the size of the file to be written (it tries to the find the recordsize that most closely matches the file size to use the least number of blocks per write). It's only on ZVols that the recordsize==the block size, and all writes are fixed in size. Have a look through "zdb -dd poolname" to see the spread of block sizes in the pool. -- Freddie Cash fjwcash@gmail.com