From 435babe4a44c73d094eeddb5e621ebd29a62aff8 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 15 Dec 2017 14:23:01 -0800 Subject: [PATCH] mds: reduce debugging level for balancer messages Fixes: http://tracker.ceph.com/issues/21853 Signed-off-by: Patrick Donnelly --- src/mds/MDBalancer.cc | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/mds/MDBalancer.cc b/src/mds/MDBalancer.cc index 8ece3e9612ac0..ac4e17e099513 100644 --- a/src/mds/MDBalancer.cc +++ b/src/mds/MDBalancer.cc @@ -70,7 +70,7 @@ int MDBalancer::proc_message(Message *m) break; default: - dout(0) << " balancer unknown message " << m->get_type() << dendl; + derr << " balancer unknown message " << m->get_type() << dendl_impl; assert(0 == "balancer unknown message"); } @@ -236,7 +236,7 @@ mds_load_t MDBalancer::get_load(utime_t now) if (cpu.is_open()) cpu >> load.cpu_load_avg; else - dout(0) << "input file " PROCPREFIX "'/proc/loadavg' not found" << dendl; + derr << "input file " PROCPREFIX "'/proc/loadavg' not found" << dendl_impl; dout(15) << "get_load " << load << dendl; return load; @@ -280,7 +280,7 @@ int MDBalancer::localize_balancer() } bal_code.assign(lua_src.to_str()); bal_version.assign(oid.name); - dout(0) << "localized balancer, bal_code=" << bal_code << dendl; + dout(10) << "localized balancer, bal_code=" << bal_code << dendl; } return r; } @@ -398,8 +398,6 @@ void MDBalancer::handle_heartbeat(MHeartbeat *m) } mds_import_map[ who ] = m->get_import_map(); - //dout(0) << " load is " << load << " have " << mds_load.size() << dendl; - { unsigned cluster_size = mds->get_mds_map()->get_num_in_mds(); if (mds_load.size() == cluster_size) { @@ -630,7 +628,7 @@ void MDBalancer::prep_rebalance(int beat) mds_meta_load[i] = l; if (whoami == 0) - dout(0) << " mds." << i + dout(5) << " mds." << i << " " << load << " = " << load.mds_load() << " ~ " << l << dendl; @@ -824,7 +822,7 @@ void MDBalancer::try_rebalance(balance_state_t& state) pop < g_conf->mds_bal_idle_threshold && im->inode != mds->mdcache->get_root() && im->inode->authority().first != mds->get_nodeid()) { - dout(0) << " exporting idle (" << pop << ") import " << *im + dout(5) << " exporting idle (" << pop << ") import " << *im << " back to mds." << im->inode->authority().first << dendl; mds->mdcache->migrator->export_dir_nicely(im, im->inode->authority().first); @@ -876,7 +874,7 @@ void MDBalancer::try_rebalance(balance_state_t& state) assert(dir->inode->authority().first == target); // cuz that's how i put it in the map, dummy if (pop <= amount-have) { - dout(0) << "reexporting " << *dir + dout(5) << "reexporting " << *dir << " pop " << pop << " back to mds." << target << dendl; mds->mdcache->migrator->export_dir_nicely(dir, target); @@ -905,7 +903,7 @@ void MDBalancer::try_rebalance(balance_state_t& state) double pop = (*import).first; if (pop < amount-have || pop < MIN_REEXPORT) { - dout(0) << "reexporting " << *imp + dout(5) << "reexporting " << *imp << " pop " << pop << " back to mds." << imp->inode->authority() << dendl; @@ -936,7 +934,7 @@ void MDBalancer::try_rebalance(balance_state_t& state) //fudge = amount - have; for (list::iterator it = exports.begin(); it != exports.end(); ++it) { - dout(0) << " - exporting " + dout(5) << " - exporting " << (*it)->pop_auth_subtree << " " << (*it)->pop_auth_subtree.meta_load(rebalance_time, mds->mdcache->decayrate) @@ -1154,7 +1152,7 @@ void MDBalancer::hit_dir(utime_t now, CDir *dir, int type, int who, double amoun rd_adj = rdp / mds->get_mds_map()->get_num_in_mds() - rdp; rd_adj /= 2.0; // temper somewhat - dout(0) << "replicating dir " << *dir << " pop " << dir_pop << " .. rdp " << rdp << " adj " << rd_adj << dendl; + dout(5) << "replicating dir " << *dir << " pop " << dir_pop << " .. rdp " << rdp << " adj " << rd_adj << dendl; dir->dir_rep = CDir::REP_ALL; mds->mdcache->send_dir_updates(dir, true); @@ -1168,7 +1166,7 @@ void MDBalancer::hit_dir(utime_t now, CDir *dir, int type, int who, double amoun dir->is_rep() && dir_pop < g_conf->mds_bal_unreplicate_threshold) { // unreplicate - dout(0) << "unreplicating dir " << *dir << " pop " << dir_pop << dendl; + dout(5) << "unreplicating dir " << *dir << " pop " << dir_pop << dendl; dir->dir_rep = CDir::REP_NONE; mds->mdcache->send_dir_updates(dir); -- 2.39.5