Re: [HACKERS] HASH_CHUNK_SIZE vs malloc rounding

2017-01-04 Thread Thomas Munro
On Tue, Nov 29, 2016 at 6:27 AM, Tom Lane wrote: > Thomas Munro writes: >> I bet other allocators also do badly with "32KB plus a smidgen". To >> minimise overhead we'd probably need to try to arrange for exactly >> 32KB (or some other power of

Re: [HACKERS] HASH_CHUNK_SIZE vs malloc rounding

2016-11-28 Thread Tom Lane
Thomas Munro writes: > I bet other allocators also do badly with "32KB plus a smidgen". To > minimise overhead we'd probably need to try to arrange for exactly > 32KB (or some other power of 2 or at least factor of common page/chunk > size?) to arrive into malloc,

[HACKERS] HASH_CHUNK_SIZE vs malloc rounding

2016-11-27 Thread Thomas Munro
Hi hackers, HASH_CHUNK_SIZE is defined as 1024 * 32 = 0x8000. The size of the chunks that nodeHash.c passes to palloc is that + offsetof(HashJoinMemoryChunkData, data), which is 0x20 here. So we ask aset.c for 0x8020 bytes. Sizes in that range are sent directly to malloc, after adding