mirror of
https://github.com/ceph/ceph
synced 2025-01-04 02:02:36 +00:00
Merge pull request #46310 from cyx1231st/wip-seastore-tune-cleaner
crimson/os/seastore: increase journal size and decrease rewrite-dirty size Reviewed-by: Samuel Just <sjust@redhat.com> Reviewed-by: Xuehan Xu <xxhdx1985126@gmail.com>
This commit is contained in:
commit
449a1e1d01
@ -509,6 +509,20 @@ public:
|
||||
}
|
||||
|
||||
static config_t get_default() {
|
||||
return config_t{
|
||||
12, // target_journal_segments
|
||||
16, // max_journal_segments
|
||||
.9, // available_ratio_gc_max
|
||||
.2, // available_ratio_hard_limit
|
||||
.8, // reclaim_ratio_hard_limit
|
||||
.6, // reclaim_ratio_gc_threshold
|
||||
1<<20,// reclaim_bytes_per_cycle
|
||||
1<<17,// rewrite_dirty_bytes_per_cycle
|
||||
1<<24 // rewrite_backref_bytes_per_cycle
|
||||
};
|
||||
}
|
||||
|
||||
static config_t get_test() {
|
||||
return config_t{
|
||||
2, // target_journal_segments
|
||||
4, // max_journal_segments
|
||||
@ -517,7 +531,7 @@ public:
|
||||
.8, // reclaim_ratio_hard_limit
|
||||
.6, // reclaim_ratio_gc_threshold
|
||||
1<<20,// reclaim_bytes_per_cycle
|
||||
1<<20,// rewrite_dirty_bytes_per_cycle
|
||||
1<<17,// rewrite_dirty_bytes_per_cycle
|
||||
1<<24 // rewrite_backref_bytes_per_cycle
|
||||
};
|
||||
}
|
||||
|
@ -644,12 +644,23 @@ TransactionManagerRef make_transaction_manager(tm_make_config_t config)
|
||||
auto lba_manager = lba_manager::create_lba_manager(*cache);
|
||||
auto sms = std::make_unique<SegmentManagerGroup>();
|
||||
auto backref_manager = create_backref_manager(*sms, *cache);
|
||||
|
||||
bool cleaner_is_detailed;
|
||||
SegmentCleaner::config_t cleaner_config;
|
||||
if (config.is_test) {
|
||||
cleaner_is_detailed = true;
|
||||
cleaner_config = SegmentCleaner::config_t::get_test();
|
||||
} else {
|
||||
cleaner_is_detailed = false;
|
||||
cleaner_config = SegmentCleaner::config_t::get_default();
|
||||
}
|
||||
auto segment_cleaner = std::make_unique<SegmentCleaner>(
|
||||
SegmentCleaner::config_t::get_default(),
|
||||
cleaner_config,
|
||||
std::move(sms),
|
||||
*backref_manager,
|
||||
*cache,
|
||||
config.detailed);
|
||||
cleaner_is_detailed);
|
||||
|
||||
JournalRef journal;
|
||||
if (config.j_type == journal_type_t::SEGMENT_JOURNAL) {
|
||||
journal = journal::make_segmented(*segment_cleaner);
|
||||
|
@ -35,7 +35,7 @@ namespace crimson::os::seastore {
|
||||
class Journal;
|
||||
|
||||
struct tm_make_config_t {
|
||||
bool detailed = true;
|
||||
bool is_test = true;
|
||||
journal_type_t j_type = journal_type_t::SEGMENT_JOURNAL;
|
||||
placement_hint_t default_placement_hint = placement_hint_t::HOT;
|
||||
|
||||
@ -65,10 +65,10 @@ struct tm_make_config_t {
|
||||
tm_make_config_t &operator=(const tm_make_config_t &) = default;
|
||||
private:
|
||||
tm_make_config_t(
|
||||
bool detailed,
|
||||
bool is_test,
|
||||
journal_type_t j_type,
|
||||
placement_hint_t default_placement_hint)
|
||||
: detailed(detailed), j_type(j_type),
|
||||
: is_test(is_test), j_type(j_type),
|
||||
default_placement_hint(default_placement_hint)
|
||||
{}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user