Keep PG count when optimize_change drops PGs instead of moving them #178
Open
koolkhel
wants to merge 3 commits from
koolkhel/vitastor:mon-keep-pg-count into master
pull from: koolkhel/vitastor:mon-keep-pg-count
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
3 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| 5cf776364e |
Solve with the PG count kept first in optimize_change
Add the PG count condition to the first solve and solve without it only when that is infeasible, instead of re-solving after a solution that lost PGs. Return the fallback as over_share and print it with the pool's change stats: pools are optimized concurrently, so a separate log line can't be matched to its pool. Bound the data movement in the test and add a case where the PG count can't be kept. |
|||
| f3436a5ab4 |
Log when optimize_change can't keep the PG count
When the PG count can't be kept within OSD sizes (failure domains too unequal for pg_count PGs at their shares), the first solution is kept and some OSDs get more than their share. Say so instead of keeping it silently. |
|||
| c910ca7068 |
Keep PG count when optimize_change drops PGs instead of moving them
The LP in optimize_change() has no constraint on the total PG count, and make_int_pgs() scales whatever is left back to pg_count. In an EC pool (ordered) a moved PG costs 2 or more, so the LP may prefer to drop PGs from overloaded failure domains rather than move them. The rest are then scaled back onto the same domains: a host returning to an EC 4+2 pool on 7 hosts keeps 0 PGs and the pool stays at 6/7 efficiency, and a host leaving an EC 8+2 pool on 12 hosts leaves another host empty. If the solution loses PGs, solve again with the PG count fixed, and keep the first solution when that is infeasible. |