Skip to contentSkip to conversation

ceph balancer: further optimizations?

DISCUSSION Stefan Priebe - Profihost AG 5 participants 15 messages Aug 20, 2018 – Aug 22, 2018 13 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

Greets,
Stefan

A message that is not in the archive (sent off-list or not yet received): c83c7687-90da-bfbb-3d17-5af8bb897334-2Lf/[email protected]

#2 lore raw
Quoted 13 lines · Stefan Priebe - Profihost AG

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

Quoted 8 lines
# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

s

A message that is not in the archive (sent off-list or not yet received): alpine.DEB.2.11.1808201951330.7272-qHenpvqtifaMSRpgCs4c+g@public.gmane.org

#4 lore raw

You might just have too much data per PG. If a single PG can account for 4% of your OSD, then 9% difference in used space on your OSDs is caused by an OSD having only 2 more PGs than another OSD. If you do have very large PGs, increasing your PG count in those pools should improve your data distribution.

Quoted 27 lines · Sage Weil
Quoted 13 lines · Stefan Priebe - Profihost AG

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

Quoted 8 lines
# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

Quoted 6 lines

s
_______________________________________________
ceph-users mailing list [email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

_______________________________________________
ceph-users mailing list [email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

A message that is not in the archive (sent off-list or not yet received): CAN-GepJiVxAwPMdS+EPDhUkDpF0sB+J4GBpFaYJ-5bz2pOhnCQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw

Am 20.08.2018 um 22:13 schrieb David Turner:

Quoted 5 lines

You might just have too much data per PG.  If a single PG can account for 4% of your OSD, then 9% difference in used space on your OSDs is caused by an OSD having only 2 more PGs than another OSD.  If you do have very large PGs, increasing your PG count in those pools should improve your data distribution.

4384 pgs
91 osds
3x replication

4384 / 91 * 3 => ~ 150 pgs which seems to be even too much - at least the doc says around 100 pgs / osd.

Quoted 33 lines

On Mon, Aug 20, 2018 at 3:59 PM Sage Weil <[email protected] <mailto:[email protected]>> wrote:

On Mon, 20 Aug 2018, Stefan Priebe - Profihost AG wrote:
> Hello,
>
> since loic seems to have left ceph development and his wunderful crush > optimization tool isn'T working anymore i'm trying to get a good > distribution with the ceph balancer.
>
> Sadly it does not work as good as i want.
>
> # ceph osd df | sort -k8
>
> show 75 to 83% Usage which is 8% difference which is too much for me. > I'm optimization by bytes.
>
> # ceph balancer eval
> current cluster score 0.005420 (lower is better)
>
> # ceph balancer eval $OPT_NAME
> plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better) >
> I'm unable to optimize further ;-( Is there any chance to optimize > further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg
count, bytes, and object count.  Picking a single metric might help a bit
(as those 3 things are not always perfectly aligned).

Quoted 6 lines

s
_______________________________________________
ceph-users mailing list
[email protected] <mailto:[email protected]>
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

A message that is not in the archive (sent off-list or not yet received): 242d9bd7-a6fb-683c-112d-72d45b085383-2Lf/[email protected]

#8 lore raw

I didn't ask how many PGs per OSD, I asked how large are your PGs in comparison to your OSDs. For instance my primary data pool in my home cluster has 10914GB of data in it and has 256 PGs. That means that each PG accounts for 42GB of data. I'm using 5TB disks in this cluster. Each PG on an OSD accounts for 0.8% of the total disk capacity on each OSD. With that % size per PG, I can get a really good balance in that cluster since even if an OSD had 5 more PGs than another, it's only different by 4% total.

Now let's change the amount of PGs in my cluster. The same amount of data and the same size of disk, but only 32 PGs in the pool. Each PG in that pool takes up 6.8% of an OSD's available space. Now even if I only have 2 more PGs on one osd than another, it's off by 13.4%.

Quoted 33 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 22:13 schrieb David Turner:

Quoted 5 lines

You might just have too much data per PG. If a single PG can account for 4% of your OSD, then 9% difference in used space on your OSDs is caused by an OSD having only 2 more PGs than another OSD. If you do have very large PGs, increasing your PG count in those pools should improve your data distribution.

4384 pgs
91 osds
3x replication

4384 / 91 * 3 => ~ 150 pgs which seems to be even too much - at least the doc says around 100 pgs / osd.

Quoted 8 lines

On Mon, Aug 20, 2018 at 3:59 PM Sage Weil <[email protected] <mailto:[email protected]>> wrote:

On Mon, 20 Aug 2018, Stefan Priebe - Profihost AG wrote:
> Hello,
>
> since loic seems to have left ceph development and his wunderful

crush

Quoted 8 lines
Quoted 8 lines

optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for

me.

Quoted 25 lines
Quoted 7 lines
Quoted 7 lines

I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is

better)

