X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D8C2932BEC2 for ; Fri, 15 Oct 2004 17:07:37 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75775-04 for ; Fri, 15 Oct 2004 16:07:32 +0000 (GMT) Received: from neomail07.traderonline.com (email.traderonline.com [65.213.231.10]) by svr1.postgresql.org (Postfix) with ESMTP id 8871D32BE0C for ; Fri, 15 Oct 2004 17:07:30 +0100 (BST) Received: from [192.168.1.68] (64-139-89-109-ubr02b-epensb01-pa.hfc.comcastbusiness.net [64.139.89.109]) by neomail07.traderonline.com (8.12.10/8.12.8) with ESMTP id i9FG7TOY018965 for ; Fri, 15 Oct 2004 12:07:29 -0400 Message-ID: <416FF5BF.8060200@ptd.net> Date: Fri, 15 Oct 2004 12:07:27 -0400 From: Doug Y User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Tuning shared_buffers with ipcs ? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/217 X-Sequence-Number: 8693 Hello, I've seen a couple references to using ipcs to help properly size shared_buffers. I don't claim to be a SA guru, so could someone help explain how to interpret the output of ipcs and how that relates to shared_buffers? How does one determine the size of the segment arrays? I see the total size using ipcs -m which is roughly shared_buffers * 8k. I tried all of the dash commands in the ipcs man page, and the only one that might give a clue is ipcs -t which shows the time the semaphores were last used. If you look at the example I give below, it appears as if I'm only using 4 of the 17 semaphores (PG was started on Oct 8). Am I correct in assuming that if the arrays are all the same size then I should only need about 1/4 of my currently allocated shared_buffers? ------ Shared Memory Operation/Change Times -------- shmid owner last-op last-changed 847183872 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847216641 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847249410 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847282179 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847314948 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847347717 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847380486 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847413255 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847446024 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847478793 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847511562 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847544331 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847577100 postgres Fri Oct 8 11:03:31 2004 Fri Oct 8 11:03:31 2004 847609869 postgres Fri Oct 15 11:34:28 2004 Fri Oct 15 11:34:29 2004 847642638 postgres Fri Oct 15 11:33:35 2004 Fri Oct 15 11:33:35 2004 847675407 postgres Fri Oct 15 11:34:28 2004 Fri Oct 15 11:34:29 2004 847708176 postgres Fri Oct 15 11:27:17 2004 Fri Oct 15 11:32:20 2004 Also, isn't the shared memory supposed to show up in free? Its always showing as 0: # free total used free shared buffers cached Mem: 3896928 3868424 28504 0 59788 3605548 -/+ buffers/cache: 203088 3693840 Swap: 1052216 16 1052200 Thanks!