Re: [PoC] Improve dead tuple storage for lazy vacuum
Masahiko Sawada <sawada.mshk@gmail.com>
Attachments
- v10-0003-tool-for-measuring-radix-tree-performance.patch (application/octet-stream) patch v10-0003
- v10-0004-Use-rt_node_ptr-to-reference-radix-tree-nodes.patch (application/octet-stream) patch v10-0004
- v10-0005-PoC-tag-the-node-kind-to-rt_pointer.patch (application/octet-stream) patch v10-0005
- v10-0007-PoC-lazy-vacuum-integration.patch (application/octet-stream) patch v10-0007
- v10-0006-PoC-DSA-support-for-radix-tree.patch (application/octet-stream) patch v10-0006
- v10-0002-Add-radix-implementation.patch (application/octet-stream) patch v10-0002
- v10-0001-introduce-vector8_min-and-vector8_highbit_mask.patch (application/octet-stream) patch v10-0001
On Mon, Nov 21, 2022 at 3:43 PM John Naylor <john.naylor@enterprisedb.com> wrote: > > On Fri, Nov 18, 2022 at 8:20 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > > > On Thu, Nov 17, 2022 at 12:24 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > > > > > On Wed, Nov 16, 2022 at 4:39 PM John Naylor > > > <john.naylor@enterprisedb.com> wrote: > > > > > That means my idea for the pointer struct might have some problems, at least as currently implemented. Maybe in the course of separating out and polishing that piece, an inefficiency will fall out. Or, it might be another reason to template local and shared separately. Not sure yet. I also haven't tried to adjust this test for the shared memory case. > > Digging a bit deeper, I see a flaw in my benchmark: Even though the total distribution of node kinds is decently even, the pattern that the benchmark sees is not terribly random: > > 3,343,352 branch-misses:u # 0.85% of all branches > 393,204,959 branches:u > > Recall a previous benchmark [1] where the leaf node was about half node16 and half node32. Randomizing the leaf node between the two caused branch misses to go from 1% to 2%, causing a noticeable slowdown. Maybe in this new benchmark, each level has a skewed distribution of nodes, giving a smart branch predictor something to work with. We will need a way to efficiently generate keys that lead to a relatively unpredictable distribution of node kinds, as seen by a searcher. Especially in the leaves (or just above the leaves), since those are less likely to be cached. > > > > I'll also run the test on my environment and do the investigation tomorrow. > > > > > > > FYI I've not tested the patch you shared today but here are the > > benchmark results I did with the v9 patch in my environment (I used > > the second filter). I splitted 0004 patch into two patches: a patch > > for pure refactoring patch to introduce rt_node_ptr and a patch to do > > pointer tagging. > > Would you be able to share the refactoring patch? And a fix for the failing tests? I'm thinking I want to try the templating approach fairly soon. > Sure. I've attached the v10 patches. 0004 is the pure refactoring patch and 0005 patch introduces the pointer tagging. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
Commits
-
radixtree: Fix SIGSEGV at update of embeddable value to non-embeddable.
- bb7f195ff788 17.0 landed
-
Get rid of anonymous struct
- bf183f168c44 17.0 landed
-
Teach radix tree to embed values at runtime
- 0fe5f64367bc 17.0 landed
-
Teach TID store to skip bitmap for small numbers of offsets
- f35bd9bf359d 17.0 landed
-
Use bump context for TID bitmaps stored by vacuum
- 8a1b31e6e596 17.0 landed
-
Fix alignment of stack variable
- 0ea51bac3802 17.0 landed
-
Use TidStore for dead tuple TIDs storage during lazy vacuum.
- 667e65aac354 17.0 landed
-
Rethink create and attach APIs of shared TidStore.
- 2d8f56dabbfd 17.0 landed
-
Fix inconsistent function prototypes with function definitions.
- a0e22ef9114b 17.0 landed
-
Fix a calculation in TidStoreCreate().
- 4edb37e322a6 17.0 landed
-
Fix potential integer handling issue in radixtree.h.
- 80d5d4937c16 17.0 landed
-
Add TIDStore, to store sets of TIDs (ItemPointerData) efficiently.
- 30e144287a72 17.0 landed
-
Fix link error for test_radixtree module on Windows
- ab6ae6260372 17.0 landed
- 9552e3ace317 17.0 landed
-
Blind attempt to fix ODR violations
- 1f1d73a8b83f 17.0 landed
-
Fix incorrect format specifier for int64
- e444ebcb85c0 17.0 landed
-
Fix redefinition of typedefs
- ac234e6377dd 17.0 landed
-
Add template for adaptive radix tree
- ee1b30f128d8 17.0 landed
-
Fix signedness error in 9f225e992 for gcc
- de7c6fe8347a 17.0 landed
-
Introduce helper SIMD functions for small byte arrays
- 9f225e992bed 17.0 landed
-
Optimize vacuuming of relations with no indexes.
- c120550edb86 17.0 cited
-
Add bound check before bsearch() for performance
- bbaf315309ed 14.0 cited
-
Allocate consecutive blocks during parallel seqscans
- 56788d2156fc 14.0 cited