Primary affinity
When a Ceph Client reads or writes data, it always contacts the primary OSD in the acting set. Sometimes an OSD is not well suited to act as a primary compared to other OSDs (for example, it has a slow disk or a slow controller). To prevent performance bottlenecks (especially on read operations) while maximizing utilization of your hardware, you can set a Ceph OSD’s primary affinity so that CRUSH is less likely to use the OSD as a primary in an acting set.
For example, in set [2, 3, 4], osd.2 is the primary.
Syntax
ceph osd primary-affinity OSD_ID WEIGHT
Primary affinity is 1 by default (that is, an OSD might act as a
primary). You might set the OSD primary range from 0-1, where 0
means that the OSD might NOT be used as a primary and 1 means that an OSD
might be used as a primary. When the weight is < 1, it is less likely that CRUSH
will select the Ceph OSD Daemon to act as a primary.