From owner-freebsd-questions@FreeBSD.ORG Mon Oct 27 13:04:29 2003 Return-Path: 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 85D5B16A4B3 for ; Mon, 27 Oct 2003 13:04:29 -0800 (PST) Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com [66.30.200.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5D9443FBD for ; Mon, 27 Oct 2003 13:04:28 -0800 (PST) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: by be-well.ilk.org (Postfix, from userid 1147) id 8845D3B05; Mon, 27 Oct 2003 16:04:28 -0500 (EST) Sender: lowell@be-well.ilk.org To: freebsd-questions@freebsd.org References: <20031027124247.GD61438@marvin.penguinpowered.org> From: Lowell Gilbert Date: 27 Oct 2003 16:04:28 -0500 In-Reply-To: <20031027124247.GD61438@marvin.penguinpowered.org> Message-ID: <444qxu9yub.fsf@be-well.ilk.org> Lines: 46 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: PostgreSQL on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2003 21:04:29 -0000 I haven't used that software since it was called postgres, but I'll wade in anyway... Wayne Pascoe writes: > Hi all, > > I'm trying to configure and tune postgresql on FreeBSD 4.9. We want to > allow at least 128 concurrent connections but preferably 256. > > Looking at the documentation, we should be okay if we set the following > in our kernel to achieve this: > > kern.ipc.somaxconn = 512 > kern.ipc.shmall = 65536 > kern.ipc.shmmni = 128 > kern.ipc.semmni = 8 > kern.ipc.semmns = 256 > > Now, I have three questions... > > 1. Why do we have to set these in the kernel ? You don't. > Why does setting them in > /etc/sysctl.conf or /etc/loader.conf not work ? You're doing something wrong. That's all I can say when the description of the failure is just "not work". > 2. Is there a recommended list of settings that we should use in our > kernel to allow 128 connections and 256 connections ? A single recommendation, no. It's been discussed. You started with tuning(7), I assume. > and lastly, > > 3. What is the impact on the rest of the system likely to be by setting > aside this memory as shared memory ? Is it then no longer available to > other applications like Apache and Exim ? Are there any other > performance issues that we should be aware of ? Yes, the memory is pulled out of the general pool, and no, I don't think there will be any other noticeable effects at those settings.