mirror of
https://github.com/ceph/ceph
synced 2025-01-02 17:12:31 +00:00
rgw: add configure_bucket_trim()
Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
parent
7be4eab8a3
commit
d29f96ae3e
@ -5010,6 +5010,18 @@ std::vector<Option> get_rgw_options() {
|
||||
.set_default(1200)
|
||||
.set_description(""),
|
||||
|
||||
Option("rgw_sync_log_trim_max_buckets", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
.set_default(16)
|
||||
.set_description("Maximum number of buckets to trim per interval"),
|
||||
|
||||
Option("rgw_sync_log_trim_min_cold_buckets", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
.set_default(4)
|
||||
.set_description("Minimum number of cold buckets to trim per interval"),
|
||||
|
||||
Option("rgw_sync_log_trim_concurrent_buckets", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
.set_default(4)
|
||||
.set_description("Maximum number of buckets to trim in parallel"),
|
||||
|
||||
Option("rgw_sync_data_inject_err_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
|
||||
.set_default(0)
|
||||
.set_description(""),
|
||||
|
@ -737,6 +737,25 @@ class RecentEventList {
|
||||
|
||||
namespace rgw {
|
||||
|
||||
// read bucket trim configuration from ceph context
|
||||
void configure_bucket_trim(CephContext *cct, BucketTrimConfig& config)
|
||||
{
|
||||
auto conf = cct->_conf;
|
||||
|
||||
config.trim_interval_sec =
|
||||
conf->get_val<int64_t>("rgw_sync_log_trim_interval");
|
||||
config.counter_size = 512;
|
||||
config.buckets_per_interval =
|
||||
conf->get_val<int64_t>("rgw_sync_log_trim_max_buckets");
|
||||
config.min_cold_buckets_per_interval =
|
||||
conf->get_val<int64_t>("rgw_sync_log_trim_min_cold_buckets");
|
||||
config.concurrent_buckets =
|
||||
conf->get_val<int64_t>("rgw_sync_log_trim_concurrent_buckets");
|
||||
config.notify_timeout_ms = 10;
|
||||
config.recent_size = 128;
|
||||
config.recent_duration = std::chrono::hours(2);
|
||||
}
|
||||
|
||||
class BucketTrimManager::Impl : public TrimCounters::Server,
|
||||
public BucketTrimObserver {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user