Report information
The Basics
Id:
45802
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
Cc:
AdminCc:

BugTracker
Version Fixed:
9.12.0
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
(no value)
Priority:
P2 Normal
Severity:
S2 Normal
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
(no value)
Area:
feature

Dates
Created:Thu, 17 Aug 2017 03:43:20 -0400
Updated:Tue, 19 Sep 2017 15:45:30 -0400
Closed:Tue, 19 Sep 2017 15:45:30 -0400



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Subject: When rendering an rdataset towire, re-use the name compression offset
Date: Thu, 17 Aug 2017 13:13:09 +0530
From: "Mukund Sivaraman" <muks@isc.org>
To: bind-suggest@isc.org
When writing an rdataset to wire, re-use the name compression offset from the second RR onwards instead of attempting to find compression table matches for every subsequent RR in the set. Mukund
On Wed Aug 16 22:04:49 2017, muks wrote: > Please see rt45802, and results of root zone perfomance test here: > > https://perflab.isc.org/#/run/test/59954c506a9745f45d95486f/ > > It offers a very modest performance improvement of single digit > kQPS. Before I write unit tests for dns_name_towire2(), do we want to > keep this? > > Mukund Moved DNS_NAMEATTR_NOCOMPRESS and DNS_COMPRESS_GLOBAL14 tests be done in the first if and unconditional save the offset if the pointer is present. This allows for future code to change these flags between calls to dns_name_towire2. *comp_offsetp needs to be set to the original value of go if gp.length == 0 or otherwise you end up with a pointer to a pointer. I've got no problems with keeping it. If we ever preserve owner names on a per record basis we can back this out then. Anyway look at 8144b8d7f8
On Tue Aug 22 03:57:45 2017, marka wrote: > Anyway look at 8144b8d7f8 Mukund, please look at this.
On Mon Sep 11 07:20:29 2017, muks wrote: > Hi Mark > > On Tue, Aug 22, 2017 at 03:57:46AM +0000, Mark Andrews via RT wrote: > > Moved DNS_NAMEATTR_NOCOMPRESS and DNS_COMPRESS_GLOBAL14 tests be done > > in the first if and unconditional save the offset if the pointer is > > present. This allows for future code to change these flags between > > calls to dns_name_towire2. > > Though moving this check from the bottom of the function makes it more > robust, for performance reasons I left it the way it was so that the > condition is evaluated only once for the first towire call. > > Note that we already assume that the caller is calling a second time > with comp_offsetp != NULL && *comp_offsetp < 0x4000 with a correct > offset for the *identical name* that was rendered previously. > > So we did not perform many compares in the "if" at the start to make the > second dns_name_towire() call as a fastpath. Its use-case is unlikely to > be outside towiresorted() where the owner names are always compressed. > > I've pushed a slight tweak to the branch.. please check it. > > Mukund looks fine.
no tests were changed. existing tests pass. resolving. On Tue Sep 12 16:25:42 2017, marka wrote: > 4718. [func] Avoid seaching for a owner name compression pointer > more than once when writing out a RRset. [RT #45802]