pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedquestion about measuring shared_buffers usage
2+ messages / 1 participants
[nested] [flat]
* question about measuring shared_buffers usage
@ 2009-02-05 13:18 Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Rajesh Kumar Mallah @ 2009-02-05 13:18 UTC (permalink / raw)
To: pgsql-admin
Hi ,
I have following setting in my postgresql.conf file.
shared_buffers = 10000 (8k blocks) ; which is apprx 80MB
my question is how can i know how much is the usage
of the shared_buffers so that it can be increased or
decreased. below is the output of ipcs , I am wondering
is postgres using 420MB shared memory (but shared_buffers
is only 80MB)
$ ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 3637248 postgres 600 52228 0
0x0052e6a9 7798785 postgres 600 40034304 42
0x00000000 4489218 postgres 600 52228 0
0x00000000 4521987 postgres 600 52228 0
0x00000000 4554756 postgres 600 52228 0
0x00000000 4587525 postgres 600 52228 0
0x00000000 4620294 postgres 600 52228 0
0x00000000 2883591 postgres 600 52228 0
0x00000000 3670024 postgres 600 74240 0
0x00000000 3702793 postgres 600 768 0
0x00000000 3735562 postgres 600 524 0
0x00000000 3768331 postgres 600 4 0
0x0052e2c1 7831564 postgres 600 420610048 121
regds
mallah.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: question about measuring shared_buffers usage
@ 2009-02-05 15:36 Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
parent: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Rajesh Kumar Mallah @ 2009-02-05 15:36 UTC (permalink / raw)
To: pgsql-admin
further ,
can pg_buffercache view serve as a guide to setting appropriate
value of shared_buffers ?
when i do
SELECT count(*) from pg_buffercache where relfilenode is null ;
to check unused buffers i find that it has been 0 most of the
time. Can shared_buffers be raised to an extent that some buffers
remains unused mostly. I read in one of the articles
http://www.varlena.com/GeneralBits/Tidbits/perf.html#shbuf
that shared_buffers can be put 1.2 to 2 times the peak shared mem usage.
My question is how to roughly determine the appropriate value for
shared_buffers.
Also,
What if most of the memory is left for kernel disk buffer cache ? is
fetching from
kernel disk buffer cache significantly expensive compared to getting from
shared buffer cache ?
regds
mallah.
On Thu, Feb 5, 2009 at 6:48 PM, Rajesh Kumar Mallah
<mallah.rajesh@gmail.com> wrote:
> Hi ,
>
> I have following setting in my postgresql.conf file.
>
> shared_buffers = 10000 (8k blocks) ; which is apprx 80MB
>
> my question is how can i know how much is the usage
> of the shared_buffers so that it can be increased or
> decreased. below is the output of ipcs , I am wondering
> is postgres using 420MB shared memory (but shared_buffers
> is only 80MB)
>
> $ ipcs -m
>
> ------ Shared Memory Segments --------
> key shmid owner perms bytes nattch status
> 0x00000000 3637248 postgres 600 52228 0
> 0x0052e6a9 7798785 postgres 600 40034304 42
> 0x00000000 4489218 postgres 600 52228 0
> 0x00000000 4521987 postgres 600 52228 0
> 0x00000000 4554756 postgres 600 52228 0
> 0x00000000 4587525 postgres 600 52228 0
> 0x00000000 4620294 postgres 600 52228 0
> 0x00000000 2883591 postgres 600 52228 0
> 0x00000000 3670024 postgres 600 74240 0
> 0x00000000 3702793 postgres 600 768 0
> 0x00000000 3735562 postgres 600 524 0
> 0x00000000 3768331 postgres 600 4 0
> 0x0052e2c1 7831564 postgres 600 420610048 121
>
> regds
> mallah.
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2009-02-05 15:36 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-02-05 13:18 question about measuring shared_buffers usage Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2009-02-05 15:36 ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
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