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: Defer the actual allocation of the ring buffer entries #11171

Merged
merged 2 commits into from
Jan 14, 2022

Conversation

rgacogne
Copy link
Member

Short description

It is a bit cumbersome to have to call Rings::init() when we are ready, but it prevents allocating the default number of entries, 10k, which is quite a lot for small setups. Of course the memory was released once the configuration had been parsed, but it might be too late in some cases, and we would end up with a bigger reported memory usage than our actual one since heap shrinkage seldom happens.

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)

It is a bit cumbersome to have to call `Rings::init()` when we are
ready, but it prevents allocating the default number of entries,
10k, which is quite a lot for small setups. Of course the memory
was released once the configuration had been parsed, but it might
be too late in some cases, and we would end up with a bigger reported
memory usage than our actual one since heap shrinkage seldom happens.
@rgacogne rgacogne force-pushed the ddist-defer-rings-creation branch from 04acd20 to 780efb2 Compare January 14, 2022 09:06
@rgacogne
Copy link
Member Author

Rebased to fix a conflict.

@rgacogne rgacogne merged commit c8ede45 into PowerDNS:master Jan 14, 2022
@rgacogne rgacogne deleted the ddist-defer-rings-creation branch January 14, 2022 13:16
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