From: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
To: postgres admin <pgsql-admin@postgresql.org>
Subject: Re: question about measuring shared_buffers usage
Date: Thu, 5 Feb 2009 21:06:34 +0530
Message-ID: <a97c77030902050736n7d6d92fasc4975a0a6b081d65@mail.gmail.com> (raw)
In-Reply-To: <a97c77030902050518q6fd12ba8h38a6af27c2b7812a@mail.gmail.com>
References: <a97c77030902050518q6fd12ba8h38a6af27c2b7812a@mail.gmail.com>
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.
>
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-admin@postgresql.org
Cc: mallah.rajesh@gmail.com
Subject: Re: question about measuring shared_buffers usage
In-Reply-To: <a97c77030902050736n7d6d92fasc4975a0a6b081d65@mail.gmail.com>
* 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