Re: How to find if a SELECT is reading from buffer or disk ?

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: How to find if a SELECT is reading from buffer or disk ?
Дата
Msg-id 4BFBC9A40200002500031A64@gw.wicourts.gov
обсуждение исходный текст
Ответ на How to find if a SELECT is reading from buffer or disk ?  (Balkrishna Sharma <b_ki@hotmail.com>)
Ответы Re: How to find if a SELECT is reading from buffer or disk ?  (Balkrishna Sharma <b_ki@hotmail.com>)
Список pgsql-admin
Balkrishna Sharma <b_ki@hotmail.com> wrote:

> I am increasing the shared_buffer size in postgresql.conf and want
> to measure its effect on READ. In essence I want to know if the
> SELECT queries I am firing repeatedly is reading from the buffer
> or going directly to the disk.

There's a third option -- PostgreSQL reads and writes will normally
go through the OS cache.

> Right now I am just looking at execution time of the SELECTs and
> trying to conclude. But there should be a direct way to see where
> the SELECT reads from.
> How can I accomplish this ?

You didn't mention your OS.  There's usually a way to monitor disk
I/O built in to the OS.  I usually start with:

vmstat 1

-Kevin

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

Предыдущее
От: Balkrishna Sharma
Дата:
Сообщение: How to find if a SELECT is reading from buffer or disk ?
Следующее
От: Balkrishna Sharma
Дата:
Сообщение: Re: How to find if a SELECT is reading from buffer or disk ?