Re: [PERFORM] OS cache management

Поиск
Список
Период
Сортировка
От Gerardo Herzig
Тема Re: [PERFORM] OS cache management
Дата
Msg-id 1752296765.269917.1504707214219.JavaMail.zimbra@fmed.uba.ar
обсуждение исходный текст
Ответ на [PERFORM] OS cache management  (Soni M <diptatapa@gmail.com>)
Ответы Re: [PERFORM] OS cache management
Список pgsql-performance

----- Mensaje original -----
> De: "Soni M" <diptatapa@gmail.com>
> Para: pgsql-performance@postgresql.org
> 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
thecache 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


В списке pgsql-performance по дате отправления:

Предыдущее
От: Marcin Barczynski
Дата:
Сообщение: [PERFORM] Slow vacuum of GIST indexes, because of random reads on PostgreSQL 9.6
Следующее
От: Moreno Andreo
Дата:
Сообщение: Re: [SPAM] [PERFORM] OS cache management