Skip to content
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

dnsdist: Only allocate the health-check mplexer when needed #11437

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

rgacogne
Copy link
Member

@rgacogne rgacogne commented Mar 21, 2022

Short description

When health-checking is disabled, or when a check delay longer than one second is used, there is no need to allocate a new multiplexer object every second.

The CPU gain here is not huge, but it might matter for low-end devices, as mentioned in #11422. Since most of the CPU usage here seems to be caused by our handling of UDP timeouts, where we scan setMaxUDPOutstanding 1 buckets every second, a much better improvement for these low-end devices can be reached on master by setting setRandomizedIdsOverUDP(true) 2, allowing us to only scan the buckets that are actually in use.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

When health-checking is disabled, or when a check delay longer than one
second is used, there is no need to allocate a new multiplexer object
every second.
@rgacogne rgacogne merged commit b687745 into PowerDNS:master Mar 28, 2022
@rgacogne rgacogne deleted the ddist-healthcheck-mplexer branch March 28, 2022 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants