Why direct memory = sizeBytes *(numMergeBuffers + numThreads + 1)?

Hi :
I didn’t know why in Druid Historycal Node direct memory needed by Druid is at least druid.processing.buffer.sizeBytes * (druid.processing.numMergeBuffers + druid.processing.numThreads + 1).

i think direct memory = druid.processing.buffer.sizeBytes * druid.processing.numMergeBuffers

Every processing thread is allocated an offheap buffer of size druid.processing.buffer.sizeBytes

And to complete the story: the +1 is a “fuzzy” addition to account for non-processing-buffer, non-merge-buffer related direct memory usage. Direct memory is used for some other odds and ends outside of those buffers, and the +1 is meant to help account for that.