Quoted 16 lines
Quoted 3 lines

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg
count, bytes, and object count. Picking a single metric might help a bit
(as those 3 things are not always perfectly aligned).

s
_______________________________________________
ceph-users mailing list
[email protected] <mailto:[email protected]>
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

_______________________________________________
ceph-users mailing list [email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

#9 lore raw
In reply to a message not in the archive

Am 20.08.2018 um 21:52 schrieb Sage Weil:

Quoted 20 lines · Stefan Priebe - Profihost AG
Quoted 19 lines

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)
Quoted 6 lines
Quoted 2 lines

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

Hi,

ok i found a bug in the balancer code which seems to be present in all releases.

861 best_ws = next_ws
862 best_ow = next_ow

should be:

861 best_ws = copy.deepcopy(next_ws)
862 best_ow = copy.deepcopy(next_ow)

otherwise it does not use the best but the last.

I'm also using this one:
https://github.com/ceph/ceph/pull/20665/commits/c161a74ad6cf006cd9b33b40fd7705b67c170615

to optimize by bytes only.

Greets,
Stefan

A message that is not in the archive (sent off-list or not yet received): 95be32e6-a609-9e0f-1f75-dfcd3f876150-2Lf/[email protected]

#11 lore raw
Quoted 39 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 21:52 schrieb Sage Weil:

Quoted 20 lines · Stefan Priebe - Profihost AG
Quoted 19 lines

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)
Quoted 6 lines
Quoted 2 lines

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

Hi,

ok i found a bug in the balancer code which seems to be present in all releases.

861 best_ws = next_ws
862 best_ow = next_ow

Quoted 6 lines

should be:

861 best_ws = copy.deepcopy(next_ws)
862 best_ow = copy.deepcopy(next_ow)

otherwise it does not use the best but the last.

Interesting... does that change improve things?

Also, if most of your data is in one pool you can try ceph balancer eval <pool-name>

-- dan

Quoted 8 lines

I'm also using this one:
https://github.com/ceph/ceph/pull/20665/commits/c161a74ad6cf006cd9b33b40fd7705b67c170615

to optimize by bytes only.

Greets,
Stefan

A message that is not in the archive (sent off-list or not yet received): CABZ+qqnBTRJ0_owutqb57sM_+Ag9OZPd=g1Fq-9Q2+cJ3ddi3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#13 lore raw

Am 20.08.2018 um 22:38 schrieb Dan van der Ster:

Quoted 41 lines
Quoted 39 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 21:52 schrieb Sage Weil:

Quoted 20 lines · Stefan Priebe - Profihost AG
Quoted 19 lines

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)
Quoted 6 lines
Quoted 2 lines

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

Hi,

ok i found a bug in the balancer code which seems to be present in all releases.

861 best_ws = next_ws
862 best_ow = next_ow

Quoted 8 lines
Quoted 6 lines

should be:

861 best_ws = copy.deepcopy(next_ws)
862 best_ow = copy.deepcopy(next_ow)

otherwise it does not use the best but the last.

Interesting... does that change improve things?

It fixes the following (mgr debug output):

2018-08-20 22:33:46.078525 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.078574 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.078770 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.156326 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.156374 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.156581 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.233818 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.233868 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.234043 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.313212 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.313714 7f2fbc3b6700  0 mgr[balancer] Score got
worse, trying smaller step 0.000244
2018-08-20 22:33:46.313887 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.391586 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001152, misplacing 0.001141
2018-08-20 22:33:46.393374 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.473956 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.474001 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.474046 7f2fbc3b6700  0 mgr[balancer] Success, score

0.001155 -> 0.001152

BUT:

# ceph balancer eval myplan
plan myplan final score 0.001180 (lower is better)

So the final plan does NOT contain the expected optimization. The deepcopy fixes it.

After:

