From owner-freebsd-stable Tue Nov 13 7:51:52 2001 Delivered-To: freebsd-stable@freebsd.org Received: from D00015.dialonly.kemerovo.su (www2.svzserv.kemerovo.su [213.184.65.86]) by hub.freebsd.org (Postfix) with ESMTP id 3FFD637B418; Tue, 13 Nov 2001 07:51:31 -0800 (PST) Received: (from eugen@localhost) by D00015.dialonly.kemerovo.su (8.11.6/8.11.4) id fADFlUT00911; Tue, 13 Nov 2001 22:47:30 +0700 (KRAT) (envelope-from eugen) Date: Tue, 13 Nov 2001 22:47:30 +0700 From: Eugene Grosbein To: David Malone Cc: stable@freebsd.org, hackers@freebsd.org Subject: Re: kern.vm.kmem.size Message-ID: <20011113224730.A864@grosbein.pp.ru> References: <20011111230817.A2325@grosbein.pp.ru> <20011113151329.A44837@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011113151329.A44837@walton.maths.tcd.ie>; from dwmalone@maths.tcd.ie on Tue, Nov 13, 2001 at 03:13:29PM +0000 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Nov 13, 2001 at 03:13:29PM +0000, David Malone wrote: > > I'm trying to test and tune speed of freebsd's filesystem in many aspects. > > I run recent FreeBSD 4.4-STABLE with new dirprefs code, read tuning(7), > > newfs'd my FS, turned softupdates on, have UFS_DIRHASH kernel option. > > Also, I've read DIRHASH kernel code source. It seems that efficiency of > > DIRHASH greatly depends of kernel memory size (and some experiments > > approve this). > > You should be able to control how much memory is used by dirhash > with the vfs.ufs.dirhash_maxmem sysctl. By default it uses up to > 2MB and it should be possible to raise it significantly, providing > you have enough physical memory. (By default there is about 1GB of > kernel address space, so you are unlikely to be running into this > limit - I don't think changing kern.vm.kmem.size will help you). Are you shure? From LINT: # Tune the kernel malloc area parameters. VM_KMEM_SIZE represents the # minimum, in bytes, and is typically (12*1024*1024) (12MB). # VM_KMEM_SIZE_MAX represents the maximum, typically 200 megabytes. # VM_KMEM_SIZE_SCALE can be set to adjust the auto-tuning factor, which # typically defaults to 4 (kernel malloc area size is physical memory # divided by the scale factor). # options VM_KMEM_SIZE="(10*1024*1024)" options VM_KMEM_SIZE_MAX="(100*1024*1024)" options VM_KMEM_SIZE_SCALE="4" It seems DIRHASH is limited with free space in the kernel malloc area. It even cannot utilize default 2M of vfs.ufs.dirhash_maxmem when I do not increase kern.vm.kmem.size. I think it's because of kernel malloc area exhaustion. However, when I increase kern.vm.kmem.size upto 64M and vfs.ufs.dirhash_maxmem upto 8M, it starts using more than 2M of dirhash memory and speed of my tests greatly improves. So, how can I estimate needed value of kern.vm.kmem.size? Eugene Grosbein To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message