From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Re: effect of JIT tuple deform? |
Date: | 2018-06-23 06:47:18 |
Message-ID: | CAFj8pRBqyqqczRK3wrp2VJQMtY_RspgseLkvChk7C5MsNb7CoQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2018-06-23 8:35 GMT+02:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
> Hi
>
> I try to measure effect of JIT tuple deform and I don't see any possible
> effect.
>
> Is it this feature active in master branch?
>
> Is possible to see this feature in EXPLAIN ANALYZE?
>
Unfortunately I got slowdown
0. shared buffers = 1GB
1. create table with 50 int columns
2. insert into this table 4M rows
postgres=# \dt+ wt
List of relations
+--------+------+-------+-------+--------+-------------+
| Schema | Name | Type | Owner | Size | Description |
+--------+------+-------+-------+--------+-------------+
| public | wt | table | pavel | 893 MB | |
+--------+------+-------+-------+--------+-------------+
(1 row)
default setting
postgres=# explain analyze select sum(c45) from wt;
+------------------------------------------------------------------------------------------------------------------------------------------+
| QUERY
PLAN |
+------------------------------------------------------------------------------------------------------------------------------------------+
| Finalize Aggregate (cost=136120.69..136120.70 rows=1 width=8) (actual
time=879.547..879.547 rows=1 loops=1) |
| -> Gather (cost=136120.47..136120.68 rows=2 width=8) (actual
time=879.514..879.538 rows=3 loops=1) |
| Workers Planned:
2
|
| Workers Launched:
2
|
| -> Partial Aggregate (cost=135120.47..135120.48 rows=1 width=8)
(actual time=850.283..850.284 rows=1 loops=3) |
| -> Parallel Seq Scan on wt (cost=0.00..130953.77
rows=1666678 width=4) (actual time=0.071..223.338 rows=1333347 loops=3) |
| Planning Time: 0.158
ms
|
|
JIT:
|
| Functions:
6
|
| Generation Time: 4.267
ms
|
| Inlining:
false
|
| Inlining Time: 0.000
ms
|
| Optimization:
false
|
| Optimization Time: 2.472
ms
|
| Emission Time: 15.929
ms
|
| Execution Time: 899.496
ms
|
+------------------------------------------------------------------------------------------------------------------------------------------+
(16 rows)
postgres=# set jit_tuple_deforming to off;
SET
postgres=# explain analyze select sum(c45) from wt;
+------------------------------------------------------------------------------------------------------------------------------------------+
| QUERY
PLAN |
+------------------------------------------------------------------------------------------------------------------------------------------+
| Finalize Aggregate (cost=136120.69..136120.70 rows=1 width=8) (actual
time=743.667..743.667 rows=1 loops=1) |
| -> Gather (cost=136120.47..136120.68 rows=2 width=8) (actual
time=743.654..743.657 rows=3 loops=1) |
| Workers Planned:
2
|
| Workers Launched:
2
|
| -> Partial Aggregate (cost=135120.47..135120.48 rows=1 width=8)
(actual time=715.532..715.533 rows=1 loops=3) |
| -> Parallel Seq Scan on wt (cost=0.00..130953.77
rows=1666678 width=4) (actual time=0.067..216.245 rows=1333347 loops=3) |
| Planning Time: 0.157
ms
|
|
JIT:
|
| Functions:
4
|
| Generation Time: 1.989
ms
|
| Inlining:
false
|
| Inlining Time: 0.000
ms
|
| Optimization:
false
|
| Optimization Time: 0.449
ms
|
| Emission Time: 7.254
ms
|
| Execution Time: 761.549
ms
|
+------------------------------------------------------------------------------------------------------------------------------------------+
(16 rows)
When jit_tuple_deforming is enabled, the query is slower about 100ms, looks
like performance regression
> Regards
>
> Pavel
>
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2018-06-23 10:16:10 | Re: Concurrency bug in UPDATE of partition-key |
Previous Message | Pavel Stehule | 2018-06-23 06:35:04 | effect of JIT tuple deform? |