From owner-freebsd-hackers Tue Apr 6 11: 8:31 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 8BE00156E0 for ; Tue, 6 Apr 1999 11:08:29 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id LAA09677; Tue, 6 Apr 1999 11:06:27 -0700 (PDT) (envelope-from dillon) Date: Tue, 6 Apr 1999 11:06:27 -0700 (PDT) From: Matthew Dillon Message-Id: <199904061806.LAA09677@apollo.backplane.com> To: Arjan de Vet Cc: hackers@FreeBSD.ORG Subject: Re: Increasing both NBUF and NMBCLUSTERS leads to panics References: <199904061651.SAA11984@adv.iae.nl> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Hi, : :I'm testing a new 3.1-stable server with 640MB RAM for running Squid and :I would like to increase the NBUF parameter in the kernel configuration :file. The default maximum size of the buffercache seems to be around :8MB irrespective of the amount of physical memory (see nbuf calculation :code in i386/i386/machdep.c). : :For this Squid server I would like to have at least 32MB buffer cache or :more because the 2-level directory hierarchy used by Squid contains in :my setup 4096 directories whose size is <=8KB and I would like to cache :all metadata to speedup the open() calls which are becoming a bottleneck :on my current Squid server on BSD/OS 3.0. : :If I understand correctly, metadata only gets cached in the buffer cache :whereas other file data can be cached by the VM system too. Some time :ago John Dyson also posted some sysctl settings for keeping metadata in :the buffer cache as much as possible; I was planning on using those too. No, it's around physmem ( in kilobytes ) / 8. It should scale ok. Metadata is cached in the VM buffer cache, which uses all available memory. The VFS buffer cache, which is the 'nbuf' stuff, is really only a mapping from the VM buffer cache. Your directories are still being cached even if you do not have a lot of nbuf's, but since nbufs hold logical to physical block translations and are used to stage I/O, in your case having more of them may be beneficial. :Besides increasing the NBUF parameter I also want to increase :NMBCLUSTERS of course because the machine will handle quite some network :traffic. But for some reason increasing both NBUF and NMBCLUSTERS only :leads to panics :-(. The problem is that insufficient KVM is being reserved. You need to upgrade to the latest -CURRENT ( i.e. 4.x ). The fixes will probably go into -STABLE before the next release, but they are not in yet. The 3.1 release is definitely broken for systems with large amounts of real memory which try to raise the default limits. -Matt : :Any explanations or hints for avoiding these panics are greatly :appreciated. : :Arjan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message