Articles in this section

What is the estimated overhead for Jemalloc?

Detail

What is the estimated overhead for Jemalloc?

Answer

Jemalloc can allocate to the nearest power of 2.

The rough estimate can be done with following formula to calculate nearest power of two:
 
log2(x) = log(x) / log(2)

Or from Mac Spotlight Search box:
 
ceil(log(x)/log(2))

Then we can use above calculation to get the estimated heap usage with overhead:
 
Estimated Heap Usage = 2^(x)


Example:
In version 6.x with storage in memory only we have a data in the heap. The estimated  JeMalloc usage for a 150KB object to the Nearest Power of 2:
ceil(log(150*1024)/log(2)) = 18

Estimated Heap Usage for that object:  2^18 = 262KB


 

Notes

In 7.x the storage engine memory configuration usage Shared Memory and no longer uses Jemalloc.

Additional reference on Jemalloc:

https://jemalloc.net/jemalloc.3.html#size_classes

Applies To Earliest Version

4.9

Applies To Latest Version

6.0
Was this article helpful?
0 out of 0 found this helpful