On Jul18, 2011, at 04:36 , Robert Haas wrote: > On Fri, Jul 8, 2011 at 6:02 AM, Florian Pflug <f...@phlo.org> wrote: >>> I don't want to fiddle with your git repo, but if you attach a patch >>> that applies to the master branch I'll give it a spin if I have time. >> >> Patch attached. >> >> Beware that it needs at least GCC 4.1, otherwise it'll use a per-partition >> spin lock instead of "locked xadd" to increment the shared counters. > > [ Back from vacation, catching up on email. ] > > gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) > > pgbench -n -S -T 180 -c 32 -j 32 > > with lwlock-part patch: > tps = 36974.644091 (including connections establishing) > > unpatched cd34647c666be867f95ef8fc0492c30356043f10: > tps = 39432.064293 (including connections establishing) > > And with -c 8 -j 8: > > tps = 26946.202428 (including connections establishing) > tps = 27206.507424 (including connections establishing)
:-( That's disappointing, to say the least. I also completely fail to understand what the heck is going on there. I mean, you did conclusively prove that commenting out the SInval stuff made a huge difference. There's also supposed to hardly any invalidation going on during a pgbench -S run. So, since the patch removes two of the three spin-lock acquisitions from SIGetDataEntries() (so long as there are no exclusive lockers of SInvalReadLock), there should be some effect. Or so I'd think at least... If anyone has I theory, I'd love to hear it. best regards, Florian Pflug -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers