From: David Zafman Date: Sat, 14 Dec 2019 01:43:44 +0000 (-0800) Subject: mgr: Change default upmap_max_deviation to 5 X-Git-Tag: v15.1.0~303^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0a1b758d012dfea40db3feca1a841c96f79defe;p=ceph.git mgr: Change default upmap_max_deviation to 5 Fixes: https://tracker.ceph.com/issues/43312 Signed-off-by: David Zafman --- diff --git a/doc/man/8/osdmaptool.rst b/doc/man/8/osdmaptool.rst index cfe52f63f6df..81a962a0050a 100644 --- a/doc/man/8/osdmaptool.rst +++ b/doc/man/8/osdmaptool.rst @@ -153,7 +153,7 @@ Options .. option:: --upmap-deviation - max deviation from target [default: 1] + max deviation from target [default: 5] .. option:: --upmap-pool diff --git a/doc/rados/operations/upmap.rst b/doc/rados/operations/upmap.rst index 3fe65ea8d6f3..8bad0d959285 100644 --- a/doc/rados/operations/upmap.rst +++ b/doc/rados/operations/upmap.rst @@ -58,7 +58,7 @@ Upmap entries are updated with an offline optimizer built into ``osdmaptool``. If it cannot find any additional changes to make it will stop early (i.e., when the pool distribution is perfect). - The ``max-deviation`` value defaults to `1`. If an OSD PG count + The ``max-deviation`` value defaults to `5`. If an OSD PG count varies from the computed target number by less than or equal to this amount it will be considered perfect. diff --git a/qa/standalone/mgr/balancer.sh b/qa/standalone/mgr/balancer.sh index ce38dd137542..984b6504ba00 100755 --- a/qa/standalone/mgr/balancer.sh +++ b/qa/standalone/mgr/balancer.sh @@ -141,6 +141,7 @@ function TEST_balancer2() { done ceph osd set-require-min-compat-client luminous + ceph config set mgr mgr/balancer/upmap_max_deviation 1 ceph balancer mode upmap || return 1 ceph balancer on || return 1 ceph config set mgr mgr/balancer/sleep_interval 5 diff --git a/src/pybind/mgr/balancer/module.py b/src/pybind/mgr/balancer/module.py index 2290aa0fe049..bbee82ee6a4e 100644 --- a/src/pybind/mgr/balancer/module.py +++ b/src/pybind/mgr/balancer/module.py @@ -313,7 +313,7 @@ class Module(MgrModule): { 'name': 'upmap_max_deviation', 'type': 'int', - 'default': 1, + 'default': 5, 'min': 1, 'desc': 'deviation below which no optimization is attempted', 'long_desc': 'If the number of PGs are within this count then no optimization is attempted', diff --git a/src/test/cli/osdmaptool/help.t b/src/test/cli/osdmaptool/help.t index 09b1d785518d..136d3b05e89a 100644 --- a/src/test/cli/osdmaptool/help.t +++ b/src/test/cli/osdmaptool/help.t @@ -25,7 +25,7 @@ writing commands to [default: - for stdout] --upmap-max set max upmap entries to calculate [default: 10] --upmap-deviation - max deviation from target [default: 1] + max deviation from target [default: 5] --upmap-pool restrict upmap balancing to 1 or more pools --upmap-save write modified OSDMap with upmap changes --upmap-active Act like an active balancer, keep applying changes until balanced diff --git a/src/test/cli/osdmaptool/upmap-out.t b/src/test/cli/osdmaptool/upmap-out.t index 8a167aba09a9..02b13ec561b5 100644 --- a/src/test/cli/osdmaptool/upmap-out.t +++ b/src/test/cli/osdmaptool/upmap-out.t @@ -7,7 +7,7 @@ marking OSD@147 as out writing upmap command output to: c checking for upmap cleanups - upmap, max-count 11, max deviation 1 + upmap, max-count 11, max deviation 5 pools rbd prepared 11/11 changes $ cat c diff --git a/src/test/cli/osdmaptool/upmap.t b/src/test/cli/osdmaptool/upmap.t index 8fa1a6103136..23a5d5d32d4b 100644 --- a/src/test/cli/osdmaptool/upmap.t +++ b/src/test/cli/osdmaptool/upmap.t @@ -6,7 +6,7 @@ marking all OSDs up and in writing upmap command output to: c checking for upmap cleanups - upmap, max-count 11, max deviation 1 + upmap, max-count 11, max deviation 5 pools rbd prepared 11/11 changes $ cat c diff --git a/src/tools/osdmaptool.cc b/src/tools/osdmaptool.cc index b74c91468a64..fbbcddafc6a9 100644 --- a/src/tools/osdmaptool.cc +++ b/src/tools/osdmaptool.cc @@ -54,7 +54,7 @@ void usage() cout << " writing commands to [default: - for stdout]" << std::endl; cout << " --upmap-max set max upmap entries to calculate [default: 10]" << std::endl; cout << " --upmap-deviation " << std::endl; - cout << " max deviation from target [default: 1]" << std::endl; + cout << " max deviation from target [default: 5]" << std::endl; cout << " --upmap-pool restrict upmap balancing to 1 or more pools" << std::endl; cout << " --upmap-save write modified OSDMap with upmap changes" << std::endl; cout << " --upmap-active Act like an active balancer, keep applying changes until balanced" << std::endl; @@ -145,7 +145,7 @@ int main(int argc, const char **argv) bool health = false; std::string upmap_file = "-"; int upmap_max = 10; - int upmap_deviation = 1; + int upmap_deviation = 5; bool upmap_active = false; std::set upmap_pools; int64_t pg_num = -1;