rocksdb
rocksdb copied to clipboard
How to alloc all memory from Huge Page
Expected behavior
alloc all memory from linux hugepage,include block cache, meta blocks, memtables.....
Actual behavior
only memtable support huge page, BTW, is option memtable_huge_page_size in the unit of KB?
Steps to reproduce the behavior
Memtable's allocation pattern has the advantage that it frees all its memory at once. So it uses arena allocator, which makes large allocations that can leverage huge pages.
Block cache's pattern is different. Typical allocation sizes in block cache are like 4KB. They are freed in no predetermined order (LRU). Allocating a huge page for a 4KB allocation wouldn't make much sense, so we don't do it.
memtable_huge_page_size in the unit of KB?
Its unit is bytes