OK, here is a hackish WIP to see if we get anywhere with the L1 concept: 0001 is extracted from a patch from Horiguchi-san to remove the "dead" flag 0002 adds the large bucket, but doesn't use it for anything 0003 uses the new bucket for the L1 cache 0004 changes when to rehash 0005 is Horiguchi-san's v7 benchmark 0006 removes expiration stuff from the benchmark and prevents alloc errors with my patches while running the benchmark
This doesn't align the bucket array to a cacheline boundary, nor does it change the initial number of buckets make -C contrib/catcachebench/ install psql -c 'create extension catcachebench' # This is also from Horiguchi-san perl gen_tbl.pl | psql > /dev/null # warmup psql -c 'select catcachebench(0)' # measure median of 3 master: psql -c 'select catcachebench(1)' catcachebench --------------- 6084.992169 patch: ./inst/bin/psql -c 'select catcachebench(1)' catcachebench --------------- 5508.072532 That's decent, but not exactly stellar. I get a huge slowdown in catcachebench(2), however, so I'll have to dig into why before going any further. Some time I'll also try the function specialization Andres mentioned and see how big of a speedup that gives. -- John Naylor EDB: http://www.enterprisedb.com
v1-0002-Specialize-bucket-types-by-number-of-keys.patch
Description: Binary data
v1-0001-Remove-dead-flag-from-CatCTup.patch
Description: Binary data
v1-0004-Rationalize-rehashing-threshold.patch
Description: Binary data
v1-0005-catcachebench.patch
Description: Binary data
v1-0003-Use-hash-bucket-as-a-level-one-cache-to-avoid-wal.patch
Description: Binary data
v1-0006-Some-adjustments-to-catcachebench-and-catcache.c-.patch
Description: Binary data
#! /usr/bin/perl $collist = ""; foreach $i (0..1000) { $collist .= sprintf(", c%05d int", $i); } $collist = substr($collist, 2); printf "drop schema if exists test cascade;\n"; printf "create schema test;\n"; foreach $i (0..2999) { printf "create table test.t%04d ($collist);\n", $i; }