mon: Optimise from current PGs if last_clean_pgs would move more data #179
Open
koolkhel
wants to merge 2 commits from
koolkhel/vitastor:mon-pg-base-fewer-moves into master
pull from: koolkhel/vitastor:mon-pg-base-fewer-moves
merge into: vitalif:master
vitalif:master
vitalif:primary-stickiness
vitalif:libvfn
vitalif:canceling
vitalif:immediate-repeering
vitalif:rdma-close-tcp
vitalif:use-degraded-writes
vitalif:fix-write-delete-flow
vitalif:openssl-3.0.12
vitalif:openssl-capture-secrets
vitalif:ignore-small-rdma-end
vitalif:encrypt-batch
vitalif:faster-peering-calc
vitalif:http-hello
vitalif:xxh3-bench
vitalif:create-user-etcd-based
vitalif:aesxts_streaming_nosupport
vitalif:refactor-heap-continue-write
vitalif:ston3lu-patch-0127
vitalif:rdma-credits
vitalif:heap-meta
vitalif:sendmsg-zc-no-more-error
vitalif:fix-clear-refs
vitalif:veeam-trick
vitalif:test-etcd-schizo
vitalif:test
vitalif:test1
vitalif:test2
vitalif:cow-meta
vitalif:kv-readahead
vitalif:qemu-fix-crash-idea
vitalif:eventloop-auto-init-trigger
vitalif:hugo-docs
vitalif:node-mutex-and-postpone
vitalif:check-writeback
vitalif:msgr-iothreads-v2
vitalif:antietcd
vitalif:rel-1.4
vitalif:test-fix-ec-unknown-state-51
vitalif:kv-update
vitalif:kv-debug
vitalif:hotfix-1.2.0
vitalif:rdma-simple-nodp
vitalif:zerocopy-tcp-send
vitalif:csi-staging
vitalif:hotfix-1.1.0
vitalif:hotfix-1.0.0
vitalif:fsync-feedback
vitalif:cached-reads
vitalif:qemu-send-loop
vitalif:test-double-alloc
vitalif:hier-failure-domains
vitalif:mon-self-restart
vitalif:epoch-deletions
vitalif:rdma-flow-control
vitalif:csi-use-vitastor-cli
vitalif:rdma-v2
vitalif:etcd-hide-base64
vitalif:lrc-matrix
vitalif:rm-left-on-dead
vitalif:nfs-proxy-old
vitalif:non-odp-rdma
vitalif:test-zctr
vitalif:separate-data-connections
vitalif:sec_osd_msgr
vitalif:test-assert
vitalif:nbd-vmsplice
vitalif:allow-etcd-address-option
vitalif:rdma-zerocopy
vitalif:rel-0.5
vitalif:openonload
vitalif:sync-io-test
vitalif:trace-sync
vitalif:trace-sqes
vitalif:test-submit-and-wait
vitalif:test-sq-poll
vitalif:blocking-uring-test
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "koolkhel/vitastor:mon-pg-base-fewer-moves"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
last_clean_pgsis only updated when the whole pool is clean, and every re-optimisation (reweight, OSD out, pool change) starts from it. While the pool stays unclean and the current PGs drift away fromlast_clean_pgs, each round lands on a new layout and moves a large part of the pool again. For example, on 12 hosts x 48 OSDs, EC 8+2, 2048 PGs, with two OSDs of one host reweighted to 0 and the pool not clean afterwards, every re-optimisation with unchanged weights moves 73-76 PGs, and bringing one of the OSDs back moves 117 PGs. If the OSD IDs of a host changed after the last clean state, a single reweight moves about 1660 of 2048 PGs.This change also optimises from the current PGs in that case and keeps the result which places fewer PG items on OSDs without their data, i.e. neither the current OSD nor one from the PG history. Ties go to
last_clean_pgs, so an OSD which comes back before its PGs recover still gets the same PGs back. The second LP is only solved whenlast_clean_pgsdiffers from the current PGs with the same PG count.Independent of #178 (that one changes
mon/lp_optimizer/lp_optimizer.js, this one onlymon/pg_gen.js).Found: seen on a large cluster with 2048 PGs: after two OSDs returned from reweight 0 the monitor moved about 870 PGs, then about 880 more on every recalculation, so the data movement did not converge.
Tested:
node mon/test-pg-base.js(12 hosts x 8 OSDs, 256 PGs, an EC 8+2 pool and a replicated pool with 3 copies):last_clean_pgs, one OSD back: EC 434-485 PG items moved on master (its share is 26.7), 124-176 with the fix; replicated 28-38 on master (share 8.0), 15-20 with the fix. Both fail on master;count_moved_osdsmakes the replicated case fail.Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.