Re: Change GUC hashtable to use simplehash? - Mailing list pgsql-hackers

From jian he
Subject Re: Change GUC hashtable to use simplehash?
Date
Msg-id CACJufxGvNummjj57mZ5sNqZRYBdreXTgKAJ0MC+0wjpj3+sc2w@mail.gmail.com
Whole thread Raw
In response to Re: Change GUC hashtable to use simplehash?  (John Naylor <johncnaylorls@gmail.com>)
Responses Re: Change GUC hashtable to use simplehash?
List pgsql-hackers
On Sat, Jan 6, 2024 at 9:04 AM John Naylor <johncnaylorls@gmail.com> wrote:
>
> On Fri, Jan 5, 2024 at 6:58 PM jian he <jian.universality@gmail.com> wrote:
> >         -Dcassert=true \
>
> >         -Dbuildtype=debug \
>
> These probably don't matter much for this test, but these should be
> off for any performance testing.
>
> >                 -DWRITE_READ_PARSE_PLAN_TREES
> >                 -DCOPY_PARSE_PLAN_TREES
> >                 -DREALLOCATE_BITMAPSETS
> >                 -DRAW_EXPRESSION_COVERAGE_TEST
>
> I'd guess it was was of these, which should likewise be off as well.

Thanks for pointing it out.
meson setup ${BUILD} \
        -Dprefix=${PG_PREFIX} \
        -Dpgport=5459 \
        -Dplperl=enabled \
        -Dplpython=enabled \
        -Dssl=openssl \
        -Dldap=enabled \
        -Dlibxml=enabled \
        -Dlibxslt=enabled \
        -Duuid=e2fs \
        -Dzstd=enabled \
        -Dlz4=enabled \
        -Dsystemd=enabled \
        -Dicu=enabled \
        -Dbuildtype=release \
        -Ddocs_pdf=disabled \
        -Dllvm=disabled \
        -Ddocs_pdf=disabled

now the results:

jian@jian:~/Desktop/pg_src/src4/postgres$ bash
/home/jian/Desktop/pg_src/src4/postgres/runbench.sh
select * from bench_string_hash(100000);

latency average = 145.021 ms
select * from bench_cstring_hash_unaligned(100000);
latency average = 100.829 ms
select * from bench_cstring_hash_aligned(100000);
latency average = 100.606 ms
select * from bench_pgstat_hash(100000);
latency average = 96.140 ms
select * from bench_pgstat_hash_fh(100000);

latency average = 62.784 ms
jian@jian:~/Desktop/pg_src/src4/postgres$ bash
/home/jian/Desktop/pg_src/src4/postgres/runbench.sh
select * from bench_string_hash(100000);

latency average = 147.782 ms
select * from bench_cstring_hash_unaligned(100000);
latency average = 101.179 ms
select * from bench_cstring_hash_aligned(100000);
latency average = 101.219 ms
select * from bench_pgstat_hash(100000);
latency average = 96.357 ms
select * from bench_pgstat_hash_fh(100000);

latency average = 62.902 ms



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: Change GUC hashtable to use simplehash?
Next
From: Alexander Lakhin
Date:
Subject: Re: Wrong rows estimations with joins of CTEs slows queries by more than factor 500