From owner-freebsd-stable@FreeBSD.ORG Tue Aug 27 12:42:38 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 3FBF5DEF; Tue, 27 Aug 2013 12:42:38 +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 8E505249D; Tue, 27 Aug 2013 12:42:37 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtcAAHadHFKDtwN/l2dsb2JhbABahA2DJ74iFg4BAQEBAQgWBzyCThUbOyACBRYLAgsDAgECAUsBDAgBAYd9pgmJRokTgSmRKoExA54ZjnKCDg X-IronPort-AV: E=Sophos;i="4.89,968,1367985600"; d="scan'208";a="231272828" Received: from dlpint01.utoledo.edu ([131.183.3.127]) by smtpin2.utoledo.edu with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Aug 2013 08:42:28 -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 08:42:15 -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 08:42:15 -0400 Message-ID: <521C9E85.4060801@UToledo.edu> Date: Tue, 27 Aug 2013 08:41:41 -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: , , Subject: Suggest changing dirhash defaults for FreeBSD 9.2. X-Priority: 2 (High) Content-Type: text/plain; charset="UTF-8"; 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 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 12:42:38 -0000 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 FreeBSD administrators who have adjusted vfs.ufs.dirhash_maxmem for file server use have found 8 megs to be about minimum to satisfy vfs.ufs.dirhash_mem usage, while I have found compiling larger packages such as Firefox brings vfs.ufs.dirhash_mem up to about 13 megs. Setting vfs.ufs.dirhash_maxmem much larger than 20 megs results in vfs.ufs.dirhash_lowmemcount events scavenging excessive amounts of the directory cache, at 10% per event. I believe vfs.ufs.dirhash_reclaimage of about a minute is sufficient to reclaim memory without losing active directory cache, particularly when compiling; however my experience in operations leads me to believe this is also an optimal default for file servers. As the worst case scenario is that the directory cache will be over cleansed and the memory returned to the kernel, I would like to suggest that these defaults be raised by a factor of 10 for FreeBSD 9.2 or 10.0.