monitoring-stats.html documentation

Поиск
Список
Период
Сортировка
От Robert Haas
Тема monitoring-stats.html documentation
Дата
Msg-id 603c8f070904041413j5a1880f9u22bae2e7d56543f4@mail.gmail.com
обсуждение исходный текст
Ответы Re: monitoring-stats.html documentation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
http://developer.postgresql.org/pgdocs/postgres/monitoring-stats.html
says: "Note: blocks_fetched minus blocks_hit gives the number of
kernel read() calls issued for the table, index, or database; but the
actual number of physical reads is usually lower due to kernel-level
buffering."  This seems to imply that anything that increases
blocks_hit should also increase blocks_fetched, but that doesn't seem
to match the actual behavior.

rhaas=# select heap_blks_read, heap_blks_hit from pg_statio_user_tables;heap_blks_read | heap_blks_hit
----------------+---------------          4356 |          5618
(1 row)

rhaas=# select sum(1) from foo; sum
--------100000
(1 row)

rhaas=# select heap_blks_read, heap_blks_hit from pg_statio_user_tables;heap_blks_read | heap_blks_hit
----------------+---------------          4356 |          6354
(1 row)

Obviously, if the note above were correct then (1) the number of
read() calls issue by the kernel would be negative and (2) accessing
the relation when it is fully cached would decreases the number of
read() calls previously issued.

...Robert


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: GetCurrentVirtualXIDs()
Следующее
От: Tom Lane
Дата:
Сообщение: Re: monitoring-stats.html documentation