# ceph balancer eval myplan
plan myplan final score 0.001152 (lower is better)
Quoted 3 lines

Also, if most of your data is in one pool you can try ceph balancer eval <pool-name>

Already tried this doesn't help much.

Greets,
Stefan

Quoted 10 lines

-- dan

Quoted 8 lines

I'm also using this one:
https://github.com/ceph/ceph/pull/20665/commits/c161a74ad6cf006cd9b33b40fd7705b67c170615

to optimize by bytes only.

Greets,
Stefan

A message that is not in the archive (sent off-list or not yet received): d0e31f59-9f69-24a2-b58e-96b5c836ccb1-2Lf/[email protected]

#15 lore raw
Quoted 93 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 22:38 schrieb Dan van der Ster:

Quoted 41 lines
Quoted 39 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 21:52 schrieb Sage Weil:

Quoted 20 lines · Stefan Priebe - Profihost AG
Quoted 19 lines

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)
Quoted 6 lines
Quoted 2 lines

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

Hi,

ok i found a bug in the balancer code which seems to be present in all releases.

861 best_ws = next_ws
862 best_ow = next_ow

Quoted 8 lines
Quoted 6 lines

should be:

861 best_ws = copy.deepcopy(next_ws)
862 best_ow = copy.deepcopy(next_ow)

otherwise it does not use the best but the last.

Interesting... does that change improve things?

It fixes the following (mgr debug output):

2018-08-20 22:33:46.078525 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.078574 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.078770 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.156326 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.156374 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.156581 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.233818 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.233868 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.234043 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.313212 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.313714 7f2fbc3b6700  0 mgr[balancer] Score got
worse, trying smaller step 0.000244
2018-08-20 22:33:46.313887 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.391586 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001152, misplacing 0.001141
2018-08-20 22:33:46.393374 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.473956 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.474001 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.474046 7f2fbc3b6700  0 mgr[balancer] Success, score

0.001155 -> 0.001152

BUT:

# ceph balancer eval myplan
plan myplan final score 0.001180 (lower is better)
Quoted 7 lines

So the final plan does NOT contain the expected optimization. The deepcopy fixes it.

After:

# ceph balancer eval myplan
plan myplan final score 0.001152 (lower is better)

OK that looks like a bug. Did you create a tracker or PR?

-- Dan

Quoted 20 lines
Quoted 3 lines

Also, if most of your data is in one pool you can try ceph balancer eval <pool-name>

Already tried this doesn't help much.

Greets,
Stefan

Quoted 10 lines

-- dan

Quoted 8 lines

I'm also using this one:
https://github.com/ceph/ceph/pull/20665/commits/c161a74ad6cf006cd9b33b40fd7705b67c170615

to optimize by bytes only.

Greets,
Stefan

A message that is not in the archive (sent off-list or not yet received): CABZ+qqmonM8VBxjJ25W=rWmAX5rwWAKFy=JcuVrpnQsK1VrtPA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#17 lore raw

Am 21.08.2018 um 11:47 schrieb Dan van der Ster:

Quoted 98 lines
Quoted 96 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 22:38 schrieb Dan van der Ster:

Quoted 41 lines
Quoted 39 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 21:52 schrieb Sage Weil:

Quoted 20 lines · Stefan Priebe - Profihost AG
Quoted 19 lines

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)
Quoted 6 lines
Quoted 2 lines

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

Hi,

ok i found a bug in the balancer code which seems to be present in all releases.

861 best_ws = next_ws
862 best_ow = next_ow

Quoted 8 lines
Quoted 6 lines

should be:

861 best_ws = copy.deepcopy(next_ws)
862 best_ow = copy.deepcopy(next_ow)

otherwise it does not use the best but the last.

Interesting... does that change improve things?

It fixes the following (mgr debug output):

2018-08-20 22:33:46.078525 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.078574 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.078770 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.156326 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.156374 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.156581 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.233818 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.233868 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.234043 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.313212 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.313714 7f2fbc3b6700  0 mgr[balancer] Score got
worse, trying smaller step 0.000244
2018-08-20 22:33:46.313887 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.391586 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001152, misplacing 0.001141
2018-08-20 22:33:46.393374 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.473956 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.474001 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.474046 7f2fbc3b6700  0 mgr[balancer] Success, score

0.001155 -> 0.001152

BUT:

# ceph balancer eval myplan
plan myplan final score 0.001180 (lower is better)

