On Mon, 12 Jul 2021 at 19:23, David Rowley <dgrowle...@gmail.com> wrote: > I also adjusted the hash seq scan code so that it performs better when > faced a non-sparsely populated table. Previously my benchmark for > that case didn't do well [2].
I was running some select only pgbench tests today on an AMD 3990x machine with a large number of processes. I saw that LockReleaseAll was coming up on the profile a bit at: Master: 0.77% postgres [.] LockReleaseAll I wondered if this patch would help, so I tried it and got: dense hash lockrelease all: 0.67% postgres [.] LockReleaseAll It's a very small increase which translated to about a 0.62% gain in tps. It made me think it might be worth doing something about this LockReleaseAll can show up when releasing small numbers of locks. pgbench -T 240 -P 10 -c 132 -j 132 -S -M prepared --random-seed=12345 postgres Units = tps Sec master dense hash LockReleaseAll 10 3758201.2 3713521.5 98.81% 20 3810125.5 3844142.9 100.89% 30 3806505.1 3848458 101.10% 40 3816094.8 3855706.6 101.04% 50 3820317.2 3851717.7 100.82% 60 3827809 3851499.4 100.62% 70 3828757.9 3849312 100.54% 80 3824492.1 3852378.8 100.73% 90 3816502.1 3854793.8 101.00% 100 3819124.1 3860418.6 101.08% 110 3816154.3 3845327.7 100.76% 120 3817070.5 3845842.5 100.75% 130 3815424.7 3847626 100.84% 140 3823631.1 3846760.6 100.60% 150 3820963.8 3840196.6 100.50% 160 3827737 3841149.3 100.35% 170 3827779.2 3840130.9 100.32% 180 3829352 3842814.5 100.35% 190 3825518.3 3841991 100.43% 200 3823477.2 3839390.7 100.42% 210 3809304.3 3836433.5 100.71% 220 3814328.5 3842073.7 100.73% 230 3811399.3 3843780.7 100.85% avg 3816959.53 3840672.478 100.62% David