Luminous - replace old target-weight tree from osdmap with mgr balancer
k,
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?
Thanks!
Greets,
Stefan
Quoted 4 lines · Stefan Priebe - Profihost AG
k,
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Thanks!
sage
Quoted 16 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?Thanks!
Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 8 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
k,
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Thanks!
Stefan
Quoted 20 lines
Thanks!
sageQuoted 16 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?Thanks!
Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
ID CLASS WEIGHT (compat) TYPE NAME
-10001 71.66673 root root-target-weight
-10005 6.79999 6.79999 host node67-target-weight
38 ssd 1.00000 1.00000 osd.38
39 ssd 1.00000 1.00000 osd.39
51 ssd 1.00000 1.00000 osd.51
52 ssd 1.00000 1.00000 osd.52
53 ssd 1.00000 1.00000 osd.53
54 ssd 1.00000 1.00000 osd.54
57 ssd 0.79999 0.79999 osd.57
-10010 6.79999 6.79999 host node68-target-weight
16 ssd 1.00000 1.00000 osd.16
17 ssd 1.00000 1.00000 osd.17
18 ssd 1.00000 1.00000 osd.18
19 ssd 1.00000 1.00000 osd.19
20 ssd 1.00000 1.00000 osd.20
25 ssd 1.00000 1.00000 osd.25
62 ssd 0.79999 0.79999 osd.62
-10009 10.57336 10.57336 host node69-target-weight
8 1.00000 1.00000 osd.8
9 1.00000 1.00000 osd.9
61 0.79999 0.79999 osd.61
10 ssd 1.72670 1.72670 osd.10
15 ssd 0.87000 0.87000 osd.15
26 ssd 0.87000 0.87000 osd.26
27 ssd 0.84999 0.84999 osd.27
63 ssd 1.73000 1.73000 osd.63
67 ssd 1.72670 1.72670 osd.67
-10008 10.59337 10.59337 host node70-target-weight
4 ssd 1.00000 1.00000 osd.4
5 ssd 1.00000 1.00000 osd.5
6 ssd 1.72670 1.72670 osd.6
7 ssd 0.87000 0.87000 osd.7
28 ssd 0.87000 0.87000 osd.28
29 ssd 0.87000 0.87000 osd.29
60 ssd 0.79999 0.79999 osd.60
64 ssd 1.73000 1.73000 osd.64
66 ssd 1.72670 1.72670 osd.66
-10007 6.64998 6.64998 host node71-target-weight
0 ssd 0.84999 0.84999 osd.0
1 ssd 1.00000 1.00000 osd.1
2 ssd 1.00000 1.00000 osd.2
3 ssd 1.00000 1.00000 osd.3
30 ssd 1.00000 1.00000 osd.30
35 ssd 1.00000 1.00000 osd.35
59 ssd 0.79999 0.79999 osd.59
-10006 9.12338 9.12338 host node72-target-weight
36 ssd 1.00000 1.00000 osd.36
37 ssd 1.00000 1.00000 osd.37
41 ssd 0.87000 0.87000 osd.41
42 ssd 1.72670 1.72670 osd.42
43 ssd 1.00000 1.00000 osd.43
44 ssd 1.00000 1.00000 osd.44
58 ssd 0.79999 0.79999 osd.58
65 ssd 1.72670 1.72670 osd.65
-10004 7.52669 7.52669 host node73-target-weight
11 ssd 1.00000 1.00000 osd.11
12 ssd 1.00000 1.00000 osd.12
13 ssd 1.00000 1.00000 osd.13
14 ssd 1.00000 1.00000 osd.14
40 ssd 1.72670 1.72670 osd.40
45 ssd 1.00000 1.00000 osd.45
56 ssd 0.79999 0.79999 osd.56
-10003 6.79999 6.79999 host node74-target-weight
21 ssd 1.00000 1.00000 osd.21
22 ssd 1.00000 1.00000 osd.22
23 ssd 1.00000 1.00000 osd.23
24 ssd 1.00000 1.00000 osd.24
46 ssd 1.00000 1.00000 osd.46
47 ssd 1.00000 1.00000 osd.47
55 ssd 0.79999 0.79999 osd.55
-10002 6.79999 6.79999 host node75-target-weight
31 ssd 1.00000 1.00000 osd.31
32 ssd 1.00000 1.00000 osd.32
33 ssd 1.00000 1.00000 osd.33
34 ssd 1.00000 1.00000 osd.34
48 ssd 1.00000 1.00000 osd.48
49 ssd 1.00000 1.00000 osd.49
50 ssd 0.79999 0.79999 osd.50
-10000 59.56252 root root
-5 5.37109 5.37109 host node67
38 ssd 0.92055 0.92055 osd.38
39 ssd 1.01564 1.01564 osd.39
51 ssd 1.05869 1.05869 osd.51
52 ssd 0.97812 0.97812 osd.52
53 ssd 1.04170 1.04170 osd.53
54 ssd 1.00017 1.00017 osd.54
57 ssd 0.78407 0.78407 osd.57
-9 5.58746 5.58746 host node68
16 ssd 0.98000 0.98000 osd.16
17 ssd 1.06917 1.06917 osd.17
18 ssd 1.16075 1.16075 osd.18
19 ssd 0.83670 0.83670 osd.19
20 ssd 0.95099 0.95099 osd.20
25 ssd 1.03653 1.03653 osd.25
62 ssd 0.76581 0.76581 osd.62
-8 9.07146 9.07146 host node69
8 0.66422 0.66422 osd.8
9 0.72400 0.72400 osd.9
61 0.56326 0.56326 osd.61
10 ssd 1.09930 1.09930 osd.10
15 ssd 0.64998 0.64998 osd.15
26 ssd 0.54704 0.54704 osd.26
27 ssd 0.48680 0.48680 osd.27
63 ssd 1.20139 1.20139 osd.63
67 ssd 1.14597 1.14597 osd.67
-7 9.47948 9.47948 host node70
4 ssd 0.59647 0.59647 osd.4
5 ssd 0.74663 0.74663 osd.5
6 ssd 1.19809 1.19809 osd.6
7 ssd 0.56386 0.56386 osd.7
28 ssd 0.52682 0.52682 osd.28
29 ssd 0.53951 0.53951 osd.29
60 ssd 0.53197 0.53197 osd.60
64 ssd 1.18048 1.18048 osd.64
66 ssd 1.23711 1.23711 osd.66
-6 5.25194 5.25194 host node71
0 ssd 0.80965 0.80965 osd.0
1 ssd 0.96100 0.96100 osd.1
2 ssd 0.92325 0.92325 osd.2
3 ssd 1.04431 1.04431 osd.3
30 ssd 1.04166 1.04166 osd.30
35 ssd 1.00110 1.00110 osd.35
59 ssd 0.87000 0.87000 osd.59
-4 8.01935 8.01935 host node72
36 ssd 0.60399 0.60399 osd.36
37 ssd 0.59300 0.59300 osd.37
41 ssd 0.53636 0.53636 osd.41
42 ssd 1.10330 1.10330 osd.42
43 ssd 0.63528 0.63528 osd.43
44 ssd 0.60475 0.60475 osd.44
58 ssd 0.48059 0.48059 osd.58
65 ssd 1.11266 1.11266 osd.65
-1 6.00589 6.00589 host node73
11 ssd 0.75484 0.75484 osd.11
12 ssd 0.77977 0.77977 osd.12
13 ssd 0.72763 0.72763 osd.13
14 ssd 0.68427 0.68427 osd.14
40 ssd 1.40228 1.40228 osd.40
45 ssd 0.80234 0.80234 osd.45
56 ssd 0.68782 0.68782 osd.56
-2 5.24933 5.24933 host node74
21 ssd 1.09908 1.09908 osd.21
22 ssd 0.89011 0.89011 osd.22
23 ssd 0.97574 0.97574 osd.23
24 ssd 0.97112 0.97112 osd.24
46 ssd 1.03148 1.03148 osd.46
47 ssd 1.01045 1.01045 osd.47
55 ssd 0.82300 0.82300 osd.55
-3 5.52652 5.52652 host node75
31 ssd 0.99561 0.99561 osd.31
32 ssd 0.96910 0.96910 osd.32
33 ssd 0.99934 0.99934 osd.33
34 ssd 0.93686 0.93686 osd.34
48 ssd 0.99597 0.99597 osd.48
49 ssd 1.08250 1.08250 osd.49
50 ssd 0.82057 0.82057 osd.50 Quoted 11 lines · Stefan Priebe - Profihost AG
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 8 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
k,
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?
First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>
That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
Quoted 2 lines
k,
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage
Hi Sage,
this did not work like expected. I tested it in another smaller cluster and it resulted in about 6% misplaced objects.
Any ideas?
Stefan
Am 11.01.2018 um 08:09 schrieb Stefan Priebe - Profihost AG:HI
Quoted 54 lines
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
Quoted 2 lines
k,
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage
Quoted 4 lines · Stefan Priebe - Profihost AG
Hi Sage,
this did not work like expected. I tested it in another smaller cluster and it resulted in about 6% misplaced objects.
Can you narrow down at what stage the misplaced objects happened?
sage
Quoted 61 lines
Any ideas?
Stefan
Am 11.01.2018 um 08:09 schrieb Stefan Priebe - Profihost AG:HIQuoted 54 lines
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
Quoted 2 lines
k,
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage
Am 11.01.2018 um 20:58 schrieb Sage Weil:
Quoted 7 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Hi Sage,
this did not work like expected. I tested it in another smaller cluster and it resulted in about 6% misplaced objects.
Can you narrow down at what stage the misplaced objects happened?
ouch i saw this:
# ceph balancer status
{
"active": true,
"plans": [
"auto_2018-01-11_19:52:28"
],
"mode": "crush-compat"
}so might it be the balancer beeing executed while i was modifying the tree? Can i stop it and reexecute it manually?
Quoted 63 lines
sage
Quoted 60 lines
Any ideas?
Stefan
Am 11.01.2018 um 08:09 schrieb Stefan Priebe - Profihost AG:HIQuoted 54 lines
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
Quoted 2 lines
k,
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage
Quoted 19 lines · Stefan Priebe - Profihost AG
Am 11.01.2018 um 20:58 schrieb Sage Weil:
Quoted 7 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Hi Sage,
this did not work like expected. I tested it in another smaller cluster and it resulted in about 6% misplaced objects.
Can you narrow down at what stage the misplaced objects happened?
ouch i saw this:
# ceph balancer status { "active": true, "plans": [ "auto_2018-01-11_19:52:28" ], "mode": "crush-compat" }
Quoted 2 lines
so might it be the balancer beeing executed while i was modifying the tree? Can i stop it and reexecute it manually?
You can always 'ceph balancer off'. And I probably wouldn't turn it on until after you've cleaned this up because it will balance with the current weights being the 'target' weights (when in your case they're not (yet)).
To manually see what the balancer would do you can
ceph balancer optimize foo
ceph balancer show foo
ceph balancer eval foo # (see numerical analysis)
and if it looks good
ceph balancer execute foo
to actually apply the changes.
sage
Quoted 70 lines
Quoted 64 lines
sage
Quoted 60 lines
Any ideas?
Stefan
Am 11.01.2018 um 08:09 schrieb Stefan Priebe - Profihost AG:HIQuoted 54 lines
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
Quoted 2 lines
k,
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Am 11.01.2018 um 21:10 schrieb Sage Weil:
Quoted 34 lines · Stefan Priebe - Profihost AG
Quoted 19 lines
Am 11.01.2018 um 20:58 schrieb Sage Weil:
Quoted 7 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Hi Sage,
this did not work like expected. I tested it in another smaller cluster and it resulted in about 6% misplaced objects.
Can you narrow down at what stage the misplaced objects happened?
ouch i saw this:
# ceph balancer status { "active": true, "plans": [ "auto_2018-01-11_19:52:28" ], "mode": "crush-compat" }Quoted 2 lines
so might it be the balancer beeing executed while i was modifying the tree? Can i stop it and reexecute it manually?
You can always 'ceph balancer off'. And I probably wouldn't turn it on until after you've cleaned this up because it will balance with the current weights being the 'target' weights (when in your case they're not (yet)).
To manually see what the balancer would do you can
ceph balancer optimize foo
ceph balancer show foo
ceph balancer eval foo # (see numerical analysis)
Quoted 5 lines
and if it looks good
ceph balancer execute foo
to actually apply the changes.
ok thanks but it seems there are still leftovers somewhere:
[expo-office-node1 ~]# ceph balancer optimize stefan
Error EINVAL: Traceback (most recent call last):
File "/usr/lib/ceph/mgr/balancer/module.py", line 303, in handle_command
self.optimize(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 596, in optimize
return self.do_crush_compat(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 658, in do_crush_compat
orig_ws = self.get_compat_weight_set_weights()
File "/usr/lib/ceph/mgr/balancer/module.py", line 837, inget_compat_weight_set_weights
raise RuntimeError('could not find bucket %s' % b['bucket_id'])
RuntimeError: could not find bucket -6
[expo-office-node1 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 14.55957 root default
-4 3.63989 host expo-office-node1 8 ssd 0.90997 osd.8 up 1.00000 1.00000 9 ssd 0.90997 osd.9 up 1.00000 1.00000 10 ssd 0.90997 osd.10 up 1.00000 1.00000 11 ssd 0.90997 osd.11 up 1.00000 1.00000 -2 3.63989 host expo-office-node2 0 ssd 0.90997 osd.0 up 1.00000 1.00000 1 ssd 0.90997 osd.1 up 1.00000 1.00000 2 ssd 0.90997 osd.2 up 1.00000 1.00000 3 ssd 0.90997 osd.3 up 1.00000 1.00000 -3 3.63989 host expo-office-node3 4 ssd 0.90997 osd.4 up 1.00000 1.00000 5 ssd 0.90997 osd.5 up 1.00000 1.00000 6 ssd 0.90997 osd.6 up 1.00000 1.00000 7 ssd 0.90997 osd.7 up 1.00000 1.00000 -5 3.63989 host expo-office-node4 12 ssd 0.90997 osd.12 up 1.00000 1.00000 13 ssd 0.90997 osd.13 up 1.00000 1.00000 14 ssd 0.90997 osd.14 up 1.00000 1.00000 15 ssd 0.90997 osd.15 up 1.00000 1.00000
Stefan
Quoted 72 lines
sage
Quoted 69 lines
Quoted 64 lines
sage
Quoted 60 lines
Any ideas?
Stefan
Am 11.01.2018 um 08:09 schrieb Stefan Priebe - Profihost AG:HIQuoted 54 lines
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
Quoted 2 lines
k,
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
OK it wasn't the balancer.
It happens after executing all the reweight und crush compat commands:
An even on a much bigger cluster it's 6% again. Some rounding issue? I migrated with a script so it's not a typo.
Stefan
Am 11.01.2018 um 21:21 schrieb Stefan Priebe - Profihost AG:
Quoted 156 lines
Hi,
Am 11.01.2018 um 21:10 schrieb Sage Weil:
Quoted 34 lines · Stefan Priebe - Profihost AG
Quoted 19 lines
Am 11.01.2018 um 20:58 schrieb Sage Weil:
Quoted 7 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Hi Sage,
this did not work like expected. I tested it in another smaller cluster and it resulted in about 6% misplaced objects.
Can you narrow down at what stage the misplaced objects happened?
ouch i saw this:
# ceph balancer status { "active": true, "plans": [ "auto_2018-01-11_19:52:28" ], "mode": "crush-compat" }Quoted 2 lines
so might it be the balancer beeing executed while i was modifying the tree? Can i stop it and reexecute it manually?
You can always 'ceph balancer off'. And I probably wouldn't turn it on until after you've cleaned this up because it will balance with the current weights being the 'target' weights (when in your case they're not (yet)).
To manually see what the balancer would do you can
ceph balancer optimize foo
ceph balancer show foo
ceph balancer eval foo # (see numerical analysis)Quoted 5 lines
and if it looks good
ceph balancer execute foo
to actually apply the changes.
ok thanks but it seems there are still leftovers somewhere:
[expo-office-node1 ~]# ceph balancer optimize stefan
Error EINVAL: Traceback (most recent call last):
File "/usr/lib/ceph/mgr/balancer/module.py", line 303, inhandle_command
self.optimize(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 596, in optimize
returnself.do_crush_compat(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 658, indo_crush_compat
orig_ws=self.get_compat_weight_set_weights()
File "/usr/lib/ceph/mgr/balancer/module.py", line 837, inget_compat_weight_set_weights
raiseRuntimeError('could not find bucket %s' % b['bucket_id'])
RuntimeError: could not find bucket -6[expo-office-node1 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 14.55957 root default-4 3.63989 host expo-office-node1 8 ssd 0.90997 osd.8 up 1.00000 1.00000 9 ssd 0.90997 osd.9 up 1.00000 1.00000 10 ssd 0.90997 osd.10 up 1.00000 1.00000 11 ssd 0.90997 osd.11 up 1.00000 1.00000 -2 3.63989 host expo-office-node2 0 ssd 0.90997 osd.0 up 1.00000 1.00000 1 ssd 0.90997 osd.1 up 1.00000 1.00000 2 ssd 0.90997 osd.2 up 1.00000 1.00000 3 ssd 0.90997 osd.3 up 1.00000 1.00000 -3 3.63989 host expo-office-node3 4 ssd 0.90997 osd.4 up 1.00000 1.00000 5 ssd 0.90997 osd.5 up 1.00000 1.00000 6 ssd 0.90997 osd.6 up 1.00000 1.00000 7 ssd 0.90997 osd.7 up 1.00000 1.00000 -5 3.63989 host expo-office-node4 12 ssd 0.90997 osd.12 up 1.00000 1.00000 13 ssd 0.90997 osd.13 up 1.00000 1.00000 14 ssd 0.90997 osd.14 up 1.00000 1.00000 15 ssd 0.90997 osd.15 up 1.00000 1.00000Stefan
Quoted 72 lines
sage
Quoted 69 lines
Quoted 64 lines
sage
Quoted 60 lines
Any ideas?
Stefan
Am 11.01.2018 um 08:09 schrieb Stefan Priebe - Profihost AG:HIQuoted 54 lines
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
Quoted 2 lines
k,
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Stefan Priebe - Profihost AG
OK it wasn't the balancer.
It happens after executing all the reweight und crush compat commands:
An even on a much bigger cluster it's 6% again. Some rounding issue? I migrated with a script so it's not a typo.
Maybe.. can you narrow down which command it is? I'm guessing that one of the 'ceph osd crush weight-set reweight-compat ...' commands does it, but it would be nice to confirm whether it is a rounding issue or if something is broken!
sage
Quoted 166 lines
Stefan
Am 11.01.2018 um 21:21 schrieb Stefan Priebe - Profihost AG:
Quoted 82 lines
Hi,
Am 11.01.2018 um 21:10 schrieb Sage Weil:
Quoted 34 lines · Stefan Priebe - Profihost AG
Quoted 19 lines
Am 11.01.2018 um 20:58 schrieb Sage Weil:
Quoted 7 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Hi Sage,
this did not work like expected. I tested it in another smaller cluster and it resulted in about 6% misplaced objects.
Can you narrow down at what stage the misplaced objects happened?
ouch i saw this:
# ceph balancer status { "active": true, "plans": [ "auto_2018-01-11_19:52:28" ], "mode": "crush-compat" }Quoted 2 lines
so might it be the balancer beeing executed while i was modifying the tree? Can i stop it and reexecute it manually?
You can always 'ceph balancer off'. And I probably wouldn't turn it on until after you've cleaned this up because it will balance with the current weights being the 'target' weights (when in your case they're not (yet)).
To manually see what the balancer would do you can
ceph balancer optimize foo
ceph balancer show foo
ceph balancer eval foo # (see numerical analysis)Quoted 5 lines
and if it looks good
ceph balancer execute foo
to actually apply the changes.
ok thanks but it seems there are still leftovers somewhere:
[expo-office-node1 ~]# ceph balancer optimize stefan
Error EINVAL: Traceback (most recent call last):
File "/usr/lib/ceph/mgr/balancer/module.py", line 303, inhandle_command
self.optimize(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 596, in optimize
returnself.do_crush_compat(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 658, indo_crush_compat
orig_ws=self.get_compat_weight_set_weights()
File "/usr/lib/ceph/mgr/balancer/module.py", line 837, inget_compat_weight_set_weights
raiseRuntimeError('could not find bucket %s' % b['bucket_id'])
RuntimeError: could not find bucket -6[expo-office-node1 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 14.55957 root default-4 3.63989 host expo-office-node1 8 ssd 0.90997 osd.8 up 1.00000 1.00000 9 ssd 0.90997 osd.9 up 1.00000 1.00000 10 ssd 0.90997 osd.10 up 1.00000 1.00000 11 ssd 0.90997 osd.11 up 1.00000 1.00000 -2 3.63989 host expo-office-node2 0 ssd 0.90997 osd.0 up 1.00000 1.00000 1 ssd 0.90997 osd.1 up 1.00000 1.00000 2 ssd 0.90997 osd.2 up 1.00000 1.00000 3 ssd 0.90997 osd.3 up 1.00000 1.00000 -3 3.63989 host expo-office-node3 4 ssd 0.90997 osd.4 up 1.00000 1.00000 5 ssd 0.90997 osd.5 up 1.00000 1.00000 6 ssd 0.90997 osd.6 up 1.00000 1.00000 7 ssd 0.90997 osd.7 up 1.00000 1.00000 -5 3.63989 host expo-office-node4 12 ssd 0.90997 osd.12 up 1.00000 1.00000 13 ssd 0.90997 osd.13 up 1.00000 1.00000 14 ssd 0.90997 osd.14 up 1.00000 1.00000 15 ssd 0.90997 osd.15 up 1.00000 1.00000Quoted 74 lines
Stefan
Quoted 72 lines
sage
Quoted 69 lines
Quoted 64 lines
sage
Quoted 60 lines
Any ideas?
Stefan
Am 11.01.2018 um 08:09 schrieb Stefan Priebe - Profihost AG:HIQuoted 54 lines
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
Quoted 2 lines
k,
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 11.01.2018 um 21:37 schrieb Sage Weil:
Quoted 5 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
OK it wasn't the balancer.
It happens after executing all the reweight und crush compat commands:
Quoted 7 lines
Quoted 2 lines
An even on a much bigger cluster it's 6% again. Some rounding issue? I migrated with a script so it's not a typo.
Maybe.. can you narrow down which command it is? I'm guessing that one of the 'ceph osd crush weight-set reweight-compat ...' commands does it, but it would be nice to confirm whether it is a rounding issue or if something is broken!
Yes i'll try.
At least the crushmap looks very weird after executing all commands. You'll find the decodec one here:
https://pastebin.com/raw/LjjAcww4
Stefan
Quoted 168 lines
sage
Quoted 165 lines
Stefan
Am 11.01.2018 um 21:21 schrieb Stefan Priebe - Profihost AG:
Quoted 82 lines
Hi,
Am 11.01.2018 um 21:10 schrieb Sage Weil:
Quoted 34 lines · Stefan Priebe - Profihost AG
Quoted 19 lines
Am 11.01.2018 um 20:58 schrieb Sage Weil:
Quoted 7 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Hi Sage,
this did not work like expected. I tested it in another smaller cluster and it resulted in about 6% misplaced objects.
Can you narrow down at what stage the misplaced objects happened?
ouch i saw this:
# ceph balancer status { "active": true, "plans": [ "auto_2018-01-11_19:52:28" ], "mode": "crush-compat" }Quoted 2 lines
so might it be the balancer beeing executed while i was modifying the tree? Can i stop it and reexecute it manually?
You can always 'ceph balancer off'. And I probably wouldn't turn it on until after you've cleaned this up because it will balance with the current weights being the 'target' weights (when in your case they're not (yet)).
To manually see what the balancer would do you can
ceph balancer optimize foo
ceph balancer show foo
ceph balancer eval foo # (see numerical analysis)Quoted 5 lines
and if it looks good
ceph balancer execute foo
to actually apply the changes.
ok thanks but it seems there are still leftovers somewhere:
[expo-office-node1 ~]# ceph balancer optimize stefan
Error EINVAL: Traceback (most recent call last):
File "/usr/lib/ceph/mgr/balancer/module.py", line 303, inhandle_command
self.optimize(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 596, in optimize
returnself.do_crush_compat(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 658, indo_crush_compat
orig_ws=self.get_compat_weight_set_weights()
File "/usr/lib/ceph/mgr/balancer/module.py", line 837, inget_compat_weight_set_weights
raiseRuntimeError('could not find bucket %s' % b['bucket_id'])
RuntimeError: could not find bucket -6[expo-office-node1 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 14.55957 root default-4 3.63989 host expo-office-node1 8 ssd 0.90997 osd.8 up 1.00000 1.00000 9 ssd 0.90997 osd.9 up 1.00000 1.00000 10 ssd 0.90997 osd.10 up 1.00000 1.00000 11 ssd 0.90997 osd.11 up 1.00000 1.00000 -2 3.63989 host expo-office-node2 0 ssd 0.90997 osd.0 up 1.00000 1.00000 1 ssd 0.90997 osd.1 up 1.00000 1.00000 2 ssd 0.90997 osd.2 up 1.00000 1.00000 3 ssd 0.90997 osd.3 up 1.00000 1.00000 -3 3.63989 host expo-office-node3 4 ssd 0.90997 osd.4 up 1.00000 1.00000 5 ssd 0.90997 osd.5 up 1.00000 1.00000 6 ssd 0.90997 osd.6 up 1.00000 1.00000 7 ssd 0.90997 osd.7 up 1.00000 1.00000 -5 3.63989 host expo-office-node4 12 ssd 0.90997 osd.12 up 1.00000 1.00000 13 ssd 0.90997 osd.13 up 1.00000 1.00000 14 ssd 0.90997 osd.14 up 1.00000 1.00000 15 ssd 0.90997 osd.15 up 1.00000 1.00000Quoted 74 lines
Stefan
Quoted 72 lines
sage
Quoted 69 lines
Quoted 64 lines
sage
Quoted 60 lines
Any ideas?
Stefan
Am 11.01.2018 um 08:09 schrieb Stefan Priebe - Profihost AG:HIQuoted 54 lines
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
Quoted 2 lines
k,
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 11.01.2018 um 21:37 schrieb Sage Weil:
Quoted 5 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
OK it wasn't the balancer.
It happens after executing all the reweight und crush compat commands:
Quoted 7 lines
Quoted 2 lines
An even on a much bigger cluster it's 6% again. Some rounding issue? I migrated with a script so it's not a typo.
Maybe.. can you narrow down which command it is? I'm guessing that one of the 'ceph osd crush weight-set reweight-compat ...' commands does it, but it would be nice to confirm whether it is a rounding issue or if something is broken!
Hi Sage,
it happens while executing:
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>
right after the first command (reweight-compat optimized-weight) for the 1st OSD it gets:
0.4%
after the second (reweight target-weight):
0.7%
for each OSD it gets more worse...
Stefan
Quoted 167 lines
sage
Quoted 165 lines
Stefan
Am 11.01.2018 um 21:21 schrieb Stefan Priebe - Profihost AG:
Quoted 82 lines
Hi,
Am 11.01.2018 um 21:10 schrieb Sage Weil:
Quoted 34 lines · Stefan Priebe - Profihost AG
Quoted 19 lines
Am 11.01.2018 um 20:58 schrieb Sage Weil:
Quoted 7 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Hi Sage,
this did not work like expected. I tested it in another smaller cluster and it resulted in about 6% misplaced objects.
Can you narrow down at what stage the misplaced objects happened?
ouch i saw this:
# ceph balancer status { "active": true, "plans": [ "auto_2018-01-11_19:52:28" ], "mode": "crush-compat" }Quoted 2 lines
so might it be the balancer beeing executed while i was modifying the tree? Can i stop it and reexecute it manually?
You can always 'ceph balancer off'. And I probably wouldn't turn it on until after you've cleaned this up because it will balance with the current weights being the 'target' weights (when in your case they're not (yet)).
To manually see what the balancer would do you can
ceph balancer optimize foo
ceph balancer show foo
ceph balancer eval foo # (see numerical analysis)Quoted 5 lines
and if it looks good
ceph balancer execute foo
to actually apply the changes.
ok thanks but it seems there are still leftovers somewhere:
[expo-office-node1 ~]# ceph balancer optimize stefan
Error EINVAL: Traceback (most recent call last):
File "/usr/lib/ceph/mgr/balancer/module.py", line 303, inhandle_command
self.optimize(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 596, in optimize
returnself.do_crush_compat(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 658, indo_crush_compat
orig_ws=self.get_compat_weight_set_weights()
File "/usr/lib/ceph/mgr/balancer/module.py", line 837, inget_compat_weight_set_weights
raiseRuntimeError('could not find bucket %s' % b['bucket_id'])
RuntimeError: could not find bucket -6[expo-office-node1 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 14.55957 root default-4 3.63989 host expo-office-node1 8 ssd 0.90997 osd.8 up 1.00000 1.00000 9 ssd 0.90997 osd.9 up 1.00000 1.00000 10 ssd 0.90997 osd.10 up 1.00000 1.00000 11 ssd 0.90997 osd.11 up 1.00000 1.00000 -2 3.63989 host expo-office-node2 0 ssd 0.90997 osd.0 up 1.00000 1.00000 1 ssd 0.90997 osd.1 up 1.00000 1.00000 2 ssd 0.90997 osd.2 up 1.00000 1.00000 3 ssd 0.90997 osd.3 up 1.00000 1.00000 -3 3.63989 host expo-office-node3 4 ssd 0.90997 osd.4 up 1.00000 1.00000 5 ssd 0.90997 osd.5 up 1.00000 1.00000 6 ssd 0.90997 osd.6 up 1.00000 1.00000 7 ssd 0.90997 osd.7 up 1.00000 1.00000 -5 3.63989 host expo-office-node4 12 ssd 0.90997 osd.12 up 1.00000 1.00000 13 ssd 0.90997 osd.13 up 1.00000 1.00000 14 ssd 0.90997 osd.14 up 1.00000 1.00000 15 ssd 0.90997 osd.15 up 1.00000 1.00000Quoted 74 lines
Stefan
Quoted 72 lines
sage
Quoted 69 lines
Quoted 64 lines
sage
Quoted 60 lines
Any ideas?
Stefan
Am 11.01.2018 um 08:09 schrieb Stefan Priebe - Profihost AG:HIQuoted 54 lines
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
Quoted 2 lines
k,
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 14 lines · Stefan Priebe - Profihost AG
Am 11.01.2018 um 21:37 schrieb Sage Weil:
Quoted 5 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
OK it wasn't the balancer.
It happens after executing all the reweight und crush compat commands:
Quoted 7 lines
Quoted 2 lines
An even on a much bigger cluster it's 6% again. Some rounding issue? I migrated with a script so it's not a typo.
Maybe.. can you narrow down which command it is? I'm guessing that one of the 'ceph osd crush weight-set reweight-compat ...' commands does it, but it would be nice to confirm whether it is a rounding issue or if something is broken!
Quoted 6 lines
Hi Sage,
it happens while executing:
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>
right after the first command (reweight-compat optimized-weight) for the
It does this with the optimized-weight is *exactly* the same as the current (normal) weight? If it matches it should be a no-op. Can you do a 'ceph osd crush tree' before and after the command so we can compare? (In fact, I think that first step is pointless because when you create the compat weight-set it's populated with the regular CRUSH weights, which in your situation *are* the optimized weights.)
Actually, looking at this more closely, it looks like the normal 'reweight' command sets the value in the compat weight-set too, so in reality we want to reorder those commands (and do them quickly in succession). e.g.,
ceph osd crush reweight osd.1 <target-weight>
ceph osd crush weight-set reweight-compat osd.1 <optimized-weight>
but, again, the before and after PG layout should match. A 'ceph osd crush tree' dump before, after, and between will help sort out what is going on.
Thanks!
sage
Quoted 182 lines
1st OSD it gets:
0.4%
after the second (reweight target-weight):
0.7%for each OSD it gets more worse...
Stefan
Quoted 167 lines
sage
Quoted 165 lines
Stefan
Am 11.01.2018 um 21:21 schrieb Stefan Priebe - Profihost AG:
Quoted 82 lines
Hi,
Am 11.01.2018 um 21:10 schrieb Sage Weil:
Quoted 34 lines · Stefan Priebe - Profihost AG
Quoted 19 lines
Am 11.01.2018 um 20:58 schrieb Sage Weil:
Quoted 7 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Hi Sage,
this did not work like expected. I tested it in another smaller cluster and it resulted in about 6% misplaced objects.
Can you narrow down at what stage the misplaced objects happened?
ouch i saw this:
# ceph balancer status { "active": true, "plans": [ "auto_2018-01-11_19:52:28" ], "mode": "crush-compat" }Quoted 2 lines
so might it be the balancer beeing executed while i was modifying the tree? Can i stop it and reexecute it manually?
You can always 'ceph balancer off'. And I probably wouldn't turn it on until after you've cleaned this up because it will balance with the current weights being the 'target' weights (when in your case they're not (yet)).
To manually see what the balancer would do you can
ceph balancer optimize foo
ceph balancer show foo
ceph balancer eval foo # (see numerical analysis)Quoted 5 lines
and if it looks good
ceph balancer execute foo
to actually apply the changes.
ok thanks but it seems there are still leftovers somewhere:
[expo-office-node1 ~]# ceph balancer optimize stefan
Error EINVAL: Traceback (most recent call last):
File "/usr/lib/ceph/mgr/balancer/module.py", line 303, inhandle_command
self.optimize(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 596, in optimize
returnself.do_crush_compat(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 658, indo_crush_compat
orig_ws=self.get_compat_weight_set_weights()
File "/usr/lib/ceph/mgr/balancer/module.py", line 837, inget_compat_weight_set_weights
raiseRuntimeError('could not find bucket %s' % b['bucket_id'])
RuntimeError: could not find bucket -6[expo-office-node1 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 14.55957 root default-4 3.63989 host expo-office-node1 8 ssd 0.90997 osd.8 up 1.00000 1.00000 9 ssd 0.90997 osd.9 up 1.00000 1.00000 10 ssd 0.90997 osd.10 up 1.00000 1.00000 11 ssd 0.90997 osd.11 up 1.00000 1.00000 -2 3.63989 host expo-office-node2 0 ssd 0.90997 osd.0 up 1.00000 1.00000 1 ssd 0.90997 osd.1 up 1.00000 1.00000 2 ssd 0.90997 osd.2 up 1.00000 1.00000 3 ssd 0.90997 osd.3 up 1.00000 1.00000 -3 3.63989 host expo-office-node3 4 ssd 0.90997 osd.4 up 1.00000 1.00000 5 ssd 0.90997 osd.5 up 1.00000 1.00000 6 ssd 0.90997 osd.6 up 1.00000 1.00000 7 ssd 0.90997 osd.7 up 1.00000 1.00000 -5 3.63989 host expo-office-node4 12 ssd 0.90997 osd.12 up 1.00000 1.00000 13 ssd 0.90997 osd.13 up 1.00000 1.00000 14 ssd 0.90997 osd.14 up 1.00000 1.00000 15 ssd 0.90997 osd.15 up 1.00000 1.00000Quoted 74 lines
Stefan
Quoted 72 lines
sage
Quoted 69 lines
Quoted 64 lines
sage
Quoted 60 lines
Any ideas?
Stefan
Am 11.01.2018 um 08:09 schrieb Stefan Priebe - Profihost AG:HIQuoted 54 lines
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
Quoted 2 lines
k,
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
in the past we used the python crush optimize tool to reweight the osd
usage - it inserted a 2nd tree with $hostname-target-weight as
hostnames.Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous?
3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 12.01.2018 um 21:21 schrieb Sage Weil:
Quoted 34 lines · Stefan Priebe - Profihost AG
Quoted 14 lines
Am 11.01.2018 um 21:37 schrieb Sage Weil:
Quoted 5 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
OK it wasn't the balancer.
It happens after executing all the reweight und crush compat commands:
Quoted 7 lines
Quoted 2 lines
An even on a much bigger cluster it's 6% again. Some rounding issue? I migrated with a script so it's not a typo.
Maybe.. can you narrow down which command it is? I'm guessing that one of the 'ceph osd crush weight-set reweight-compat ...' commands does it, but it would be nice to confirm whether it is a rounding issue or if something is broken!
Quoted 6 lines
Hi Sage,
it happens while executing:
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>
right after the first command (reweight-compat optimized-weight) for theIt does this with the optimized-weight is *exactly* the same as the current (normal) weight? If it matches it should be a no-op. Can you do a 'ceph osd crush tree' before and after the command so we can compare? (In fact, I think that first step is pointless because when you create the compat weight-set it's populated with the regular CRUSH weights, which in your situation *are* the optimized weights.)
Actually, looking at this more closely, it looks like the normal 'reweight' command sets the value in the compat weight-set too, so in reality we want to reorder those commands (and do them quickly in succession). e.g.,
Quoted 6 lines
ceph osd crush reweight osd.1 <target-weight>
ceph osd crush weight-set reweight-compat osd.1 <optimized-weight>but, again, the before and after PG layout should match. A 'ceph osd crush tree' dump before, after, and between will help sort out what is going on.
Here we go (attached) - but those dumps are in json instead of plain text but i had them already dumped by my script. I hope this helps.
Thanks,
Stefan
Quoted 184 lines
Thanks!
sageQuoted 181 lines
1st OSD it gets:
0.4%
after the second (reweight target-weight):
0.7%for each OSD it gets more worse...
Stefan
Quoted 167 lines
sage
Quoted 165 lines
Stefan
Am 11.01.2018 um 21:21 schrieb Stefan Priebe - Profihost AG:
Quoted 82 lines
Hi,
Am 11.01.2018 um 21:10 schrieb Sage Weil:
Quoted 34 lines · Stefan Priebe - Profihost AG
Quoted 19 lines
Am 11.01.2018 um 20:58 schrieb Sage Weil:
Quoted 7 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Hi Sage,
this did not work like expected. I tested it in another smaller cluster and it resulted in about 6% misplaced objects.
Can you narrow down at what stage the misplaced objects happened?
ouch i saw this:
# ceph balancer status { "active": true, "plans": [ "auto_2018-01-11_19:52:28" ], "mode": "crush-compat" }Quoted 2 lines
so might it be the balancer beeing executed while i was modifying the tree? Can i stop it and reexecute it manually?
You can always 'ceph balancer off'. And I probably wouldn't turn it on until after you've cleaned this up because it will balance with the current weights being the 'target' weights (when in your case they're not (yet)).
To manually see what the balancer would do you can
ceph balancer optimize foo
ceph balancer show foo
ceph balancer eval foo # (see numerical analysis)Quoted 5 lines
and if it looks good
ceph balancer execute foo
to actually apply the changes.
ok thanks but it seems there are still leftovers somewhere:
[expo-office-node1 ~]# ceph balancer optimize stefan
Error EINVAL: Traceback (most recent call last):
File "/usr/lib/ceph/mgr/balancer/module.py", line 303, inhandle_command
self.optimize(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 596, in optimize
returnself.do_crush_compat(plan)
File "/usr/lib/ceph/mgr/balancer/module.py", line 658, indo_crush_compat
orig_ws=self.get_compat_weight_set_weights()
File "/usr/lib/ceph/mgr/balancer/module.py", line 837, inget_compat_weight_set_weights
raiseRuntimeError('could not find bucket %s' % b['bucket_id'])
RuntimeError: could not find bucket -6[expo-office-node1 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 14.55957 root default-4 3.63989 host expo-office-node1 8 ssd 0.90997 osd.8 up 1.00000 1.00000 9 ssd 0.90997 osd.9 up 1.00000 1.00000 10 ssd 0.90997 osd.10 up 1.00000 1.00000 11 ssd 0.90997 osd.11 up 1.00000 1.00000 -2 3.63989 host expo-office-node2 0 ssd 0.90997 osd.0 up 1.00000 1.00000 1 ssd 0.90997 osd.1 up 1.00000 1.00000 2 ssd 0.90997 osd.2 up 1.00000 1.00000 3 ssd 0.90997 osd.3 up 1.00000 1.00000 -3 3.63989 host expo-office-node3 4 ssd 0.90997 osd.4 up 1.00000 1.00000 5 ssd 0.90997 osd.5 up 1.00000 1.00000 6 ssd 0.90997 osd.6 up 1.00000 1.00000 7 ssd 0.90997 osd.7 up 1.00000 1.00000 -5 3.63989 host expo-office-node4 12 ssd 0.90997 osd.12 up 1.00000 1.00000 13 ssd 0.90997 osd.13 up 1.00000 1.00000 14 ssd 0.90997 osd.14 up 1.00000 1.00000 15 ssd 0.90997 osd.15 up 1.00000 1.00000Quoted 74 lines
Stefan
Quoted 72 lines
sage
Quoted 69 lines
Quoted 64 lines
sage
Quoted 60 lines
Any ideas?
Stefan
Am 11.01.2018 um 08:09 schrieb Stefan Priebe - Profihost AG:HIQuoted 54 lines
Thanks! Can this be done while still having jewel clients?
Stefan
Excuse my typo sent from my mobile phone.
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected] <mailto:[email protected]>>:
Quoted 45 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
k,
Quoted 8 lines
Quoted 6 lines
in the past we used the python crush optimize tool to reweight the osd
usage - it inserted a 2nd tree with $hostname-target-weight as
hostnames.Can you attach a 'ceph osd crush tree' (or partial output) so I can see
what you mean?Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous?
3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line · Stefan Priebe - Profihost AG
Thanks! Can this be done while still having jewel clients?
Yeah. If I'm understanding your crush dump properly, the *-target-weight part of the tree isn't doing anything except acting as a place for your custom tool to store the target weights. Removing this wont' change anything at all. And the compat weight-set is called 'compat' because it is backwards compatible with old clients. :)
sage
Quoted 52 lines
Stefan
Excuse my typo sent from my mobile phone.
Quoted 46 lines
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected]>:
Quoted 5 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
k,
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage
Hi,
Am 11.01.2018 um 13:46 schrieb Sage Weil:
Quoted 8 lines · Stefan Priebe - Profihost AG
Quoted 1 line
Thanks! Can this be done while still having jewel clients?
Yeah. If I'm understanding your crush dump properly, the *-target-weight part of the tree isn't doing anything except acting as a place for your custom tool to store the target weights. Removing this wont' change anything at all. And the compat weight-set is called 'compat' because it is backwards compatible with old clients. :)
Thank! It's the tool from Loic - i haven't seen him here for a long time.
See:
http://crush.readthedocs.io/en/latest/
Greets,
Stefan
Quoted 54 lines
sage
Quoted 52 lines
Stefan
Excuse my typo sent from my mobile phone.
Quoted 46 lines
Am 10.01.2018 um 22:56 schrieb Sage Weil <[email protected]>:
Quoted 5 lines · Stefan Priebe - Profihost AG
Quoted 4 lines
Am 10.01.2018 um 22:23 schrieb Sage Weil:
Quoted 3 lines · Stefan Priebe - Profihost AG
k,
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
in the past we used the python crush optimize tool to reweight the osd usage - it inserted a 2nd tree with $hostname-target-weight as hostnames.
Can you attach a 'ceph osd crush tree' (or partial output) so I can see what you mean?
Sure - attached.
Got it
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Now the quesions are:
1.) can we remove the tree? How?
2.) Can we do this now or only after all clients are running Luminous? 3.) is it enought to enable the mgr balancer module?First,
ceph osd crush weight-set create-compat
then for each osd,
ceph osd crush weight-set reweight-compat <osd> <optimized-weight> ceph osd crush reweight <osd> <target-weight>That won't move any data but will keep your current optimized weights in the compat weight-set where they belong.
Then you can remove the *-target-weight buckets. For each osd,
ceph osd crush rm <osd> <ancestor>-target-weight
and then for each remaining bucket
ceph osd crush rm <foo>-target-weight
Finally, turn on the balancer (or test it to see what it it wants to do with the optimize command.)
HTH!
sage