So the final plan does NOT contain the expected optimization. The deepcopy fixes it.

Quoted 6 lines
Quoted 4 lines

After:

# ceph balancer eval myplan
plan myplan final score 0.001152 (lower is better)

OK that looks like a bug. Did you create a tracker or PR?

No not yet. Should i create a PR on github with the fix?

Quoted 23 lines

-- Dan

Quoted 20 lines
Quoted 3 lines

Also, if most of your data is in one pool you can try ceph balancer eval <pool-name>

Already tried this doesn't help much.

Greets,
Stefan

Quoted 10 lines

-- dan

Quoted 8 lines

I'm also using this one:
https://github.com/ceph/ceph/pull/20665/commits/c161a74ad6cf006cd9b33b40fd7705b67c170615

to optimize by bytes only.

Greets,
Stefan

A message that is not in the archive (sent off-list or not yet received): aff2c924-e66d-25ed-14e1-1ca41a258185-2Lf/[email protected]

#19 lore raw
Quoted 100 lines · Stefan Priebe - Profihost AG

Am 21.08.2018 um 11:47 schrieb Dan van der Ster:

Quoted 98 lines
Quoted 96 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 22:38 schrieb Dan van der Ster:

Quoted 41 lines
Quoted 39 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 21:52 schrieb Sage Weil:

Quoted 20 lines · Stefan Priebe - Profihost AG
Quoted 19 lines

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)
Quoted 6 lines
Quoted 2 lines

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

Hi,

ok i found a bug in the balancer code which seems to be present in all releases.

861 best_ws = next_ws
862 best_ow = next_ow

Quoted 8 lines
Quoted 6 lines

should be:

861 best_ws = copy.deepcopy(next_ws)
862 best_ow = copy.deepcopy(next_ow)

otherwise it does not use the best but the last.

Interesting... does that change improve things?

It fixes the following (mgr debug output):

2018-08-20 22:33:46.078525 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.078574 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.078770 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.156326 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.156374 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.156581 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.233818 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.233868 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.234043 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.313212 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.313714 7f2fbc3b6700  0 mgr[balancer] Score got
worse, trying smaller step 0.000244
2018-08-20 22:33:46.313887 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.391586 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001152, misplacing 0.001141
2018-08-20 22:33:46.393374 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.473956 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.474001 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.474046 7f2fbc3b6700  0 mgr[balancer] Success, score

0.001155 -> 0.001152

BUT:

# ceph balancer eval myplan
plan myplan final score 0.001180 (lower is better)

So the final plan does NOT contain the expected optimization. The deepcopy fixes it.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

After:

# ceph balancer eval myplan
plan myplan final score 0.001152 (lower is better)

OK that looks like a bug. Did you create a tracker or PR?

No not yet. Should i create a PR on github with the fix?

Yeah, probably tracker first (requesting luminous,mimic backports), then a PR on master with "Fixes: tracker..."

-- dan

Quoted 24 lines
Quoted 24 lines

-- Dan

Quoted 20 lines
Quoted 3 lines

Also, if most of your data is in one pool you can try ceph balancer eval <pool-name>

Already tried this doesn't help much.

Greets,
Stefan

Quoted 10 lines

-- dan

Quoted 8 lines

I'm also using this one:
https://github.com/ceph/ceph/pull/20665/commits/c161a74ad6cf006cd9b33b40fd7705b67c170615

to optimize by bytes only.

Greets,
Stefan

A message that is not in the archive (sent off-list or not yet received): CABZ+qqnuX7W5gBregLrTw8p0gMUcbyRX-LqZfEv-aCPNBKg9RA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#21 lore raw

Am 21.08.2018 um 11:56 schrieb Dan van der Ster:

Quoted 107 lines
Quoted 105 lines · Stefan Priebe - Profihost AG

Am 21.08.2018 um 11:47 schrieb Dan van der Ster:

Quoted 103 lines
Quoted 100 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 22:38 schrieb Dan van der Ster:

Quoted 41 lines
Quoted 39 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 21:52 schrieb Sage Weil:

Quoted 20 lines · Stefan Priebe - Profihost AG
Quoted 19 lines

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)
Quoted 6 lines
Quoted 2 lines

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

Hi,

ok i found a bug in the balancer code which seems to be present in all releases.

861 best_ws = next_ws
862 best_ow = next_ow

