On aarch64, when set pagesize to 64K, the memory is over used and
the cache memory always be over evicted. It is caused by BlueStore
ExtentMap which need to reserve 256B(the config option is
bluestore_extent_map_inline_shard_prealloc_size). When bufferlist
using page aligned way to prealloc small size memory from tcmalloc,
tcmalloc will allocate a page and can not reuse the unused memory
in this page. The more bluestore_onode items in meta cache, there
are more wasted memory in an OSD daemon.
Signed-off-by: luo rixin <luorixin@huawei.com>
void buffer::list::reserve(size_t prealloc)
{
if (get_append_buffer_unused_tail_length() < prealloc) {
- auto ptr = ptr_node::create(buffer::create_page_aligned(prealloc));
+ auto ptr = ptr_node::create(buffer::create_small_page_aligned(prealloc));
ptr->set_length(0); // unused, so far.
_carriage = ptr.get();
_buffers.push_back(*ptr.release());