From owner-freebsd-questions@FreeBSD.ORG Fri Oct 13 16:29:47 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 86DC216A403 for ; Fri, 13 Oct 2006 16:29:47 +0000 (UTC) (envelope-from pobox@verysmall.org) Received: from thing.verysmall.org (thing.verysmall.org [212.100.226.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4910B43D9A for ; Fri, 13 Oct 2006 16:29:29 +0000 (GMT) (envelope-from pobox@verysmall.org) Received: from [130.83.73.27] (x281.vpn.hrz.tu-darmstadt.de [130.83.73.27]) by thing.verysmall.org (Postfix) with ESMTP id 3E04A2286D for ; Fri, 13 Oct 2006 17:28:19 +0100 (BST) Message-ID: <452FBEE6.5010700@verysmall.org> Date: Fri, 13 Oct 2006 18:29:26 +0200 From: "pobox@verysmall.org" User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: PostgreSQL Shared Memory and Semaphors 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: Fri, 13 Oct 2006 16:29:47 -0000 Hello, I want to increase the max_connections of PostgreSQL from around 40 to around 100. For this I need to change the Shared Memory and Semaphores settings. I followed this link - http://www.postgresql.org/docs/8.1/interactive/kernel-resources.html#SYSVIPC and used the proposed values in a test installation FreeBSD 5.5, PostgreSQL 8.x, with 96 MB RAM (a VMware guest) - I added - kern.ipc.shmall=32768 kern.ipc.shmmax=134217728 kern.ipc.semmap=256 to /etc/sysctl.conf kern.ipc.semmni=256 kern.ipc.semmns=512 kern.ipc.semmnu=256 to /boot/loader.conf And I changed max_connections = 40 to 100 in postgresql.conf. Rebooted and all works OK. Now I want to do the same on a production machine FreeBSD 5.4, PostgreSQL 8.x, with 2 GB RAM. Are there any dangers I should have in mind? Thank you, Iv PS I know that the values can be compiled into the kernel, but I am not that good yet.