Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Deresource & uphash: gigabit DNSSEC root-server performance #4467
This commit does a number of unrelated things that are difficult to untangle. We remove the ASCII DNSResourceRecord from the hot path of packet assembly in auth. It is still around for looking up various other things, and these can go later.
Here you will find a review of all the changes in this PR.
In short the goal was to replace the DNSResourceRecord, which contains a human readable string in its content field ("126.96.36.199"), by DNSZoneRecord. The DNSZoneRecord contains the same kind of information as the DNSResourceRecord, except mostly in binary, parsed form, that can be copied straight into a response packet.
The DNSZoneRecord in turn consists of an auth field, domain_id, ECS scopeMask, some DNSSEC metadata, plus a DNSRecord. The DNSRecord has things like name, type, class, ttl, place and actual content.
To enable this move to DNSZoneRecord, which saves a TON of ascii-roundtripping, a lot had to happen. Some things are not strictly related to this change but do conflict with it so went in on the same go:
Things that might cause problems:
Reasonable followup PRs:
All measured on a gigabit/s network, which gets saturated by this branch. 4.0.1 was tweaked for maximum performance, 'deresource' mostly left at default values. 4 core Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz.