pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Doug Y <dylists@ptd.net>
To: pgsql-performance@postgresql.org
Subject: Tuning shared_buffers with ipcs ?
Date: Fri, 15 Oct 2004 12:07:27 -0400
Message-ID: <416FF5BF.8060200@ptd.net> (raw)

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!




view thread (5+ messages)  latest in thread

Message-ID: <416FF5BF.8060200@ptd.net>
Permalink:  ../416FF5BF.8060200@ptd.net/
Also on:    postgresql.org/message-id/416FF5BF.8060200@ptd.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: dylists@ptd.net
  Subject: Re: Tuning shared_buffers with ipcs ?
  In-Reply-To: <416FF5BF.8060200@ptd.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox