andrijapanicsb opened a new pull request, #14794: URL: https://github.com/apache/cloudstack/pull/14794
## What changes Add a global setting, `async.job.heartbeat.interval.ms`, to control how often a management server scans for queued async jobs. It accepts 500–2000 ms and takes effect after management server restart. The default is the existing 2000 ms cadence. An out-of-range integer produces a warning and falls back to 2000 ms. The scheduler still acquires the cluster heartbeat lock, checks maintenance state and uses the same queue claim and executor paths. Shortening the interval also increases standalone wake-up scans and database polling. The garbage collector retains its own interval. ## Why Work eligible for dispatch can sit idle until a management server's next heartbeat. The dormant per-queue dispatcher bypasses the heartbeat's lock and maintenance check. Tuning the existing scheduler lets operators measure the latency/load trade-off without introducing a competing dispatch path. ## Tests and measurements The focused `AsyncJobManagerImplTest` Maven reactor run passed on the base revision (13 tests) and with the change (16 tests). The three additional tests cover the default, supported intervals and out-of-range values. On an unmodified two-management-server 24.0.0 KVM test deployment, 30 isolated successful reboots had a median enqueue-to-dispatch delay of 618.5 ms, p95 of 1116 ms and a range of 38–1164 ms. Dispatch-to-worker-start took 15 ms at the median. In a separate batch of three successful same-VM volume attachments, the two waiting successors were dispatched 174 ms and 943 ms after the preceding worker logged completion. Completion is a proxy for queue-slot release. The two management servers had staggered heartbeat phases. A matched packaged-build comparison at 2000 ms and 1000 ms is pending. This PR is a draft while we measure latency and database load. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
