From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, "tomas(at)vondra(dot)me" <tomas(at)vondra(dot)me>, Jan Wieck <jan(at)wi3ck(dot)info>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com> |
Subject: | Re: Commit Timestamp and LSN Inversion issue |
Date: | 2024-11-12 14:06:23 |
Message-ID: | 43vrkfqyv72ofuxhltur35twwcxiyujqrcfu3b26yzy4o5eyg3@g4fxomgmnqgk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2024-11-11 09:49:19 +0000, Hayato Kuroda (Fujitsu) wrote:
> I've done performance tests compared with master vs. v2 patch.
> It showed that for small transactions cases, the performance difference was 0-2%,
> which was almost the same of the run-by-run variation.
>
> We may completely change the approach based on the recent discussion,
> but let me share it once.
>
> ## Executed workload
>
> Very small transactions with many clients were executed and results between master
> and patched were compared. Two workloads were executed and compared:
>
> - Insert single tuple to the table which does not have indices:
> ```
> BEGIN;
> INSERT INTO foo VALUES (1);
> COMMIT;
> ```
>
> - Emit a transactional logical replication message:
> ```
> BEGIN;
> SELECT pg_logical_emit_message(true, 'pgbench', 'benchmarking', false);
> COMMIT;
> ```
>
> ## Results
This is not a useful measurement for overhead introduced in
ReserveXLogInsertLocation(). What you're measuring here is the number of
commits/second, not the WAL insertion rate. The number of commits/second is
largely determined by your disk's write latency, the batching of WAL flushes
and things like the SLRU code.
To measure the effect of changes to ReserveXLogInsertLocation() use something
like this as a pgbench script:
SELECT pg_logical_emit_message(false, \:client_id::text, '1'), generate_series(1, 10000) OFFSET 10000;
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Aleksander Alekseev | 2024-11-12 14:15:52 | Re: [PATCH] Refactor SLRU to always use long file names |
Previous Message | Michael Banck | 2024-11-12 14:05:31 | Re: Parallel workers stats in pg_stat_database |