From: | Doug Y <dylists(at)ptd(dot)net> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Tuning shared_buffers with ipcs ? |
Date: | 2004-10-15 16:07:27 |
Message-ID: | 416FF5BF.8060200@ptd.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
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!
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2004-10-15 16:22:40 | Re: Performance on Win32 vs Cygwin |
Previous Message | Tom Lane | 2004-10-15 15:37:40 | Re: Performance on Win32 vs Cygwin |