Re: Yet another vectorized engine

From: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
To: Hubert Zhang <hzhang(at)pivotal(dot)io>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Gang Xiong <gxiong(at)pivotal(dot)io>, Asim R P <apraveen(at)pivotal(dot)io>, Ning Yu <nyu(at)pivotal(dot)io>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: Yet another vectorized engine
Date: 2020-02-26 09:51:35
Message-ID: d57ceed2-5491-b9cf-5314-4382d631bdf9@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25.02.2020 19:40, Konstantin Knizhnik wrote:
> I have ported vectorize_engine  for zedstore (vertical table AM).
> Results of TPCH-10G/Q1 are the following:
>
> par.workers
> PG9_6
> vectorize=off
> PG9_6
> vectorize=on
> master
> vectorize=off
> jit=on
> master
> vectorize=off
> jit=off master
> vectorize=on
> jit=on master
> vectorize=on
> jit=off zedstore vectorize=off
> jit=on
> zedstore vectorize=off
> jit=off zedstore vectorize=on
> jit=on zedstore vectorize=on
> jit=off
> 0
> 36
> 20
> 16
> 25.5
> 15
> 17.5
> 18
> 26
> 17
> 19
> 4
> 10
> -
> 5 7
> -
> - 5
> 7
> -
> -
>
>

After correct calculation of used columns bitmapset and passing it to
table_beginscan_with_column_projection function zedstore+vectorize_engine
show the best result (without parallel execution):

par.workers
PG9_6
vectorize=off
PG9_6
vectorize=on
master
vectorize=off
jit=on
master
vectorize=off
jit=off master
vectorize=on
jit=on master
vectorize=on
jit=off zedstore vectorize=off
jit=on
zedstore vectorize=off
jit=off zedstore vectorize=on
jit=on zedstore vectorize=on
jit=off
0
36
20
16
25.5
15
17.5
18
26
14
16
4
10
-
5 7
-
- 5
7
-
-

but still the difference with vanilla is minimal.

Profiler top is the following:

  16.30%  postgres  postgres             [.] zedstoream_getnexttile
   6.98%  postgres  postgres             [.] decode_chunk
   6.68%  postgres  liblz4.so.1.7.1      [.] LZ4_decompress_safe
   5.37%  postgres  vectorize_engine.so  [.] vfloat8_accum
   5.23%  postgres  postgres             [.] bpchareq

--

Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hubert Zhang 2020-02-26 10:11:26 Re: Yet another vectorized engine
Previous Message Michael Paquier 2020-02-26 09:35:51 Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file