Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 899B8475956 for ; Thu, 4 Jul 2002 21:13:09 -0400 (EDT) Mailbox-Line: From stigmata@blackangel.net Thu Jul 4 21:13:09 2002 Received: from osiris.deathkeep.com (adsl-67-115-146-162.dsl.snfc21.pacbell.net [67.115.146.162]) by postgresql.org (Postfix) with ESMTP id 65B80475DB2 for ; Thu, 4 Jul 2002 21:11:49 -0400 (EDT) Received: from localhost (localhost.deathkeep.com [127.0.0.1]) by osiris.deathkeep.com (8.11.6/8.11.6) with ESMTP id g651Bq444602 for ; Thu, 4 Jul 2002 18:11:52 -0700 (PDT) (envelope-from stigmata@blackangel.net) Date: Thu, 4 Jul 2002 18:11:52 -0700 (PDT) From: Gregor Mosheh X-X-Sender: stigmata@osiris.deathkeep.com To: pgsql-admin@postgresql.org Subject: memory strangeness (fwd) Message-ID: <20020704181141.V44600-100000@osiris.deathkeep.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=0.0 required=5.0 tests=none version=2.30 X-Spam-Level: X-Archive-Number: 200207/76 X-Sequence-Number: 4762 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: # sysctl kern.ipc.shmall kern.ipc.shmall: 42240 # sysctl kern.ipc.shmmax kern.ipc.shmmax: 346030080 I still cannot set PG's shared_buffers higher than 20000 (160 MB): IpcMemoryCreate: shmget(key=8971001, size=183017472, 03600) failed: Cannot allocate memory This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space. To reduce the request size (currently 183017472 bytes), reduce PostgreSQL's shared_buffers parameter (currently 22000) and/or its max_connections parameter (currently 5). That I'm out of RAM seems fishy, though, since there's very little running and vmstat reports plenty of free RAM: procs memory page disks faults cpu r b w avm fre flt re pi po fr sr ad0 ad3 in sy cs us sy id 0 0 0 8484 353908 1 0 0 0 2 0 2 0 231 5 5 0 0 100 Any ideas as to what I missed?