Skip to content

CP-51692: Do not enable Event.next ratelimiting if Event.next is still used internally #6222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

edwintorok
Copy link
Contributor

This fixes a performance regression on feature/perf with all feature flags disabled.

By default Event.next is still used internally, so although this API is deprecated do not yet enable the throttling by default. Fixes: 3e1d8a2 ("CP-51692: Event.next: use same batching as Event.from")
Fixes: 2b4e0db ("CP-49158: [prep] Event.{from,next}: make delays configurable and prepare for task specific delays")

It slows down all synchronous API calls that create tasks, like VM.start.

Only enable the throttling when Event.next is not used internally (use-event-next = false in xapi.conf), which will eventually become the default.

The code prior to the above changes used 0 delay between checking for events, so do the same here (although this lead to a lot of inefficient wakeups of all active tasks in XAPI, whenever anything changes, it matches previous behaviour)

(the code for Event.from used a 50ms delay, which matches the default for that setting already)

…l used internally

By default Event.next is still used internally, so although this API is deprecated do not yet enable the throttling by default.
Fixes: 3e1d8a2 ("CP-51692: Event.next: use same batching as Event.from")
Fixes: 2b4e0db ("CP-49158: [prep] Event.{from,next}: make delays configurable and prepare for task specific delays")

It slows down all synchronous API calls that create tasks, like VM.start.

Only enable the throttling when Event.next is not used internally (`use-event-next = false` in xapi.conf),
which will eventually become the default.

The code prior to the above changes used 0 delay between checking for events, so do the same here (although this lead to a lot of inefficient wakeups of all active tasks in XAPI, whenever anything changes, it matches previous behaviour)

Signed-off-by: Edwin Török <[email protected]>
@edwintorok edwintorok requested a review from mg12 January 13, 2025 17:56
@edwintorok edwintorok merged commit b892c6e into xapi-project:feature/perf Jan 14, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants