Re: track_planning causing performance regression
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Ants Aasma <ants@cybertec.at>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>, Julien Rouhaud <rjuju123@gmail.com>, "Tharakan, Robins" <tharar@amazon.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-06-30T19:06:13Z
Lists: pgsql-hackers
Hi, On 2020-06-30 14:30:03 +0300, Ants Aasma wrote: > Futex is a Linux kernel call that allows to build a lock that has > uncontended cases work fully in user space almost exactly like a spinlock, > while falling back to syscalls that wait for wakeup in case of contention. > It's not portable, but probably something similar could be implemented for > other operating systems. I did not pursue this further because it became > apparent that every performance critical spinlock had already been removed. Our lwlock implementation does have that property already, though. While the kernel wait is implemented using semaphores, those are implemented using futexes internally (posix ones, not sysv ones, so only after whatever version we switched the default to posix semas on linux). I'd rather move towards removing spinlocks from postgres than making their implementation more complicated... Greetings, Andres Freund
Commits
-
doc: Fix description about pg_stat_statements.track_planning.
- 306c5e05e20f 13.4 landed
- e48f2afee631 14.0 landed
- 9d2a7757347c 15.0 landed
-
doc: Add note about possible performance overhead by enabling track_planning.
- da6b6ff95bca 13.0 landed
- 321fa6a4a26c 14.0 landed
-
Change default of pg_stat_statements.track_planning to off.
- 8d459762b103 13.0 landed
- d1763ea8c9c3 14.0 landed