Re: Parallel bitmap heap scan
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-11-30T05:38:55Z
Lists: pgsql-hackers
Attachments
- hash_support_alloc_free_v1.patch (application/octet-stream) patch v1
- parallel-bitmap-heap-scan-v3.patch (application/octet-stream) patch v3
- analyze.tar.gz (application/x-gzip)
On Fri, Nov 25, 2016 at 6:55 PM, Dilip Kumar <dilipbalaut@gmail.com> wrote: > I have changed the design to directly make it based on DSA instead of using DHT. > In new version we no longer use DHT. Instead, of that I have made some > change in simplehash[1], so that it can allow external allocator. In > tidbitmap.c, I have register the allocator to simplehash and those > allocator functions will allocate memory directly from DSA. > > simplehash is always using one single memory (during expand it copy > from old memory to new memory). Which makes remaining processing very > simple for us. > > In tbm_begin_iterate, we need not to scan complete hash table instead > of that we can just process dsa memory and convert into page array and > chunk array. > > I have tested the performance in my local machine and I observed that > it's slightly better than older > DHT based version (complete performance number will be published soon). > > Dependency on other patches: > 1. dsa_area (dsa-v7.patch) > https://www.postgresql.org/message-id/CAEepm%3D024p-MeAsDmG%3DR3%2BtR4EGhuGJs_%2BrjFKF0eRoSTmMJnA%40mail.gmail.com > > 2. Creating a DSA area to provide work space for parallel execution > (dsa-area-for-executor-v3.patch) > https://www.postgresql.org/message-id/CAEepm%3D0HmRefi1%2BxDJ99Gj5APHr8Qr05KZtAxrMj8b%2Bay3o6sA%40mail.gmail.com > > patch details > 1. hash_support_alloc_free_v1.patch [1]. > 2. parallel-bitmap-heap-scan-v3.patch I just realised that, my latest patch I just sent to Andres, instead of replying to all. Forwarding the same mail to Hackers. Performance reading with new patch.. TPCH-scale factor 10. work_mem 20MB, Power 4 socket machine Query Head Patch Improvement Q4 4811 3290 1.5x Q6 13136 6198 2.1x Q14 8119 5057 1.6x Q15 25652 20143 1.2x Explained analyzed results are attached with the mail.. * I have also applied Andres patch from below link, for taking this performance (both for head and for patch). https://www.postgresql.org/message-id/20161123083351.5vramz52nmdokhzz%40alap3.anarazel.de -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com
Commits
-
Pass DSA_ALLOC_HUGE when allocating a shared TIDBitmap.
- a171f01501e1 10.0 landed
-
Support parallel bitmap heap scans.
- f35742ccb7aa 10.0 landed
-
tidbitmap: Support shared iteration.
- 98e6e89040a0 10.0 landed
-
Shut down Gather's children before shutting down Gather itself.
- acf555bc53ac 10.0 landed
-
Revise the way the element allocator for a simplehash is specified.
- c3c4f6e1740b 10.0 cited
-
Refactor bitmap heap scan estimation of heap pages fetched.
- da08a6598973 10.0 landed
-
Use more efficient hashtable for tidbitmap.c to speed up bitmap scans.
- 75ae538bc316 10.0 cited