From owner-freebsd-stable Fri Jul 12 12:10:57 2002 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 037B137B407 for ; Fri, 12 Jul 2002 12:10:47 -0700 (PDT) Received: from angelic.cynic.net (P061198253113.ppp.prin.ne.jp [61.198.253.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B8A343E42 for ; Fri, 12 Jul 2002 12:10:44 -0700 (PDT) (envelope-from cjs@cynic.net) Received: from localhost (localhost [127.0.0.1]) by angelic.cynic.net (Postfix) with ESMTP id EA5BB8707; Thu, 11 Jul 2002 03:25:40 +0000 (UTC) Date: Thu, 11 Jul 2002 12:25:40 +0900 (JST) From: Curt Sampson To: Vivek Khera Cc: stable@freebsd.org, Subject: Re: [GENERAL] was there a change in FreeBSD SHM implementation from 4.4 to 4.6? (postgres trouble) In-Reply-To: <15660.31149.224797.969563@onceler.kciLink.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 10 Jul 2002, Vivek Khera wrote: > I have a dual cpu box with 2GB RAM dedicated to running Postgres. > Last week, I upgraded FreeBSD from 4.4-STABLE to 4.6-RELEASE-p1. When > I went to restart postgres, it complained that it could not allocate > the shared memory segment. I'm running Postgres 7.2.1. This came up on the list a few days ago. FreeBSD 4.6 apparently has some sort of system limit on how much shared memory it will allocate, probably to keep those using shared memory from eating up too much of the available VM. This is not a problem because you want to allocate a fairly small amount of shared memory. > For those familiar with postgres, I was using shared_buffers=100000 > with 4.4, but had to back that down to 32000 for 4.6. This is > obviously impacting performance... Yes, I'm sure your performance improved. By going from 780 MB to 25 MB of shared memory, you just increased the amount of data the OS can buffer from about 1.1 GB to 1.8 GB. You've just increased your cache size by about 60%. See previous discussions on this (postgresql-general) list over the past couple of weeks for details. (Is this in the FAQ yet?) cjs -- Curt Sampson +81 90 7737 2974 http://www.netbsd.org Don't you know, in this new Dark Age, we're all light. --XTC To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message