rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

How to alloc all memory from Huge Page

Open 979357361 opened this issue 1 year ago • 2 comments

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

979357361 avatar Dec 28 '23 10:12 979357361

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.

ajkr avatar Dec 28 '23 16:12 ajkr

memtable_huge_page_size in the unit of KB?

Its unit is bytes

ajkr avatar Dec 28 '23 16:12 ajkr