Re: question about measuring shared_buffers usage - Mailing list pgsql-admin

From Rajesh Kumar Mallah
Subject Re: question about measuring shared_buffers usage
Date
Msg-id a97c77030902050736n7d6d92fasc4975a0a6b081d65@mail.gmail.com
Whole thread Raw
In response to question about measuring shared_buffers usage  (Rajesh Kumar Mallah <mallah.rajesh@gmail.com>)
List 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.
>

pgsql-admin by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: question about measuring shared_buffers usage
Next
From: Sylvain Avril
Date:
Subject: Re: Totally inappropriate by-line for a major representative of this organization