From owner-freebsd-stable@FreeBSD.ORG Mon Mar 8 07:04:27 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAFFF16A4CF for ; Mon, 8 Mar 2004 07:04:27 -0800 (PST) Received: from fep02-mail.bloor.is.net.cable.rogers.com (fep02-mail.bloor.is.net.cable.rogers.com [66.185.86.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6817B43D1F for ; Mon, 8 Mar 2004 07:04:27 -0800 (PST) (envelope-from mikej@rogers.com) Received: from win2000 ([63.139.3.63]) by fep02-mail.bloor.is.net.cable.rogers.comESMTP <20040308150343.DEFA434741.fep02-mail.bloor.is.net.cable.rogers.com@win2000>; Mon, 8 Mar 2004 10:03:43 -0500 From: "Mike Jakubik" To: "'Doug White'" Date: Mon, 8 Mar 2004 10:04:28 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <20040304111724.K21028@carver.gumbysoft.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Thread-Index: AcQCHb/lxTYxHFYtRbuVg5FMlZtVowC/93Ug X-Authentication-Info: Submitted using SMTP AUTH LOGIN at fep02-mail.bloor.is.net.cable.rogers.com from [63.139.3.63] using ID at Mon, 8 Mar 2004 10:03:43 -0500 Message-Id: <20040308150343.DEFA434741.fep02-mail.bloor.is.net.cable.rogers.com@win2000> cc: stable@freebsd.org Subject: RE: Semaphore scaling X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2004 15:04:27 -0000 > -----Original Message----- > From: Doug White [mailto:dwhite@gumbysoft.com] > Sent: Thursday, March 04, 2004 2:20 PM > To: mikej@rogers.com > Cc: stable@freebsd.org > Subject: Re: Semaphore scaling > > Don't crosspost lists. Thanks. > > On Thu, 4 Mar 2004 mikej@rogers.com wrote: > > > I am running an application (Plesk) on a 4.9 system that is > eating up > > all the semaphores and as a result some processes can't run. I have > > contacted the software company, and they asked me to increase the > > semaphore limits in the kernel. However their suggested settings > > seemed very unproportional to me. > > > > So my question is, how should I adjust the values, while keeping > > things in proportion? I wish to increase the default > semaphore limit > > of 10 to 20. Can I simply double the semaphore related values? > > The semaphore tunables aren't quite as obvious as they look. > There are limits on the size of various clusters of things > whos usage is heavily application-dependent. That being said, > FreeBSD traditionally has very low SYSVSHM/SEM/MSG limits, so > doubling them should be safe. I suggest using the ipcs(8) > command to monitor the usage and adjust accordingly. > > The Plesk-supplied limits seem OK to me too. I've put > Oracle-sized values in there and haven't had any bad effects .. yet :) > > Note that you can adjust these with loader tunables as well, > if you don't want to rebuild the kernel. They have the same > name as the sysctls that show the current values in kern.ipc. I have adjusted the variables in /etc/sysctl.conf as follows: kern.ipc.semmap=60 kern.ipc.semmni=20 kern.ipc.semmns=120 kern.ipc.semmnu=60 kern.ipc.semmsl=120 kern.ipc.semopm=200 kern.ipc.semume=20 However, when I do 'sysctl kern.ipc|grep sem' I get the floowing results: kern.ipc.semmap: 60 kern.ipc.semmni: 10 kern.ipc.semmns: 60 kern.ipc.semmnu: 30 kern.ipc.semmsl: 120 kern.ipc.semopm: 100 kern.ipc.semume: 10 kern.ipc.semusz: 92 kern.ipc.semvmx: 32767 kern.ipc.semaem: 16384 It seems that kern.ipc.semmni is not being incremented. Am I doing something wrong here? Is this variable not tunable at boot? Interesting enough, these values in LINT are represented as x+1, i.e. SEMMAP=31 and SEMMNI=11. Thanks.