Re: question about measuring shared_buffers usage

From: Rajesh Kumar Mallah <mallah(dot)rajesh(at)gmail(dot)com>
To: postgres admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: question about measuring shared_buffers usage
Date: 2009-02-05 15:36:34
Message-ID: a97c77030902050736n7d6d92fasc4975a0a6b081d65@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)rajesh(at)gmail(dot)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.
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Sylvain Avril 2009-02-05 16:57:43 Re: Totally inappropriate by-line for a major representative of this organization
Previous Message Rajesh Kumar Mallah 2009-02-05 13:18:18 question about measuring shared_buffers usage