Re: [POC] Faster processing at Gather node

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [POC] Faster processing at Gather node
Date: 2017-10-23 12:50:34
Message-ID: CAA4eK1+YAEoWOaPoGJS=PCAdtFoCXTHxO37kazpX89sCugBYTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 19, 2017 at 1:16 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Oct 17, 2017 at 5:39 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
>> b) Use shm_mq_sendv in tqueue.c by batching up insertions into the
>> queue whenever it's not empty when a tuple is ready.
>
> Batching them with what? I hate to postpone sending tuples we've got;
> that sounds nice in the case where we're sending tons of tuples at
> high speed, but there might be other cases where it makes the leader
> wait.
>

I think Rafia's latest patch on the thread [1] has done something
similar where the tuples are sent till there is a space in shared
memory queue and then turn to batching the tuples using local queues.

[1] - https://www.postgresql.org/message-id/CAOGQiiNiMhq5Pg3LiYxjfi2B9eAQ_q5YjS%3DfHiBJmbSOF74aBQ%40mail.gmail.com

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-10-23 13:50:24 Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much
Previous Message Amit Kapila 2017-10-23 12:46:59 Re: [POC] Faster processing at Gather node