From owner-freebsd-stable@FreeBSD.ORG Tue Aug 27 22:16:05 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8FD49372 for ; Tue, 27 Aug 2013 22:16:05 +0000 (UTC) (envelope-from Robert.Burmeister@utoledo.edu) Received: from smtpin2.utoledo.edu (smtpin2.utoledo.edu [131.183.2.214]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 19FD7271E for ; Tue, 27 Aug 2013 22:16:04 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnsAAIYkHVKDtwN/l2dsb2JhbABZgzxRwCmBIxYOAQEBAQEIFgc8giQBAQU4GyYQBQYOCgkWDwkDAgECAUUGDQEFAgEBh30Mr3CIbwSPZAeEGQOIeZUgjnKCDg X-IronPort-AV: E=Sophos;i="4.89,970,1367985600"; d="scan'208";a="231418971" Received: from dlpint01.utoledo.edu ([131.183.3.127]) by smtpin2.utoledo.edu with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Aug 2013 18:16:03 -0400 Received: from MsgApp11.utad.utoledo.edu (msgapp11.utad.utoledo.edu [131.183.3.7]) by dlpint01.utoledo.edu (RSA Interceptor); Tue, 27 Aug 2013 18:15:50 -0400 Received: from [192.168.1.65] (76.238.196.183) by Email.Utoledo.Edu (131.183.3.18) with Microsoft SMTP Server (TLS) id 14.2.328.9; Tue, 27 Aug 2013 18:15:49 -0400 Message-ID: <521D24F4.4060609@UToledo.edu> Date: Tue, 27 Aug 2013 18:15:16 -0400 From: Robert Burmeister User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: Sergey Kandaurov Subject: Re: Suggest changing dirhash defaults for FreeBSD 9.2. X-Priority: 1 (Highest) References: <521C9E85.4060801@UToledo.edu> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [76.238.196.183] X-RSA-Inspected: yes X-RSA-Classifications: public X-RSA-Action: allow Cc: freebsd-stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 22:16:05 -0000 On 8/27/2013 9:40 AM, Sergey Kandaurov wrote: > On 27 August 2013 16:41, Robert Burmeister > wrote: >> I have been experimenting with dirhash settings, and have scoured the internet for other peoples' experience with it. >> (I found the performance improvement in compiling has forestalled the need to add an SSD drive. ;-) >> >> I believe that increasing the following values by 10 would benefit most FreeBSD users without disadvantage. >> >> vfs.ufs.dirhash_maxmem: 2097152 to 20971520 >> >> vfs.ufs.dirhash_reclaimage: 5 to 50 or 60 > vfs.ufs.dirhash_maxmem is further autotuned based on available physical memory. > See r214359 for details. > Sorry, the documentation has not been updated since 2008. https://wiki.freebsd.org/DirhashDynamicMemory What about bumping up vfs.ufs.dirhash_reclaimage > all hashes older than 5 seconds (tunable via a sysctl, > vfs.ufs.dirhash_reclaimage) will always be deleted when a vm_lowmem event > occurs, and if that doesn't free up at least 10% of the memory currently being > used by dirhash, more hashes will be destroyed from the head of the TAILQ > until we do free up at least 10% of the memory initially used. As the memory scavenger will keep nibbling until at least 10% of the cache is free, eradicating all entries older than 5 seconds for the first chop seems overly aggressive.