From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | Tomas Vondra <tomas(at)vondra(dot)me> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: strange perf regression with data checksums |
Date: | 2025-05-09 13:19:35 |
Message-ID: | CAJ7c6TNhSsFi8TWoBP2dp5YdO6_UzuRhu964EzNX6F1xhnwwkA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
> > 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.
>
> Good question. I haven't checked that explicitly, but it's a tiny data
> set (15MB) and I observed this even on long benchmarks with tens of
> millions of queries. So the hint bits should have been set.
>
> Also, I should have mentioned the query does an index-only scan, and the
> pin/unpin calls are on index pages, not on the heap.
There is one more thing I would check. As I recall perf shows only
on-CPU time while actually the backends may be sleeping on the locks
most of the time. If this is the case perf will not show you the
accurate picture.
In order to check this personally I create gdb.script with a single GDB command:
```
bt
```
And execute:
```
gdb --batch --command=gdb.script -p (backend_pid_here)
```
... 10+ times or so. If what you are observing is actually a lock
contention and the backend sleeps on a lock most of the time, 8/10 or
so stacktraces will show you this.
I assume of course that the benchmark is done on release builds with
disabled Asserts, etc.
BTW do you believe this is a problem related exclusively to NUMA CPUs
with 90+ cores or I can reproduce it on SMT as well?
--
Best regards,
Aleksander Alekseev
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2025-05-09 13:33:11 | Re: Adding skip scan (including MDAM style range skip scan) to nbtree |
Previous Message | g l | 2025-05-09 13:10:55 | is there any query that can cover these statements in join_is_legal()? |