From 460016428cf27484c333227f534c2e2f73a37fb1 Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Sat, 15 Oct 2016 10:49:19 +0530 Subject: cluster/tier: handle fast demotions Demote files on priority if hi-watermark has been breached and continue to demote until the watermark drops below hi-watermark. Monitor watermark more frequently. Trigger demotion as soon as hi-watermark is breached. Add cluster.tier-emergency-demote-query-limit option to limit number of files returned from the database query for every iteration of tier_migrate_using_query_file(). If watermark hasn't dropped below hi-watermark during the first iteration, the next iteration will be triggered approximately 1 second after tier_demote() returns to the main tiering loop. Update changetimerecorder xlator to handle query for emergency demote mode. Add tier-ctr-interface.h: Move tier and ctr interface specific macros and struct definition from libglusterfs/src/gfdb/gfdb_data_store.h to new header libglusterfs/src/tier-ctr-interface.h Change-Id: If56af78c6c81d37529b9b6e65ae606ba5c99a811 BUG: 1366648 Signed-off-by: Milind Changire Reviewed-on: http://review.gluster.org/15158 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Dan Lambright --- xlators/cluster/dht/src/tier.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/tier.h') diff --git a/xlators/cluster/dht/src/tier.h b/xlators/cluster/dht/src/tier.h index ffb04173bd5..764860e6884 100644 --- a/xlators/cluster/dht/src/tier.h +++ b/xlators/cluster/dht/src/tier.h @@ -98,7 +98,7 @@ typedef enum tier_watermark_op_ { #define DEFAULT_DEMOTE_FREQ_SEC 120 #define DEFAULT_HOT_COMPACT_FREQ_SEC 604800 #define DEFAULT_COLD_COMPACT_FREQ_SEC 604800 -#define DEFAULT_DEMOTE_DEGRADED 10 +#define DEFAULT_DEMOTE_DEGRADED 1 #define DEFAULT_WRITE_FREQ_SEC 0 #define DEFAULT_READ_FREQ_SEC 0 #define DEFAULT_WM_LOW 75 @@ -107,5 +107,6 @@ typedef enum tier_watermark_op_ { #define DEFAULT_COMP_MODE _gf_true #define DEFAULT_TIER_MAX_MIGRATE_MB 1000 #define DEFAULT_TIER_MAX_MIGRATE_FILES 5000 +#define DEFAULT_TIER_QUERY_LIMIT 100 #endif -- cgit