From 0488cd5683f81eb49636cab59a6a43951e057013 Mon Sep 17 00:00:00 2001 From: Joseph Fernandes Date: Wed, 20 Jan 2016 22:27:33 +0530 Subject: tier/dht : Default value for demote-freq, max files and mb Default value for tier-demote-frequency is 3600 sec to avoid frequent demotions. Default value for tier-max-mb is 4000 mb Default value for tier-max-files is 10000 files Backport of http://review.gluster.org/13270 > Change-Id: Ie60951c478a7462c425059699ab82511aa13fa0a > BUG: 1300412 > Signed-off-by: Joseph Fernandes > Reviewed-on: http://review.gluster.org/13270 > Smoke: Gluster Build System > Tested-by: Dan Lambright > NetBSD-regression: NetBSD Build System > CentOS-regression: Gluster Build System > Reviewed-by: Dan Lambright Signed-off-by: Joseph Fernandes Change-Id: Ic4458b1b78dc3c6059713f3871e9e2dc8f38b39a BUG: 1306302 Reviewed-on: http://review.gluster.org/13424 Smoke: Gluster Build System Reviewed-by: Joseph Fernandes Tested-by: Joseph Fernandes NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Dan Lambright --- xlators/cluster/dht/src/dht-shared.c | 6 +++--- xlators/cluster/dht/src/tier.c | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'xlators/cluster') diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c index 9d869e39f0e..84f86bd10de 100644 --- a/xlators/cluster/dht/src/dht-shared.c +++ b/xlators/cluster/dht/src/dht-shared.c @@ -1008,7 +1008,7 @@ struct volume_options options[] = { { .key = {"tier-demote-frequency"}, .type = GF_OPTION_TYPE_INT, - .default_value = "120", + .default_value = "3600", .description = "Frequency to demote files to slow tier" }, @@ -1035,11 +1035,11 @@ struct volume_options options[] = { }, { .key = {"tier-max-mb"}, .type = GF_OPTION_TYPE_INT, - .default_value = "1000", + .default_value = "4000", }, { .key = {"tier-max-files"}, .type = GF_OPTION_TYPE_INT, - .default_value = "5000", + .default_value = "10000", }, /* switch option */ { .key = {"pattern.switch.case"}, diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index 63419d79db8..67ee1adc12a 100644 --- a/xlators/cluster/dht/src/tier.c +++ b/xlators/cluster/dht/src/tier.c @@ -1801,7 +1801,7 @@ tier_init (xlator_t *this) freq = DEFAULT_TIER_MAX_MIGRATE_MB; } - defrag->tier_conf.max_migrate_bytes = freq * 1024 * 1024; + defrag->tier_conf.max_migrate_bytes = (uint64_t) freq * 1024 * 1024; ret = dict_get_int32 (this->options, "tier-max-files", &freq); @@ -1978,7 +1978,8 @@ tier_reconfigure (xlator_t *this, dict_t *options) GF_OPTION_RECONF ("tier-max-mb", migrate_mb, options, int32, out); - defrag->tier_conf.max_migrate_bytes = migrate_mb*1024*1024; + defrag->tier_conf.max_migrate_bytes = (uint64_t) migrate_mb * + 1024 * 1024; GF_OPTION_RECONF ("tier-max-files", defrag->tier_conf.max_migrate_files, options, -- cgit