Re: strange perf regression with data checksums
Aleksander Alekseev <aleksander@timescale.com>
From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Tomas Vondra <tomas@vondra.me>
Date: 2025-05-09T12:53:52Z
Lists: pgsql-hackers
Hi Tomas, > While running some benchmarks comparing 17 and 18, I ran into a simple > workload where 18 throughput drops by ~80%. After pulling my hair for a > couple hours I realized the change that triggered this is 04bec894a04c, > which set checksums on by default. Which is very bizarre, because the > workload is read-only and fits into shared buffers. > > [...] > > But why would it depend on checksums at all? This read-only test should > be entirely in-memory, so how come it's affected? These are interesting results. Just wanted to clarify: did you make sure that all the hint bits were set before executing the benchmark? I'm not claiming that hint bits are necessarily the reason for the observed behavior but when something is off with presumably read-only queries this is the first reason that comes to mind. At least we should make sure hint bits are excluded from the equation. If memory serves, VACUUM FULL and CHECKPOINT after filling the table and creating the index should do the trick. -- Best regards, Aleksander Alekseev
Commits
-
Make _bt_killitems drop pins it acquired itself.
- 7c319f54917f 18.0 landed
- 40aa5ddea1c0 17.6 landed
- c7f25feb3862 16.10 landed
- d2ec671092a1 15.14 landed
- 7c7c0a77dc8a 14.19 landed
- 38c8d298704c 13.22 landed
-
Avoid BufferGetLSNAtomic() calls during nbtree scans.
- e6eed40e4441 18.0 landed
-
Reduce pinning and buffer content locking for btree scans.
- 2ed5b87f96d4 9.5.0 cited