]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: implement read balancer
authorLaura Flores <lflores@redhat.com>
Wed, 1 Feb 2023 23:50:53 +0000 (23:50 +0000)
committerLaura Flores <lflores@redhat.com>
Wed, 22 Feb 2023 16:29:38 +0000 (16:29 +0000)
commit8daff1cb3829e9a96046b46255ed58b2f507d526
tree85ac42213b361c51d363fef11a5a696cf7ccea0b
parenta29a620b873995179c547f98fcabdd93ba8bae46
osd: implement read balancer

This commit implements two functions:

1. calc_desired_primary_distribution
   Based on the number of pgs in a pool and the pool's
   replica count, we calculate the ideal number of primary
   pgs that should be assigned to each OSD on that pool in
   order for reads to be balanced.

2. balance_primaries
   This is the overall algorithm used to balance reads (primary
   pgs) in a pool. Based on the first function, we re-distribute
   primaries on the OSDs in a pool so each OSD has the ideal
   number of primaries. This is done without data movement.

Signed-off-by: Laura Flores <lflores@redhat.com>
src/osd/OSDMap.cc
src/osd/OSDMap.h