Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 63DE4475958 for ; Thu, 4 Jul 2002 21:30:41 -0400 (EDT) Mailbox-Line: From tgl@sss.pgh.pa.us Thu Jul 4 21:30:41 2002 Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 82F66475956 for ; Thu, 4 Jul 2002 21:30:39 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g651UX207084; Thu, 4 Jul 2002 21:30:33 -0400 (EDT) To: Gregor Mosheh Cc: pgsql-admin@postgresql.org Subject: Re: memory strangeness (fwd) In-reply-to: <20020704181141.V44600-100000@osiris.deathkeep.com> References: <20020704181141.V44600-100000@osiris.deathkeep.com> Comments: In-reply-to Gregor Mosheh message dated "Thu, 04 Jul 2002 18:11:52 -0700" Date: Thu, 04 Jul 2002 21:30:32 -0400 Message-ID: <7081.1025832632@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-5.3 required=5.0 tests=IN_REP_TO,X_NOT_PRESENT version=2.30 X-Spam-Level: X-Archive-Number: 200207/77 X-Sequence-Number: 4763 Gregor Mosheh writes: > Hiya. I've installed Postgres 7.2 on a dedicated FreeBSD system with 384 > MB RAM. Because the system will be doing nothing except PG, I'd like to > dump as much memory as possible into PG's shared memory. > I rebuilt the kernel with very large limits: 330 MB on the MAXDSIZ and > DFLDSIZ, and 330 MB for SHMMAXPAGES. This gives me: Very likely the kernel has its own ideas on how much memory it needs to reserve for other purposes, and is unwilling to give you a shmem segment that represents the bulk of physical RAM. While I don't know FreeBSD well enough to speculate on exactly why it's limiting you, I do think that you are going in the wrong direction for Postgres anyhow. Pretty much everyone who has looked at the issue has concluded that it's a mistake to try to set shared memory that high. If you're trying to set it to more than a quarter of physical RAM you're off track IMHO. In practice, given that this isn't an especially huge system, I'd think a shared_buffers setting in the low thousands would be appropriate. Also, reducing max_connections as low as 5 seems the wrong direction too ... regards, tom lane