From owner-freebsd-questions@FreeBSD.ORG Wed Jul 5 14:29:03 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC17F16A4E0 for ; Wed, 5 Jul 2006 14:29:03 +0000 (UTC) (envelope-from kdk@daleco.biz) Received: from ezekiel.daleco.biz (southernuniform.com [66.76.92.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F61243D45 for ; Wed, 5 Jul 2006 14:28:52 +0000 (GMT) (envelope-from kdk@daleco.biz) Received: from [192.168.2.2] ([69.27.149.254]) by ezekiel.daleco.biz (8.13.4/8.13.1) with ESMTP id k65EReDV047348; Wed, 5 Jul 2006 09:28:01 -0500 (CDT) (envelope-from kdk@daleco.biz) Message-ID: <44ABCC51.4060706@daleco.biz> Date: Wed, 05 Jul 2006 09:27:29 -0500 From: Kevin Kinsey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.0.4) Gecko/20060623 SeaMonkey/1.0.2 MIME-Version: 1.0 To: Pietro Cerutti References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd questions Subject: Re: maxusers -> kernel.maxfiles X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2006 14:29:03 -0000 Pietro Cerutti wrote: > Hi list, > today my home server stopped responding because of a "kern.maxfiles > limit exceeded" problem. > > I noticed that the maxfiles MIB value was set to 1928, which I find > ridiculous even for a small home server ( i386-6.1-RELEASE, mySQL, > Apache, LDAP, Postfix, SSH, SFTP ). > > On my laptop, which is running 6.1-STABLE, this defaults to 25000. > > Reading [1] I discovered that this value is computed basing on the > value of maxusers, which is supposed to be in the kernel configuration > file. > > Since I didn't set the maxusers option in my kernel conf, I was > expecting to find a default value somewhere, and here's where I > miserably fail... > > So, could you please tell me: > 1) where's the default for it? > 2) how is the kern.maxfiles value exactly computed? Warning, Pietro: IANAE. 2) Looks like (6-STABLE here) it's approximately (kern.maxusers^5) --- 1) if you wish to set a different value for kern.maxusers or kern.maxfiles, you do it in /boot/loader.conf. You can see quite a bit about this in /boot/defaults/loader.conf. HTH, Kevin Kinsey P.S. The doc in the link you sent does seem a little confusing. Might be worth discussion on the docs list? -- One good thing about music, Well, it helps you feel no pain. So hit me with music; Hit me with music now. -- Bob Marley, Trenchtown Rock