]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/mgr/balancer/module.py: add max/min info in stats_by_root
authorYang Honggang <yanghonggang@umcloud.com>
Tue, 17 Sep 2019 15:30:30 +0000 (23:30 +0800)
committerYang Honggang <yanghonggang@umcloud.com>
Thu, 19 Sep 2019 06:00:24 +0000 (14:00 +0800)
commita1331a6ece5f7852fe32d32f145817798fd1a3b5
treed12802e364cca2a075beab7bdf29271905b5e357
parente487604ad2af483a54e4616aff2f313a266d99d3
pybind/mgr/balancer/module.py: add max/min info in stats_by_root

$ ceph balancer eval-verbose hahapool
...
count_by_pool {'hahapool': {'objects': {0: 1L, 1: 1L, 2: 0L, 3: 0L, 4: 1L}, 'bytes': {0: 0L, 1: 0L, 2: 0L, 3: 0L, 4: 0L}, 'pgs': {0: 35, 1: 42, 2: 23, 3: 30, 4: 26}}}
...
stats_by_root {'default': {'objects': {'min': 0.0, 'max': 1.0, 'score': 0.2970089549436925, 'stddev': 0.5477225575051662, 'avg': 0.6, 'sum_weight': 0.6000000000000001}, 'bytes': {'min': 0, 'max': 0, 'score': 0, 'stddev': 0, 'avg': 0, 'sum_weight': 0}, 'pgs': {'min': 23.0, 'max': 42.0, 'score': 0.07354228523075643, 'stddev': 7.52994023880668, 'avg': 31.2, 'sum_weight': 0.4}}}

max/min can give us an intuitive feel of the pg/bytes/object's distribution.
In addition, sometimes we really want to know which osd hold the most
number of pgs/bytes/objects for specified pool.

Signed-off-by: Yang Honggang <yanghonggang@umcloud.com>
src/pybind/mgr/balancer/module.py