]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/OSDMap: don't mapping all pgs each time in calc_pg_upmaps 23734/head
authorhuangjun <huangjun@xsky.com>
Fri, 24 Aug 2018 14:47:02 +0000 (22:47 +0800)
committerhuangjun <huangjun@xsky.com>
Sat, 25 Aug 2018 01:53:21 +0000 (09:53 +0800)
commitda45e4e352b30cc4f6fd52f2f030bf7569eaee57
treeb4f28e720725702a98525434d069e6d820a329b4
parent9bef451aa714c1bc1fb18d5f27885589ef9cf7a3
osd/OSDMap: don't mapping all pgs each time in calc_pg_upmaps

We have a cluster pool with 32768 pgs and 400 osds, it costs 600 seconds when doing upmap
with '--upmap-max 32768 --upmap-deviation 0.01', which is pretty slow.
After adding some debug code, the time mostly spent on pg_to_up_acting_osds, the average
time for one pg_to_up_acting_osds is about 12us, so the whole pool's pg will cost 500ms each
time, we finally have 1429 pgs need to do upmap, so it cost about 600 seconds.
Withi this patch, it only spend 5 seconds to get job done.

Signed-off-by: huangjun <huangjun@xsky.com>
src/osd/OSDMap.cc