Quoted 8 lines
Quoted 6 lines

should be:

861 best_ws = copy.deepcopy(next_ws)
862 best_ow = copy.deepcopy(next_ow)

otherwise it does not use the best but the last.

Interesting... does that change improve things?

It fixes the following (mgr debug output):

2018-08-20 22:33:46.078525 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.078574 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.078770 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.156326 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.156374 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.156581 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.233818 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.233868 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.234043 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.313212 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.313714 7f2fbc3b6700  0 mgr[balancer] Score got
worse, trying smaller step 0.000244
2018-08-20 22:33:46.313887 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.391586 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001152, misplacing 0.001141
2018-08-20 22:33:46.393374 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.473956 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.474001 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.474046 7f2fbc3b6700  0 mgr[balancer] Success, score

0.001155 -> 0.001152

BUT:

# ceph balancer eval myplan
plan myplan final score 0.001180 (lower is better)

So the final plan does NOT contain the expected optimization. The deepcopy fixes it.

After:

# ceph balancer eval myplan
plan myplan final score 0.001152 (lower is better)
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

OK that looks like a bug. Did you create a tracker or PR?

No not yet. Should i create a PR on github with the fix?

Yeah, probably tracker first (requesting luminous,mimic backports), then a PR on master with "Fixes: tracker..."

Will do but can't find a create button in the tracker. I've opened several reports in the past but right now it seems a can't create a ticket.

Stefan

Quoted 28 lines

-- dan

Quoted 24 lines
Quoted 24 lines

-- Dan

Quoted 20 lines
Quoted 3 lines

Also, if most of your data is in one pool you can try ceph balancer eval <pool-name>

Already tried this doesn't help much.

Greets,
Stefan

Quoted 10 lines

-- dan

Quoted 8 lines

I'm also using this one:
https://github.com/ceph/ceph/pull/20665/commits/c161a74ad6cf006cd9b33b40fd7705b67c170615

to optimize by bytes only.

Greets,
Stefan

A message that is not in the archive (sent off-list or not yet received): a85eb5ea-d239-42ed-009e-dffc8282678d-2Lf/[email protected]

#23 lore raw

Am 21.08.2018 um 12:03 schrieb Stefan Priebe - Profihost AG:

Quoted 111 lines

Am 21.08.2018 um 11:56 schrieb Dan van der Ster:

Quoted 109 lines
Quoted 107 lines · Stefan Priebe - Profihost AG

Am 21.08.2018 um 11:47 schrieb Dan van der Ster:

Quoted 104 lines
Quoted 93 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 22:38 schrieb Dan van der Ster:

Quoted 41 lines
Quoted 39 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 21:52 schrieb Sage Weil:

Quoted 20 lines · Stefan Priebe - Profihost AG
Quoted 19 lines

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)
Quoted 6 lines
Quoted 2 lines

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

Hi,

ok i found a bug in the balancer code which seems to be present in all releases.

861 best_ws = next_ws
862 best_ow = next_ow

Quoted 8 lines
Quoted 6 lines

should be:

861 best_ws = copy.deepcopy(next_ws)
862 best_ow = copy.deepcopy(next_ow)

otherwise it does not use the best but the last.

Interesting... does that change improve things?

It fixes the following (mgr debug output):

2018-08-20 22:33:46.078525 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.078574 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.078770 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.156326 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.156374 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.156581 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.233818 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.233868 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.234043 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.313212 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.313714 7f2fbc3b6700  0 mgr[balancer] Score got
worse, trying smaller step 0.000244
2018-08-20 22:33:46.313887 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.391586 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001152, misplacing 0.001141
2018-08-20 22:33:46.393374 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.473956 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.474001 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.474046 7f2fbc3b6700  0 mgr[balancer] Success, score

0.001155 -> 0.001152

BUT:

# ceph balancer eval myplan
plan myplan final score 0.001180 (lower is better)
Quoted 7 lines

So the final plan does NOT contain the expected optimization. The deepcopy fixes it.

After:

# ceph balancer eval myplan
plan myplan final score 0.001152 (lower is better)

OK that looks like a bug. Did you create a tracker or PR?

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

No not yet. Should i create a PR on github with the fix?

Yeah, probably tracker first (requesting luminous,mimic backports), then a PR on master with "Fixes: tracker..."

