пн, 14 июн. 2021 г. в 15:07, Andrey Borodin <x4...@yandex-team.ru>:
> PFA patch implementing this idea. > I'm benchmarked v17 patches. Testing was done on a 96-core machine, with PGDATA completely placed in tmpfs. PostgreSQL was built with CFLAGS -O2. for-update PgBench script: \set aid random_zipfian(1, 100, 2) begin; select :aid from pgbench_accounts where aid = :aid for update; update pgbench_accounts set abalance = abalance + 1 where aid = :aid; update pgbench_accounts set abalance = abalance * 2 where aid = :aid; update pgbench_accounts set abalance = abalance - 2 where aid = :aid; end; Before each test sample data was filled with "pgbench -i -s 100", testing was performed 3 times for 1 hour each test. The benchmark results are presented with changing multi_xact_members_buffers and multicast_offsets_buffers (1:2 respectively): settings tps multixact_members_buffers_64Kb 693.2 multixact_members_buffers_128Kb 691.4 multixact_members_buffers_192Kb 696.3 multixact_members_buffers_256Kb 694.4 multixact_members_buffers_320Kb 692.3 multixact_members_buffers_448Kb 693.7 multixact_members_buffers_512Kb 693.3 vanilla 676.1 Best regards, Dmitry Vasiliev.