Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions qa/objectstore/bluestore-avl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
overrides:
thrashosds:
bdev_inject_crash: 2
bdev_inject_crash_probability: .5
ceph:
fs: xfs
conf:
osd:
osd objectstore: bluestore
bluestore block size: 96636764160
debug bluestore: 20
debug bluefs: 20
debug rocksdb: 10
bluestore fsck on mount: true
bluestore allocator: avl
bluefs allocator: avl
# lower the full ratios since we can fill up a 100gb osd so quickly
mon osd full ratio: .9
mon osd backfillfull_ratio: .85
mon osd nearfull ratio: .8
osd failsafe full ratio: .95
# this doesn't work with failures bc the log writes are not atomic across the two backends
# bluestore bluefs env mirror: true
ceph-deploy:
fs: xfs
bluestore: yes
conf:
osd:
osd objectstore: bluestore
bluestore block size: 96636764160
debug bluestore: 20
debug bluefs: 20
debug rocksdb: 10
bluestore fsck on mount: true
# lower the full ratios since we can fill up a 100gb osd so quickly
mon osd full ratio: .9
mon osd backfillfull_ratio: .85
mon osd nearfull ratio: .8
osd failsafe full ratio: .95

10 changes: 9 additions & 1 deletion src/common/options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3747,7 +3747,7 @@ std::vector<Option> get_global_options() {

Option("bluestore_allocator", Option::TYPE_STR, Option::LEVEL_ADVANCED)
.set_default("stupid")
.set_enum_allowed({"bitmap", "stupid"})
.set_enum_allowed({"bitmap", "stupid", "avl"})
.set_description("Allocator policy"),

Option("bluestore_freelist_blocks_per_key", Option::TYPE_INT, Option::LEVEL_DEV)
Expand Down Expand Up @@ -3926,6 +3926,14 @@ std::vector<Option> get_global_options() {
.set_default(0)
.set_description(""),

Option("bluestore_avl_alloc_bf_threshold", Option::TYPE_UINT, Option::LEVEL_DEV)
.set_default(131072)
.set_description(""),

Option("bluestore_avl_alloc_bf_free_pct", Option::TYPE_UINT, Option::LEVEL_DEV)
.set_default(4)
.set_description(""),

// -----------------------------------------
// kstore

Expand Down
2 changes: 2 additions & 0 deletions src/os/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ if(WITH_BLUESTORE)
bluestore/StupidAllocator.cc
bluestore/BitMapAllocator.cc
bluestore/BitAllocator.cc
bluestore/avl.c
bluestore/AvlAllocator.cc
)
endif(WITH_BLUESTORE)

Expand Down
3 changes: 3 additions & 0 deletions src/os/bluestore/Allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "Allocator.h"
#include "StupidAllocator.h"
#include "BitMapAllocator.h"
#include "AvlAllocator.h"
#include "common/debug.h"

#define dout_subsys ceph_subsys_bluestore
Expand All @@ -15,6 +16,8 @@ Allocator *Allocator::create(CephContext* cct, string type,
return new StupidAllocator(cct);
} else if (type == "bitmap") {
return new BitMapAllocator(cct, size, block_size);
} else if (type == "avl") {
return new AvlAllocator(cct, size);
}
lderr(cct) << "Allocator::" << __func__ << " unknown alloc type "
<< type << dendl;
Expand Down
Loading