Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits

Поиск
Список
Период
Сортировка
От Xuneng Zhou
Тема Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits
Дата
Msg-id CABPTF7XT=txv4-6SnpZGkx-CreWQ3UsOq2WCat1i64TNnuO=Cw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Ответы Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits
Список pgsql-hackers

Hi,

I performed some tests using elog(no so sure whether this is the proper way to do it) to monitor the new method. Here are the findings:

 With PGSTAT_MIN_INTERVAL set to 1000ms, the number of flush reports was reduced to approximately 40–50 during the installcheck test suite.

 With PGSTAT_IDLE_INTERVAL set to 10000ms, the reports dropped to fewer than 5.

 In contrast, the previous approach—flushing after every WalSndKeepaliveIfNecessary()—resulted in roughly 50,000 flushes.

This reduction is significant, so the overhead from the flush reports is no longer a concern. However, we still need to determine whether this frequency is sufficient to capture the system’s state during periods of high WAL activity. Based on my tests, using PGSTAT_MIN_INTERVAL seems to provide a better balance than PGSTAT_IDLE_INTERVAL.


> > 1. maybe relying on PGSTAT_IDLE_INTERVAL would make more sense? In both
> > case
> > PGSTAT_MIN_INTERVAL or PGSTAT_MIN_INTERVAL, I'm not sure there is a need to
> > update the related doc.
> >
> >
> PGSTAT_IDLE_INTERVAL seems to reduce the frequency even more.

Yeah, I think that PGSTAT_MIN_INTERVAL is the one to use (that's why that's the
one the patch is using). I just mentioned PGSTAT_IDLE_INTERVAL as an open door
for conversation in case one prefers a "larger" frequency.

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