Calculating the expected PGs distribution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Xavier,

When trying to optimize the distribution for a bucket, the expected PGs for a given OSD is calculated as follows:

(OSD weight)/(sum of all OSD weights) * number of PGs

So, for instance with a one replica pool of 100 PGs and OSDs with weights:

5 1 1 1 1

we expect them to get 56 11 11 11 11 PGs respectively. And (this is where it gets interesting ;-) with a two replica pool of 100 PGs we expect 112 22 22 22 22. Only that cannot happen because the second replica needs to be on a different OSD than the first. The OSD with weight 5 can't get 56 PGs for the second replica, it can only get 44 PGs otherwise it would violate the constraint. The expected number of PGs needs to be calculated differently to account for this case.

I can't figure out the formula myself, my maths are not good enough. Could you please guide me in the right direction ?

Cheers

-- 
Loïc Dachary, Artisan Logiciel Libre
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux