I'm having trouble understanding the description of Placement Group IDs
at http://ceph.com/docs/master/architecture/
There it says:
...
2. CRUSH takes the object ID and hashes it.
3. CRUSH calculates the hash modulo the number of OSDs. (e.g., 0x58) to
get a PG ID.
...
That seems to imply that the number of placement groups is the same as
the number of OSDs. Should it instead say "the hash modulo the number of
Placement Groups in the pool"?
Later on, under REBALANCING, the diagram shows two OSDs with 10 PGs
spread across them.
I found http://ceph.com/docs/firefly/dev/placement-group/ which says
...
obj_hash = hash(locator)
pg = obj_hash % num_pg
...
so I read that as confirming the hash is modulo number of placement
groups, not number of OSDs.
Looking at the remaining pseudocode:
...
OSDs_for_pg = crush(pg) # returns a list of OSDs
primary = osds_for_pg[0]
replicas = osds_for_pg[1:]
...
This implies that each PG has a fixed set of OSDs (until the crush map
changes).
The paper at http://ceph.com/papers/weil-crush-sc06.pdf doesn't mention
'placement group' at all, as far as I can see. It talks about "buckets"
and "devices". So the input to the CRUSH algorithm is the PG ID, not the
object ID, is that right?
Thanks,
Brian.
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com