os/bluestore: add BtreeAllocator#41828
Conversation
3e92640 to
03f973b
Compare
7fa5d4d to
05a0b3a
Compare
a99f9bd to
8877a2c
Compare
|
per the
this is much lower than that of AVL tree, where each node contains a single extent, and it takes 80 bytes. please note, each value (extent) only uses 16 bytes for a |
19465bc to
03a396a
Compare
|
aa66020 to
13195a1
Compare
|
|
jenkins test make check |
13195a1 to
3b154df
Compare
|
jenkins test make check |
|
I added a memory tracking to aging test: aclamk@0a2279e Summary:
btree really looks impressive, Kefu @tchaikov ! I guess it really should add btree to mempool accounting. |
aclamk
left a comment
There was a problem hiding this comment.
Excellent reduction of used memory!
Must move btree to mempool::bluestore_alloc.
3b154df to
2d3eaac
Compare
|
@aclamk Adam, thank you for profiling the BtreeAllocator! i reformatted the test result in your comment as a table. hope it's fine by you =) the btree block / node is more of an implementation details which are not exposed as part of its public interface. so i thought it'd be difficult to inject the could you take another look? |
2d3eaac to
88ce819
Compare
|
@aclamk i reran the aging test with your patch and updated the table in your comment. |
|
rebased against master. |
|
jenkins test make check |
1 similar comment
|
jenkins test make check |
|
@aclamk hi Adam, is there anything else i can do to improve this changeset? |
aclamk
left a comment
There was a problem hiding this comment.
This is good work.
In my opinion btree allocator should replace avl in any case.
There should be done some work on replacing avl->btree for 'hybrid' strategy. If so, new thresholds for switching from interval to bitmap mode must be calculated.
|
@aclamk yeah, will port the hybrid strategy to btree allocator later on. |
BtreeAllocator was added in the commit ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use Btree mode. Signed-off-by: tan changzhi <544463199@qq.com>
BtreeAllocator was added in the commit ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use Btree mode. Fixes: https://tracker.ceph.com/issues/65678 Signed-off-by: tan changzhi <544463199@qq.com>
BtreeAllocator was added in the commit ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use Btree mode. Fixes: https://tracker.ceph.com/issues/65678 Signed-off-by: tan changzhi <544463199@qq.com>
BtreeAllocator was added in the commit ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use btree mode. Fixes: https://tracker.ceph.com/issues/65678 Signed-off-by: tan changzhi <544463199@qq.com>
BtreeAllocator was added in the commit ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use btree mode. Fixes: https://tracker.ceph.com/issues/65678 Signed-off-by: tan changzhi <544463199@qq.com>
BtreeAllocator was added in the commit ceph/ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use btree mode. Fixes: https://tracker.ceph.com/issues/65678 Signed-off-by: tan changzhi <544463199@qq.com>
BtreeAllocator was added in the commit ceph/ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use btree mode. Fixes: https://tracker.ceph.com/issues/65678 Signed-off-by: tan changzhi <544463199@qq.com>
BtreeAllocator was added in the commit ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use btree mode. Fixes: https://tracker.ceph.com/issues/65678 Signed-off-by: tan changzhi <544463199@qq.com> (cherry picked from commit 8d47912)
BtreeAllocator was added in the commit ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use btree mode. Fixes: https://tracker.ceph.com/issues/65678 Signed-off-by: tan changzhi <544463199@qq.com> (cherry picked from commit 8d47912)
BtreeAllocator was added in the commit ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use btree mode. Fixes: https://tracker.ceph.com/issues/65678 Signed-off-by: tan changzhi <544463199@qq.com> (cherry picked from commit 8d47912)
BtreeAllocator was added in the commit ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use btree mode. Fixes: https://tracker.ceph.com/issues/65678 Signed-off-by: tan changzhi <544463199@qq.com> (cherry picked from commit 8d47912)
BtreeAllocator was added in the commit ceph#41828. Its performance has advantages in some scenarios, but we cannot configure to use btree mode. Fixes: https://tracker.ceph.com/issues/65678 Signed-off-by: tan changzhi <544463199@qq.com> (cherry picked from commit 8d47912)
because each AVL tree node needs to keep track of its children, the
overhead of each extent in AvlAllocator is relatively higher than that
of bitmap allocator, per node sizes 80 bytes, per mempool stats provided
by unittest_alloc_bench. while btree has lower overhead, as it keeps multiple
entries in each node / block, the node size of abseil's btree implementation
defaults to 256, so each node is able to contain up to 256 values. this means
we have lower overhead than the binary-trees like AVL and red-black tree.
but because the overhead of the rebalance of the btree is higher than that of
binary tree, its takes more CPU cycles when performing alloc-release
than its AVL version. but its upside is that its memory layout is
more compact, under some use case, it might be a better alternative
than AvlAllocator.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox