Re: Shared Buffer Size

From: preetika tyagi <preetikatyagi(at)gmail(dot)com>
To: Derrick Rice <derrick(dot)rice(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Shared Buffer Size
Date: 2011-05-27 21:33:33
Message-ID: BANLkTi=w2VKAqBqgVArcbQc9L5PjmCYB7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Derrick,

Thank you for your response.
I saw this document and trying to understand "Interaction with the Operating
System Cache" which is mentioned in this document.

I have the following question-
Hows does the shared buffer in Postgres rely on the Operating System cache?
Suppose my RAM is 8 GB and shared_buffer is 24 MB in postgres. And there are
some dirty pages in shared_buffer and I need to write a dirty page back to
the disk to bring in a new page. What happens in this case? The dirty page
will be written to the disk considering the shared_buffer size as 24 MB? or
it will not be written and will stay in RAM which is 8 GB?

Thanks,
Preetika

On Fri, May 27, 2011 at 2:11 PM, Derrick Rice <derrick(dot)rice(at)gmail(dot)com>wrote:

> Check out the "Inside the PostgreSQL Buffer Cache" link here:
>
> http://projects.2ndquadrant.com/talks
>
> Thanks to Greg Smith (active here).
>
> Derrick
>
>
> On Fri, May 27, 2011 at 3:36 PM, preetika tyagi <preetikatyagi(at)gmail(dot)com>wrote:
>
>> Hi All,
>>
>> I am little confused about the internal working of PostgreSQL. There is a
>> parameter shared_buffer in postgres.conf and I am assuming that it is used
>> for buffer management in PostgreSQL. If there is a need to bring in a new
>> page in the buffer and size exceeds the shared_buffer limit, a victim dirty
>> page will be written back to the disk.
>>
>> However, I have read on many links that PostgreSQL depends on the OS for
>> caching. (http://www.varlena.com/GeneralBits/Tidbits/perf.html#shbuf)
>>
>> So my question is, the actual limit of the shared buffer will be defined
>> by OS or the shared_buffer parameter in the postgres.conf to figure whether
>> a victim dirty page needs to be selected for disk write or not?
>>
>> Thanks!
>>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Piotr Czekalski 2011-05-28 07:58:29 Re: Re: 500KB PDF files for postgresql8.3, which is the most efficient way?
Previous Message Little, Douglas 2011-05-27 21:14:08 String library