Re: Calculating average block write time

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Calculating average block write time
Дата
Msg-id 075d05c6d4cdc01cc2467faded785a1ff77b1395.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Calculating average block write time  (Thomas Kellerer <shammat@gmx.net>)
Ответы Re: Calculating average block write time  (Ron <ronljohnsonjr@gmail.com>)
Re: Calculating average block write time  (Thomas Kellerer <shammat@gmx.net>)
Список pgsql-general
On Fri, 2022-11-18 at 11:11 +0100, Thomas Kellerer wrote:
> Thomas Kellerer schrieb am 04.11.2022 um 10:19:
> > 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.

Yours,
Laurenz Albe
-- 
+43-670-6056265
CYBERTEC PostgreSQL International GmbH
Römerstraße 19, 2752 Wöllersdorf
Web: https://www.cybertec-postgresql.com



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

Предыдущее
От: Ron
Дата:
Сообщение: Re: copy databases from two differend backups to one cluster
Следующее
От: Ron
Дата:
Сообщение: Re: Calculating average block write time