On Thu, Jul 28, 2011 at 10:05 AM, Robert Haas <robertmh...@gmail.com> wrote: >> I'll also test out creating and dropping some tables. > > Still need to work on this one.
And there results are in. I set up the following sophisticated test script for pgbench: CREATE TEMP TABLE foo (a int); DROP TABLE foo; And then did 5-minute test runs with varying numbers of clients on Nate Boley's 32-core machine with (a) master, (b) master + sinval-hasmessages, (c) master + lazy-vxid, and (d) master + lazy-vxid + sinval-hasmessages. I held my breath until the results started popping out, then felt much better. In the table below, results with L are with the lazy-vxid patch, S is with the sinval-hasmessages patch, LS with both, and results with no letters are neither. The numbers are the client count. Long story short, it seems that the patch actually makes this test case faster at any client code, though the improvement at 1 and 8 clients might be in the noise: 01L tps = 514.880290 (including connections establishing) 01L tps = 525.097199 (including connections establishing) 01L tps = 508.319588 (including connections establishing) 08L tps = 1834.259810 (including connections establishing) 08L tps = 1846.846089 (including connections establishing) 08L tps = 1841.402433 (including connections establishing) 32L tps = 1463.822936 (including connections establishing) 32L tps = 1481.169483 (including connections establishing) 32L tps = 1393.780335 (including connections establishing) 80L tps = 1192.768020 (including connections establishing) 80L tps = 1165.545010 (including connections establishing) 80L tps = 1169.776066 (including connections establishing) 01LS tps = 517.624068 (including connections establishing) 01LS tps = 524.507723 (including connections establishing) 01LS tps = 507.847622 (including connections establishing) 08LS tps = 1831.248178 (including connections establishing) 08LS tps = 1873.932133 (including connections establishing) 08LS tps = 1863.048113 (including connections establishing) 32LS tps = 1851.143407 (including connections establishing) 32LS tps = 1754.683356 (including connections establishing) 32LS tps = 1785.926527 (including connections establishing) 80LS tps = 1510.778084 (including connections establishing) 80LS tps = 1484.423486 (including connections establishing) 80LS tps = 1480.692051 (including connections establishing) 01 tps = 511.572832 (including connections establishing) 01 tps = 499.389527 (including connections establishing) 01 tps = 495.697080 (including connections establishing) 08 tps = 1832.762548 (including connections establishing) 08 tps = 1819.884564 (including connections establishing) 08 tps = 1835.608561 (including connections establishing) 32 tps = 1417.168790 (including connections establishing) 32 tps = 1447.478971 (including connections establishing) 32 tps = 1427.489879 (including connections establishing) 80 tps = 1154.272515 (including connections establishing) 80 tps = 1168.805881 (including connections establishing) 80 tps = 1173.971801 (including connections establishing) 01S tps = 519.860218 (including connections establishing) 01S tps = 510.759087 (including connections establishing) 01S tps = 517.159276 (including connections establishing) 08S tps = 1880.179600 (including connections establishing) 08S tps = 1829.693454 (including connections establishing) 08S tps = 1886.168401 (including connections establishing) 32S tps = 1809.950929 (including connections establishing) 32S tps = 1809.474070 (including connections establishing) 32S tps = 1798.620842 (including connections establishing) 80S tps = 1483.037788 (including connections establishing) 80S tps = 1481.059504 (including connections establishing) 80S tps = 1487.215748 (including connections establishing) So, apparently, the extra work in SIInsertDataEntries() is more than paid for by the speedup in SIGetDataEntries(). I'm guessing that at high client counts you win because of reduced spinlock contention, and at low client counts you still win a little bit because SIGetDataEntries() is called multiple times per transaction, whereas SIInsertDataEntries() is only called once. I could be all wet on the reason, but at any rate the numbers look pretty good. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers