On Wed, 30 Nov 2016, Piotr Dałek wrote: > On Wed, Nov 30, 2016 at 04:22:10PM +0800, Zhen Cao wrote: > > Hi, > > I am reading the RADOS paper,but i could not understand why more PGs > > per OSD result in a more balanced distribution.I konw the mapping > > procedure between oid and osd,but it is neverless difficult to > > understand for me. > > Thanks for your help! > > In a nuthshell - because each PG corresponds to multiple objects. > And because of this, it is possible that some PGs will aggregate more > objects than other PGs, resulting in lack of acutal balance. Also see here: > http://docs.ceph.com/docs/jewel/rados/operations/placement-groups/ More generally, it's a [pseudo-]random process that puts objects in PGs and PGs on OSDs. If you have a small number of objects, you'll have a small number of PG and a large variance (one PG may have 2 objects, another 4). If it's a large number, things will converge toward an average (e.g., very close to ~1,000,000 objects per PG). Same goes for PGs distributed to OSDs. Larger numbers mean a tighter variance. sage