Re: MultiXact\SLRU buffers configuration
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Gilles Darold <gilles@darold.net>,
Tomas Vondra <tomas.vondra@enterprisedb.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>,
Alexander Korotkov <aekorotkov@gmail.com>, Anastasia Lubennikova <a.lubennikova@postgrespro.ru>,
Daniel Gustafsson <daniel@yesql.se>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-03-24T21:31:56Z
Lists: pgsql-hackers
Attachments
- v10-0001-Make-all-SLRU-buffer-sizes-configurable.patch (text/x-patch) patch v10-0001
- v10-0002-Add-buffer-mapping-table-for-SLRUs.patch (text/x-patch) patch v10-0002
Hi Andrey, On Sat, Mar 13, 2021 at 1:44 AM Andrey Borodin <x4mmm@yandex-team.ru> wrote: > [v10] +int multixact_offsets_slru_buffers = 8; +int multixact_members_slru_buffers = 16; +int subtrans_slru_buffers = 32; +int notify_slru_buffers = 8; +int serial_slru_buffers = 16; +int clog_slru_buffers = 0; +int commit_ts_slru_buffers = 0; I don't think we should put "slru" (the name of the buffer replacement algorithm, implementation detail) in the GUC names. + It defaults to 0, in this case CLOG size is taken as <varname>shared_buffers</varname> / 512. We already know that increasing the number of CLOG buffers above the current number hurts as the linear search begins to dominate (according to the commit message for 5364b357), and it doesn't seem great to ship a new feature that melts your CPU when you turn it up. Perhaps, to ship this, we need to introduce a buffer mapping table? I have attached a "one coffee" attempt at that, on top of your v10 patch (unmodified), for discussion. It survives basic testing but I don't know how it performs.
Commits
-
Rework new SLRU test with injection points
- 94a3373ac5c3 18.0 landed
-
injection_point: Add injection_points.stats
- 2e35c67f9568 18.0 landed
-
injection_points: Add initialization of shmem state when loading module
- b2b023aa3706 18.0 landed
-
Add injection-point test for new multixact CV usage
- 768a9fd5535f 18.0 landed
-
Use conditional variable to wait for next MultiXact offset
- a0e0fb1ba56f 17.0 landed
-
Improve performance of subsystems on top of SLRU
- 53c2a97a9266 17.0 landed
-
Adjust VACUUM hastup LP_REDIRECT comments.
- 325bc54eed4e 16.0 cited
-
Test replay of regression tests, attempt II.
- f47ed79cc8a0 15.0 cited