Will do but can't find a create button in the tracker. I've opened several reports in the past but right now it seems a can't create a ticket.

http://tracker.ceph.com/projects/ceph/issues/new

=>

403
You are not authorized to access this page.

Quoted 30 lines

Stefan

Quoted 28 lines

-- dan

Quoted 24 lines
Quoted 24 lines

-- Dan

Quoted 20 lines
Quoted 3 lines

Also, if most of your data is in one pool you can try ceph balancer eval <pool-name>

Already tried this doesn't help much.

Greets,
Stefan

Quoted 10 lines

-- dan

Quoted 8 lines

I'm also using this one:
https://github.com/ceph/ceph/pull/20665/commits/c161a74ad6cf006cd9b33b40fd7705b67c170615

to optimize by bytes only.

Greets,
Stefan

A message that is not in the archive (sent off-list or not yet received): c4bee361-41c4-f589-91eb-4b58889f533a-2Lf/[email protected]

#25 lore raw

You should be able to create issues now; we had a misconfiguration in the tracker following the recent spam attack.
-Greg

Quoted 166 lines · Stefan Priebe - Profihost AG

Am 21.08.2018 um 12:03 schrieb Stefan Priebe - Profihost AG:

Quoted 111 lines

Am 21.08.2018 um 11:56 schrieb Dan van der Ster:

Quoted 109 lines
Quoted 107 lines · Stefan Priebe - Profihost AG

Am 21.08.2018 um 11:47 schrieb Dan van der Ster:

Quoted 104 lines
Quoted 93 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 22:38 schrieb Dan van der Ster:

Quoted 41 lines
Quoted 39 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 21:52 schrieb Sage Weil:

Quoted 20 lines · Stefan Priebe - Profihost AG
Quoted 19 lines

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)
Quoted 6 lines
Quoted 2 lines

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

Hi,

ok i found a bug in the balancer code which seems to be present in all releases.

861 best_ws = next_ws
862 best_ow = next_ow

Quoted 8 lines
Quoted 6 lines

should be:

861 best_ws = copy.deepcopy(next_ws)
862 best_ow = copy.deepcopy(next_ow)

otherwise it does not use the best but the last.

Interesting... does that change improve things?

It fixes the following (mgr debug output):

2018-08-20 22:33:46.078525 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.078574 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.078770 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.156326 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.156374 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.156581 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.233818 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.233868 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.234043 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.313212 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.313714 7f2fbc3b6700  0 mgr[balancer] Score got
worse, trying smaller step 0.000244
2018-08-20 22:33:46.313887 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.391586 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001152, misplacing 0.001141
2018-08-20 22:33:46.393374 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.473956 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.474001 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.474046 7f2fbc3b6700  0 mgr[balancer] Success, score

0.001155 -> 0.001152

BUT:

# ceph balancer eval myplan
plan myplan final score 0.001180 (lower is better)
Quoted 7 lines

So the final plan does NOT contain the expected optimization. The deepcopy fixes it.

After:

# ceph balancer eval myplan
plan myplan final score 0.001152 (lower is better)

OK that looks like a bug. Did you create a tracker or PR?

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

No not yet. Should i create a PR on github with the fix?

Yeah, probably tracker first (requesting luminous,mimic backports), then a PR on master with "Fixes: tracker..."

Will do but can't find a create button in the tracker. I've opened several reports in the past but right now it seems a can't create a ticket.

http://tracker.ceph.com/projects/ceph/issues/new

=>

403
You are not authorized to access this page.

Quoted 30 lines

Stefan

Quoted 28 lines

-- dan

Quoted 24 lines
Quoted 24 lines

-- Dan

Quoted 20 lines
Quoted 3 lines

Also, if most of your data is in one pool you can try ceph balancer eval <pool-name>

Already tried this doesn't help much.

Greets,
Stefan

Quoted 10 lines

-- dan

Quoted 8 lines

I'm also using this one:
https://github.com/ceph/ceph/pull/20665/commits/c161a74ad6cf006cd9b33b40fd7705b67c170615

to optimize by bytes only.

Greets,
Stefan

