Opened 9 years ago

Closed 6 years ago

#538 closed task (wontfix)

Make isc::dns::Name reside in continuous block of memory.

Reported by: vorner Owned by: UnAssigned
Priority: low Milestone: DNS Outstanding Tasks
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 16.0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


We have a lot operations with Names in the code, comparing names takes 16% of runtime, which is mostly caused by cache misses.

The amount of cache misses could be lowered by factor of at last 3 if the whole Name and it's data resides in one continuous block of memory (it will be either retrieved as a single cache line or at last predicted by CPU prediction heuristics).

It can be accomplished for example by not using stl string and vector, but C strings and arrays. The memory can be allocated before calling the actual constructor, passing the pointer to memory both to new and using pointer arithmetics on this pointer in constructor to place the actual data behind it. The constructor should not be directly visible then and a wrapper function would have to be used to hide this, possibly error-prone, logic.

As this is quite a lot of work, we should try handling the easier tasks first and see if it helps enough. Therefore I'm giving it a lower priority.


Change History (8)

comment:1 Changed 9 years ago by stephen

  • Estimated Difficulty changed from 0.0 to 16

comment:2 Changed 9 years ago by stephen

  • Milestone changed from A-Team-Sprint-20110223 to A-Team-Task-Backlog

comment:3 Changed 9 years ago by stephen

  • Milestone A-Team-Task-Backlog deleted

Milestone A-Team-Task-Backlog deleted

comment:4 Changed 8 years ago by shane

  • Defect Severity set to N/A
  • Owner set to vorner
  • Status changed from new to assigned
  • Sub-Project set to DNS

We have a significant amount of other performance work in process right now. Do you think we should keep this ticket around as a possible suggestion, or has it been overtaken by events?

comment:5 Changed 8 years ago by vorner

  • Milestone set to New Tasks
  • Owner changed from vorner to shane


I don't know if it is overtaken already, I guess it isn't. I think that this could, in fact, be manifested even more in the in-memory data source, because if we eliminate other things that are slow, this could have stayed unchanged. We still need to access all the names on the path we search in the tree.

However, provided we really want to do the shared memory thing, we'll need to use something else than our Name classes inside anyway, so I think the thing will be overtaken by that. I don't think we have time for this now, and I think we'll not be optimising the current RBTree after the end of Y3, because we'll throw it away anyway.

comment:6 Changed 8 years ago by shane

  • Milestone New Tasks deleted
  • Owner changed from shane to UnAssigned

comment:7 Changed 6 years ago by stephen

  • Milestone set to DNS Outstanding Tasks

comment:8 Changed 6 years ago by tomek

  • Resolution set to wontfix
  • Status changed from assigned to closed

DNS and BIND10 framework is outside of scope for Kea project.
The corresponding code has been removed from Kea git repository.
If you want to follow up on DNS or former BIND10 issues, see project.

Closing ticket.

Note: See TracTickets for help on using tickets.