Re: WIP: [[Parallel] Shared] Hash
Rafia Sabih <rafia.sabih@enterprisedb.com>
On Thu, Feb 2, 2017 at 1:19 AM, Thomas Munro <thomas.munro@enterprisedb.com> wrote: > On Thu, Feb 2, 2017 at 3:34 AM, Rafia Sabih > <rafia.sabih@enterprisedb.com> wrote: >> 9 | 62928.88 | 59077.909 > > Thanks Rafia. At first glance this plan is using the Parallel Shared > Hash in one place where it should pay off, that is loading the orders > table, but the numbers are terrible. I noticed that it uses batch > files and then has to increase the number of batch files, generating a > bunch of extra work, even though it apparently overestimated the > number of rows, though that's only ~9 seconds of ~60. I am > investigating. Hi Thomas, Apart from the previously reported regression, there appear one more issue in this set of patches. At times, running a query using parallel hash it hangs up and all the workers including the master shows the following backtrace, #0 0x00003fff880c7de8 in __epoll_wait_nocancel () from /lib64/power8/libc.so.6 #1 0x00000000104e2718 in WaitEventSetWaitBlock (set=0x100157bde90, cur_timeout=-1, occurred_events=0x3fffdbe69698, nevents=1) at latch.c:998 #2 0x00000000104e255c in WaitEventSetWait (set=0x100157bde90, timeout=-1, occurred_events=0x3fffdbe69698, nevents=1, wait_event_info=134217745) at latch.c:950 #3 0x0000000010512970 in ConditionVariableSleep (cv=0x3ffd736e05a4, wait_event_info=134217745) at condition_variable.c:132 #4 0x00000000104dbb1c in BarrierWaitSet (barrier=0x3ffd736e0594, new_phase=1, wait_event_info=134217745) at barrier.c:97 #5 0x00000000104dbb9c in BarrierWait (barrier=0x3ffd736e0594, wait_event_info=134217745) at barrier.c:127 #6 0x00000000103296a8 in ExecHashShrink (hashtable=0x3ffd73747dc0) at nodeHash.c:1075 #7 0x000000001032c46c in dense_alloc_shared (hashtable=0x3ffd73747dc0, size=40, shared=0x3fffdbe69eb8, respect_work_mem=1 '\001') at nodeHash.c:2618 #8 0x000000001032a2f0 in ExecHashTableInsert (hashtable=0x3ffd73747dc0, slot=0x100158f9e90, hashvalue=2389907270) at nodeHash.c:1476 #9 0x0000000010327fd0 in MultiExecHash (node=0x100158f9800) at nodeHash.c:296 #10 0x0000000010306730 in MultiExecProcNode (node=0x100158f9800) at execProcnode.c:577 The issue is not deterministic and straightforwardly reproducible, sometimes after make clean, etc. queries run sometimes they hang up again. I wanted to bring this to your notice hoping you might be faster than me in picking up the exact reason behind this anomaly. -- Regards, Rafia Sabih EnterpriseDB: http://www.enterprisedb.com/
Commits
-
Add shared tuplestores.
- ab9e0e718acb 11.0 landed
-
Remove BufFile's isTemp flag.
- 11e264517dff 11.0 landed
-
Provide DSM segment to ExecXXXInitializeWorker functions.
- 7082e614c0dd 11.0 landed
-
Optimize joins when the inner relation can be proven unique.
- 9c7f5229ad68 10.0 cited
-
Fix failure to use clamp_row_est() for parallel joins.
- 1ea60ad602f9 10.0 cited
-
Document lack of validation when attaching foreign partitions.
- b54aad8e34bd 10.0 cited
-
Fix inclusions of c.h from .h files.
- a72f0365db41 10.0 landed
-
Fix inclusions of postgres_fe.h from .h files.
- 9722bb5757c5 10.0 landed
-
Bring plpgsql into line with header inclusion policy.
- 08da52859a1f 10.0 landed
-
Document intentional violations of header inclusion policy.
- d6b059ec740a 10.0 landed
-
Shut down Gather's children before shutting down Gather itself.
- acf555bc53ac 10.0 landed
-
btree: Support parallel index scans.
- 569174f1be92 10.0 cited
-
Add explicit ORDER BY to a few tests that exercise hash-join code.
- 7c5d8c16e12e 10.0 landed
-
Revise hash join code so that we can increase the number of batches
- 849074f9ae42 8.1.0 cited
-
Rewrite hash join to use simple linked lists instead of a
- 26069a58e8e4 7.1.1 cited