Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits - Mailing list pgsql-hackers

From Xuneng Zhou
Subject Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits
Date
Msg-id CABPTF7XT=txv4-6SnpZGkx-CreWQ3UsOq2WCat1i64TNnuO=Cw@mail.gmail.com
Whole thread Raw
In response to Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits
List 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 by date:

Previous
From: Alexander Pyhalov
Date:
Subject: Re: Add semi-join pushdown to postgres_fdw
Next
From: Alexander Korotkov
Date:
Subject: Re: Add semi-join pushdown to postgres_fdw