Hi All,
          I have few questions regarding the Primary affinity.  In the original 
blueprint 
(https://wiki.ceph.com/Planning/Blueprints/Firefly/osdmap%3A_primary_role_affinity
 ), one example has been given.

For PG x, CRUSH returns [a, b, c]
If a has primary_affinity of .5, b and c have 1 , with 50% probability, we will 
choose b or c instead of a. (25% for b, 25% for c)

A) I was browsing through the code, but I could not find this logic of 
splitting the rest of configured primary affinity value between other osds. How 
is this handled?

  1.      if (a < CEPH_OSD_MAX_PRIMARY_AFFINITY &&
  2.      (crush_hash32_2(CRUSH_HASH_RJENKINS1,
  3.              seed, o) >> 16) >= a) {
  4.        // we chose not to use this primary.  note it anyway as a
  5.        // fallback in case we don't pick anyone else, but keep looking.
  6.        if (pos < 0)
  7.      pos = i;
  8.      } else {
  9.        pos = i;
  10.       break;
  11.     }
  12.   }

B) Since, primary affinity value is configured independently, there can be a 
situation with [0.1,0.1,0.1]  with total value that don’t add to 1.  How is 
this taken care of?

C) Slightly confused. What happens for a situation with [1,0.5,1] ? Is osd.0 
always returned?

D) After calculating primary based on the affinity values, I see a shift of 
osds so that primary comes to the front. Why is this needed?. I thought, 
primary affinity value affects only reads and hence, osd ordering need not be 
changed.


Thanks,
Johnu
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to