On Sat, Nov 25, 2017 at 10:47 PM, Andres Freund <and...@citusdata.com> wrote:
> diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h > > index 869c59dc85..2dc59e89cd 100644 > > --- a/src/include/utils/memutils.h > > +++ b/src/include/utils/memutils.h > > @@ -189,7 +189,7 @@ extern MemoryContext SlabContextCreate(MemoryContext > parent, > > * Few callers should be interested in this, but tuplesort/tuplestore > need > > * to know it. > > */ > > -#define ALLOCSET_SEPARATE_THRESHOLD 8192 > > +#define ALLOCSET_SEPARATE_THRESHOLD 16384 > > Huh, what's that about in this context? > There is following static assert: StaticAssertStmt(ALLOC_CHUNK_LIMIT == ALLOCSET_SEPARATE_THRESHOLD, ...) and ALLOCK_CHUNK_LIMIT is defined as: #define ALLOC_CHUNK_LIMIT (1 << (ALLOCSET_NUM_FREELISTS-1+ALLOC_MINBITS)) and there is this comment: "CAUTION: ALLOC_MINBITS must be large enough so that 1<<ALLOC_MINBITS is at least MAXALIGN, ..." So I increased ALLOC_MINBITS which resulted in doubling ALLOCSET_SEPARATE_THRESHOLD. Thanks, -- Hadi