From owner-freebsd-fs@FreeBSD.ORG Wed Oct 5 00:31:28 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 C06691065670 for ; Wed, 5 Oct 2011 00:31:28 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 817FA8FC14 for ; Wed, 5 Oct 2011 00:31:28 +0000 (UTC) Received: by gyf2 with SMTP id 2so1345171gyf.13 for ; Tue, 04 Oct 2011 17:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=WJycy8tSknFC+w6CRcFqiVtmesWlRGzkpToLezgcLMM=; b=agoIMlk3Ia9vZpB0X8U0GaiH2yED/kxHgMl4yC8pCb+n71MYqEmFI/naudWvK09hTs HVCQpD2Wdv33J2D0lY/Jb7U459mJA0iPjtS37wIfQe2bjz2JleJnI6eIReds0rFD+sZF zj+AXLQDnGe05U2hOFgaj2uQeZ7tMWinI7W0s= MIME-Version: 1.0 Received: by 10.236.185.37 with SMTP id t25mr10289303yhm.131.1317774687658; Tue, 04 Oct 2011 17:31:27 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.236.103.33 with HTTP; Tue, 4 Oct 2011 17:31:27 -0700 (PDT) In-Reply-To: <4E8ACE1E.4060608@ish.com.au> References: <4E8A8740.100@ish.com.au> <4E8ACE1E.4060608@ish.com.au> Date: Wed, 5 Oct 2011 00:31:27 +0000 X-Google-Sender-Auth: dPLa79rLG3E1jPjFIaNDr75XivI Message-ID: From: Artem Belevich To: Aristedes Maniatis Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-fs@freebsd.org Subject: Re: vm.kmem_size_scale recommendation for ZFS 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, 05 Oct 2011 00:31:28 -0000 On Tue, Oct 4, 2011 at 2:13 AM, Aristedes Maniatis wrote: > But back to the original question. Pawel recommends in his 1 year old blog > entry that kmem should be 150% of actual RAM (I don't really understand why, > but he is the expert). Andriy committed scale=1 earlier this year which is > more like 97% of actual RAM. Which is correct? > > I understand how ARC works, but I don't understand why kmem is tunable in > ordinary operation or why one value should be preferred. Think of packing randomly sized round pebbles (randomly sized ARC data chunks in this case) into square boxes (power-of-2 allocator bins or perhaps multiples of 4K pages for larger allocations). It's obvious that you will not be able to reach 100% utilization. kmem_size provides address space for the allocator which will then map physical memory there. Hence if you want to use certain amount of physical memory in kernel, you should make sure that kmem_map is large enough to accommodate it including the overhead. --Artem