_______________________________________________
ceph-users mailing list [email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

A message that is not in the archive (sent off-list or not yet received): CAJ4mKGZonHL_=tGyTP8d7gT+Gznu9+qGwiMfQe0mrxEjqHMaEA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#27 lore raw

Am 21.08.2018 um 17:28 schrieb Gregory Farnum:

Quoted 4 lines

You should be able to create issues now; we had a misconfiguration in the tracker following the recent spam attack.
-Greg

Quoted 119 lines
Quoted 117 lines · Stefan Priebe - Profihost AG

Am 21.08.2018 um 12:03 schrieb Stefan Priebe - Profihost AG:

Quoted 115 lines

Am 21.08.2018 um 11:56 schrieb Dan van der Ster:

Quoted 113 lines
Quoted 100 lines · Stefan Priebe - Profihost AG

Am 21.08.2018 um 11:47 schrieb Dan van der Ster:

Quoted 98 lines
Quoted 96 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 22:38 schrieb Dan van der Ster:

Quoted 41 lines
Quoted 39 lines · Stefan Priebe - Profihost AG

Am 20.08.2018 um 21:52 schrieb Sage Weil:

Quoted 20 lines · Stefan Priebe - Profihost AG
Quoted 19 lines

Hello,

since loic seems to have left ceph development and his wunderful crush optimization tool isn'T working anymore i'm trying to get a good distribution with the ceph balancer.

Sadly it does not work as good as i want.

# ceph osd df | sort -k8

show 75 to 83% Usage which is 8% difference which is too much for me. I'm optimization by bytes.

# ceph balancer eval
current cluster score 0.005420 (lower is better)
# ceph balancer eval $OPT_NAME
plan spriebe_2018-08-20_19:36 final score 0.005456 (lower is better)
Quoted 6 lines
Quoted 2 lines

I'm unable to optimize further ;-( Is there any chance to optimize further even in case of more rebelancing?

The scoring that the balancer module is doing is currently a hybrid of pg count, bytes, and object count. Picking a single metric might help a bit (as those 3 things are not always perfectly aligned).

Hi,

ok i found a bug in the balancer code which seems to be present in all releases.

861 best_ws = next_ws
862 best_ow = next_ow

Quoted 8 lines
Quoted 6 lines

should be:

861 best_ws = copy.deepcopy(next_ws)
862 best_ow = copy.deepcopy(next_ow)

otherwise it does not use the best but the last.

Interesting... does that change improve things?

It fixes the following (mgr debug output):

2018-08-20 22:33:46.078525 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.078574 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.078770 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.156326 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.156374 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.156581 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.233818 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.233868 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.234043 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.313212 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.313714 7f2fbc3b6700  0 mgr[balancer] Score got
worse, trying smaller step 0.000244
2018-08-20 22:33:46.313887 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.391586 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001152, misplacing 0.001141
2018-08-20 22:33:46.393374 7f2fbc3b6700  0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.473956 7f2fbc3b6700  0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.474001 7f2fbc3b6700  0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.474046 7f2fbc3b6700  0 mgr[balancer] Success, score

0.001155 -> 0.001152

BUT:

# ceph balancer eval myplan
plan myplan final score 0.001180 (lower is better)

So the final plan does NOT contain the expected optimization. The deepcopy fixes it.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

After:

# ceph balancer eval myplan
plan myplan final score 0.001152 (lower is better)

OK that looks like a bug. Did you create a tracker or PR?

No not yet. Should i create a PR on github with the fix?

Yeah, probably tracker first (requesting luminous,mimic backports), then a PR on master with "Fixes: tracker..."

Pull request:
https://github.com/ceph/ceph/pull/23682

Tracker:
http://tracker.ceph.com/issues/27000

Stefan

Quoted 49 lines
Quoted 49 lines
Quoted 3 lines

Will do but can't find a create button in the tracker. I've opened several reports in the past but right now it seems a can't create a ticket.

http://tracker.ceph.com/projects/ceph/issues/new

=>

403
You are not authorized to access this page.

Quoted 30 lines

Stefan

Quoted 28 lines

-- dan

Quoted 24 lines
Quoted 24 lines

-- Dan

Quoted 20 lines
Quoted 3 lines

Also, if most of your data is in one pool you can try ceph balancer eval <pool-name>

Already tried this doesn't help much.

Greets,
Stefan

Quoted 10 lines

-- dan

Quoted 8 lines

I'm also using this one:
https://github.com/ceph/ceph/pull/20665/commits/c161a74ad6cf006cd9b33b40fd7705b67c170615

to optimize by bytes only.

Greets,
Stefan

_______________________________________________
ceph-users mailing list [email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com