Description
HybridHashTableContainer will allocate memory based on estimate, which means if the actual is less than the estimate the allocated memory won't be used.
Number of partitions is calculated based on estimated data size
numPartitions = calcNumPartitions(memoryThreshold, estimatedTableSize, minNumParts, minWbSize, nwayConf);
Then based on number of partitions writeBufferSize is set
writeBufferSize = (int)(estimatedTableSize / numPartitions);
Each hash partition will allocate 1 WriteBuffer, with no further allocation if the estimate data size is correct.
Suggested solution is to reduce writeBufferSize by a factor such that only X% of the memory is preallocated.