Re: RFC: Improve CPU cache locality of syscache searches

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: RFC: Improve CPU cache locality of syscache searches
Дата
Msg-id CAFBsxsEiaaeqtRezs+5gwZNTbJhE+O3ZLVfp1uOed2-ui4k9Lw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: RFC: Improve CPU cache locality of syscache searches  (John Naylor <john.naylor@enterprisedb.com>)
Список pgsql-hackers
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
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [Patch] change the default value of shared_buffers in postgresql.conf.sample
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: [Patch] change the default value of shared_buffers in postgresql.conf.sample