Re: Calculating average block write time

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Calculating average block write time
Дата
Msg-id 694aa102-2155-4d67-304e-c29fbd30d865@gmx.net
обсуждение исходный текст
Ответ на Re: Calculating average block write time  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general
Laurenz Albe schrieb am 18.11.2022 um 16:51:
>>> I can easily calculate the average block read time using
>>> pg_stat_database and divide blk_read_time by blks_read.
>>>
>>> While there is a column blk_write_time, it seems that there is no
>>> cummulative measure for the total number of blocks written.
>>>
>>
>> Any ideas on how to get the equivalent of (blk_read_time / blks_read) for blk_write_time?
>>
>> I thought about using tup_updated + tup_inserted + tup_deleted because each tuple change would require at least one
blockwritten. 
>> However, a single block write could update multiple tuples so the result of that wouldn't be accurate (too low).
>
> You cannot get that, because most writes are done by the checkpointer, and
> that does not distinguish between databases.

Ah, OK. Makes sense.

Thanks




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Calculating average block write time
Следующее
От: Nikhil Benesch
Дата:
Сообщение: Appetite for `SELECT ... EXCLUDE`?