Re: Support Parallel Query Execution in Executor

Поиск
Список
Период
Сортировка
От Qingqing Zhou
Тема Re: Support Parallel Query Execution in Executor
Дата
Msg-id e1aj3m$dim$1@news.hub.org
обсуждение исходный текст
Ответ на Support Parallel Query Execution in Executor  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Ответы Re: Support Parallel Query Execution in Executor  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> wrote
>
> This is exactly the bit of optimism I was questioning.  We've already
> been sweating blood trying to reduce multiprocessor contention on data
> structures in which collisions ought to be avoidable (ie, buffer arrays
> where you hope not everyone is hitting the same buffer at once).  I
> think passing large volumes of data between different processes is going
> to incur quite a lot of locking overhead, pipeline stalls for cache line
> transfers, etc, etc, because heavy contention for the transfer buffer is
> simply not going to be avoidable.
>

Yes, there is overhead. Let's say how can we tackle them one by one:

* lock contention of transfer buffer *
A general way is partitioning. We can try to alleviate the lock contention 
by sharing transfer buffer only between each two processes (master and 
slave).

* large amount of data *
Thinking of the simplest master-slave seqscan senario, I am copying the 
HeapTuple so far (like the code in sort read/write tuple), but potentially 
we can only pass the offset and pinned page, which will require the slave 
process pinned the page for a little longer time, say every 5 pages. I 
didn't see any application can cause Postgres pinned a lot pages, so this 
might be one step to reduce the data volumn.

On the other hand, why do we need parallel execution anyway? Because if we 
got a 4 way SMP with strong IO device, we may want to trade the performance 
with more resources for some queries.


Regards,
Qingqing 




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Support Parallel Query Execution in Executor
Следующее
От: Philipp Ott
Дата:
Сообщение: Re: "Fat" binaries for OS X (was Re: [GENERAL] Postgres Library natively available for Mac OSX Intel?)