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/tier.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlators/cluster/dht/src/tier.c') 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