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: Cache sharding, recvmmsg and CPU pinning support #5576

Merged
merged 10 commits into from Sep 27, 2017

Conversation

@rgacogne
Copy link
Member

@rgacogne rgacogne commented Aug 2, 2017

Short description

  • Optionally divide the packet cache into several shards, each protected by its own lock, to reduce lock contention
  • Add support for recvmmsg(), sendmmsg() and accept4() when available to reduce the number of system calls
  • Add support for pinning UDP listener threads to specific CPU cores
  • Several small optimizations including not using errno when we don't have to and not generating a UUID if we don't need it

A large part of the PR is just moving code around to be able to process queries one-by-one (with recvmsg(), the default) or in batch (with recvmmsg()).

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
@rgacogne rgacogne added this to the dnsdist-1.2.0 milestone Aug 2, 2017
@rgacogne rgacogne modified the milestones: dnsdist-1.3.0, dnsdist-1.2.0 Aug 3, 2017
@rgacogne rgacogne force-pushed the rgacogne:dnsdist-sharded-mmsg branch from d28196c to 2d67e8c Aug 10, 2017
@rgacogne rgacogne force-pushed the rgacogne:dnsdist-sharded-mmsg branch from 2d67e8c to ab1b354 Aug 22, 2017
rgacogne added 10 commits Jul 11, 2017
Also make the cache insert lock optionally deferrable.
…mmsg()
POSIX.1c made `errno` a thread-local, meaning its performance is
far worse than the one of a local variable.
* CPU pinning
* Cache sharding / deferred locking
* `recvmmsg()` use
@rgacogne rgacogne force-pushed the rgacogne:dnsdist-sharded-mmsg branch from ab1b354 to 4bc167b Sep 5, 2017
@rgacogne rgacogne mentioned this pull request Sep 15, 2017
2 of 6 tasks complete
@ahupowerdns ahupowerdns merged commit 8b3f9b4 into PowerDNS:master Sep 27, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rgacogne rgacogne deleted the rgacogne:dnsdist-sharded-mmsg branch Sep 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants