Re: Show WAL write and fsync stats in pg_stat_io
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, Melanie Plageman <melanieplageman@gmail.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers <pgsql-hackers@postgresql.org>, "bharath.rupireddyforpostgres@gmail.com"
<bharath.rupireddyforpostgres@gmail.com>, Thomas Munro <thomas.munro@gmail.com>
Date: 2025-02-05T05:30:12Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix copy-paste error related to the autovacuum launcher in pgstat_io.c
- 17d8bba6dad1 18.0 landed
-
Move SQL tests of pg_stat_io for WAL data to recovery test 029_stats_restart
- 428fadb7e97e 18.0 landed
-
Add data for WAL in pg_stat_io and backend statistics
- a051e71e28a1 18.0 landed
-
Improve comment on top of pgstat_count_io_op_time()
- b998fedab74c 18.0 landed
-
Refactor pgstat_prepare_io_time() with an input argument instead of a GUC
- 3c9d9acae0bc 17.0 landed
On Tue, Feb 04, 2025 at 05:40:06PM +0300, Nazir Bilal Yavuz wrote:
> Hi,
>
> On Tue, 4 Feb 2025 at 17:29, Nazir Bilal Yavuz <byavuz81@gmail.com> wrote:
> >
> > Thanks! My benchmark results are the same [1]. I could not see the
> > noticable difference between master and patched version. I run the
> > benchmark a couple of times, sometimes the patched version, sometimes the
> > master version is better. I think the differences are due to margin of
> > error. Sharing the latest benchmark run at the bottom [1].
> >
> > [1]
> > pgbench -n -c8 -j8-T60 -f <(echo "SELECT pg_logical_emit_message(true, 'test', repeat('0', ${emit_bytes}));";)
> > with emit bytes being 10 and 8192 for the 'acpi_pm', 'hpet' and 'tsc' clock sources.
> >
> > (I hope that table gets rendered correctly in the mailing list.)
>
> It did not get rendered correctly, so attached as a text file.
Thanks for this summary.
track_io_timing=on and track_wal_io_timing=off are the most
interesting lines to me, for HEAD vs the patch. The number for tsc
with 10 bytes is the most pronounced one, but there is a similar
variance even when using "off" for the two GUCs, where I would not
have expected any differences. So yeah, the variance looks like
mostly noise here.
Please note that I have marked the CF entry at [1] as committed as the
main goal of this thread has been achieved. Do you want to pursue the
topic about the potential refactorings in pgstat_tracks_io_op() and
pgstat_tracks_io_object()? There is a second one with the elimination
of the write & sync columns for pg_stat_wal. Both should have their
own thread if worked on, and this thread has been already quite long.
[1]: https://commitfest.postgresql.org/51/4950/
--
Michael