From owner-freebsd-fs@FreeBSD.ORG Sun Oct 10 12:51:18 2010 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 1CF981065675; Sun, 10 Oct 2010 12:51:18 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [64.81.247.49]) by mx1.freebsd.org (Postfix) with ESMTP id F33478FC13; Sun, 10 Oct 2010 12:51:17 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id o9ACpHVE043246; Sun, 10 Oct 2010 05:51:17 -0700 (PDT) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201010101251.o9ACpHVE043246@chez.mckusick.com> To: Ivan Voras In-reply-to: Date: Sun, 10 Oct 2010 05:51:17 -0700 From: Kirk McKusick Cc: freebsd-fs@freebsd.org Subject: Re: Increasing ufs.dirhash_maxmem by default 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: Sun, 10 Oct 2010 12:51:19 -0000 > To: freebsd-fs@freebsd.org > From: Ivan Voras > Date: Sat, 09 Oct 2010 21:51:47 +0200 > Subject: Increasing ufs.dirhash_maxmem by default > > hi, > > Several people have worked on dirhash in the past so I'm posting here > instead of individually pinging them. > > The default dirhash_maxmem is currently set as 2 MB, which while may be > sufficient some time ago it certainly isn't now. I've had to increase it > on practically all non-trivial servers and even high-end desktops, and > there are occasional reports on the lists that suggest it's a fairly > common thing. > > What I'd like to do is either: > > 1) Simply increase the default to e.g. 32 MB (trivial change) or > 2) Make it a function of hibufspace (e.g. 1/32th of it, capped at 64 MB) > which is itself autotuned. This would happen in ufsdirhash_init(). > > The current incarnation of dirhash has a vm_lowmem handler so it doesn't > look like it could starve a system if overtuned. > > Ideas? Objections? I am a strong proponent of auto tuning. Otherwise, one is constantly needing to fix defaults as we are discussing here. You suggestion #2 above seems reasonable except that I would not put an upper limit on it as that just gets us back to the previous problem after a few years. Given that dirhash has a vm_lowmem handler, and we are only considering a small percentage of the memory, I do not think that an upper bound is really needed. ~Kirk