Re: [HACKERS] asynchronous execution

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: robertmhaas(at)gmail(dot)com
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, ah(at)cybertec(dot)at, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] asynchronous execution
Date: 2018-02-21 08:32:31
Message-ID: 20180221.173231.183249596.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Thu, 11 Jan 2018 17:08:39 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote in <20180111(dot)170839(dot)23674040(dot)horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
> At Mon, 11 Dec 2017 20:07:53 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote in <20171211(dot)200753(dot)191768178(dot)horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
> > > The attached PoC patch theoretically has no impact on the normal
> > > code paths and just brings gain in async cases.
> >
> > The parallel append just committed hit this and the attached are
> > the rebased version to the current HEAD. The result of a concise
> > performance test follows.
> >
> > patched(ms) unpatched(ms) gain(%)
> > A: simple table scan : 3562.32 3444.81 -3.4
> > B: local partitioning : 1451.25 1604.38 9.5
> > C: single remote table : 8818.92 9297.76 5.1
> > D: sharding (single con) : 5966.14 6646.73 10.2
> > E: sharding (multi con) : 1802.25 6515.49 72.3
> >
> > > A and B are degradation checks, which are expected to show no
> > > degradation. C is the gain only by postgres_fdw's command
> > > presending on a remote table. D is the gain of sharding on a
> > > connection. The number of partitions/shards is 4. E is the gain
> > > using dedicate connection per shard.
> >
> > Test A is accelerated by parallel sequential scan. Introducing
> > parallel append accelerates test B. Comparing A and B, I doubt
> > that degradation is stably measurable at least my environment but
> > I believe that there's no degradation theoreticaly. The test C to
> > E still shows apparent gain.
> > regards,
>
> The patch conflicts with 3cac0ec. This is the rebased version.

It hadn't been workable itself for a long time.

- Rebased to current master.
(Removed some wrongly-inserted lines)
- Fixed wrong-positioned assertion in postgres_fdw.c
(Caused assertion failure on normal usage)
- Properly reset persistent (static) variable.
(Caused SEGV under certain condition)
- Fixed explain output of async-mixed append plan.
(Choose proper subnode as the referent node)

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
0001-Allow-wait-event-set-to-be-registered-to-resource-ow.patch text/x-patch 9.4 KB
0002-core-side-modification.patch text/x-patch 31.6 KB
0003-async-postgres_fdw.patch text/x-patch 47.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-02-21 09:06:32 Re: [HACKERS] Runtime Partition Pruning
Previous Message Tsunakawa, Takayuki 2018-02-21 08:27:40 RE: Speed up the removal of WAL files