Re: SLRU statistics

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: SLRU statistics
Дата
Msg-id 20200328002630.2nz5y3dvymqnvxtv@development
обсуждение исходный текст
Ответ на Re: SLRU statistics  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: SLRU statistics  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers
Hi,

here is a bit improved version of the patch - I've been annoyed by how
the resetting works (per-entry timestamp, but resetting all entries) so
I've added a new function pg_stat_reset_slru() that allows resetting
either all entries or just one entry (identified by name). So

     SELECT pg_stat_reset_slru('clog');

resets just "clog" SLRU counters, while

     SELECT pg_stat_reset_slru(NULL);

resets all entries.

I've also done a bit of benchmarking, to see if this has measurable
impact (in which case it might deserve a new GUC), and I think it's not
measurable. I've used a tiny unlogged table (single row).

     CREATE UNLOGGED TABLE t (a int);
     INSERT INTO t VALUES (1);

and then short pgbench runs with a single client, updatint the row. I've
been unable to measure any regression, it's all well within 1% so noise.
But perhaps there's some other benchmark that I should do?


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Make MemoryContextMemAllocated() more precise
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: error context for vacuum to include block number