public inbox for [email protected]
help / color / mirror / Atom feedFrom: Soni M <[email protected]>
To: Gerardo Herzig <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: OS cache management
Date: Sun, 10 Sep 2017 12:48:23 +0700
Message-ID: <CAAMgDXkTOkWrr0_qA_Sx+sWU6WEAjFzLJVK8sBe_oq_om57fag@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAAMgDXkDgmnnzdDtk1pOX473eLK=eQN+MnccncGHiNBAtiRnTw@mail.gmail.com>
<[email protected]>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-performance>
In our environment, OS cache is much bigger than postgres buffers. Postgres
buffers around 8 GB, OS cache more than 100 GB. Maybe we should inspect
pgfincore
On Wed, Sep 6, 2017 at 9:13 PM, Gerardo Herzig <[email protected]> wrote:
>
>
> ----- Mensaje original -----
> > De: "Soni M" <[email protected]>
> > Para: [email protected]
> > Enviados: MiƩrcoles, 6 de Septiembre 2017 5:12:26
> > Asunto: [PERFORM] OS cache management
> >
> > Hello All, I would like to know about how OS cache works for postgres
> table
> > and index file.
> >
> > Let's say I have 10 year data, and commonly used data only the last 1
> year.
> > This data is quite big, so each table and index file is divided into
> > several file in PGDATA/base
> >
> > Let's say 1 index named order_by_date has relfilenode = 1870772348, and
> > it's file consist of 1870772348, 1870772348.1, and 1870772348.2
> >
> > And for oftenly queried 1 year data, do ALL files for the order_by_date
> > pushed to OS cache ? or it's just 1 file that contains index to this 1
> year
> > data.
> >
>
> Postgres has its own cache (defined by the "shared_buffers" variable).
> Usually, the unit of movement in and out from the cache is a 8k page
> (defined at compilation time), so you cant put it directly in terms of
> files.
>
> There is an extension that can inspect the cache contents:
> https://www.postgresql.org/docs/current/static/pgbuffercache.html
>
> HTH
> Gerardo
>
--
Regards,
Soni Maula Harriz
reply
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: OS cache management
In-Reply-To: <CAAMgDXkTOkWrr0_qA_Sx+sWU6WEAjFzLJVK8sBe_oq_om57fag@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox