From owner-freebsd-fs@FreeBSD.ORG Thu Jul 29 12:45:39 2010 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D08E71065679 for ; Thu, 29 Jul 2010 12:45:39 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 230A48FC08 for ; Thu, 29 Jul 2010 12:45:38 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA23690; Thu, 29 Jul 2010 15:29:42 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4C517436.7080509@icyb.net.ua> Date: Thu, 29 Jul 2010 15:29:42 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100517) MIME-Version: 1.0 To: Alexander Leidinger References: <20100729093158.86036msee9pbayw4@webmail.leidinger.net> In-Reply-To: <20100729093158.86036msee9pbayw4@webmail.leidinger.net> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: fs@freebsd.org Subject: Re: arc cache: pagesize and/or power of 2 constraints? 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, 29 Jul 2010 12:45:39 -0000 on 29/07/2010 10:31 Alexander Leidinger said the following: > Hi, > > while writting some acceptance tests for the Solaris machines at work I > wondered if the size of the arc cache should be a multiple of the page > size and/or a power of 2. I searched the net, but was not able to find > some info regarding this. I suppose you mean ZFS ARC, not an ARC concept in general. I wonder why you came at this question. > I would expect that it does not make sense to have an arc cache size > which is not a multiple of the page size. Why? > And depending on how the arc > cache is implemented, it would make sense to have it even as a power of > 2 size (even if it is able to handle non-power-of-2 sizes). Why? > Did someone had a look at this in FreeBSD? ARC size is almost arbitrary. It's a collection of malloc/uma allocated buffers of various sizes, individual sizes are various multiples of 512. -- Andriy Gapon