Opened 2 years ago

Closed 19 months ago

#5552 closed enhancement (duplicate)

Kea should be able to print performance metrics

Reported by: tomek Owned by: tomek
Priority: medium Milestone: Kea1.5
Component: dhcp4 Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


When debugging an issue, it became clear that finding out how long it takes Kea to process a packet and actually send a response is difficult. It requires matching different log entries, which sometimes is very problematic if there are multiple packets sent from a client.

We should develop a way to measure how long it takes to process a packet. The easiest way will be to use a stopwatch (see src/lib/util/stopwatch.h). I think we should remember the timestamp somewhere in Pkt4 (and possibly Pkt6) very early when the packet is received (perhaps in Pkt4 constructor?) and then print the interval value once the response packet is being sent out.

I think it would be useful to have separate logger for this, maybe call it performance or perf? If the concept proves to be useful, we may soon extend it to print out more detailed information about different stages (it took X ms to find host reservation, Y ms to select a lease, Z ms to do DNS update etc).


Change History (5)

comment:1 Changed 2 years ago by tomek

  • Owner set to tomek
  • Status changed from new to assigned

comment:2 Changed 23 months ago by tomek

  • Milestone changed from Kea1.4 to Kea1.4-final
  • Priority changed from high to medium

As discussed on 2018-05-10 call, moving to 1.4-final as medium.

comment:3 Changed 22 months ago by tomek

  • Milestone changed from Kea1.4-final to Kea1.5

comment:4 Changed 21 months ago by nbk1

There might be an opportunity to introduce support for generic visualization on where the code spends time. Several folks have reported to have gained impressive insights when utilizing so called flame graphs:

comment:5 Changed 19 months ago by tomek

  • Resolution set to duplicate
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.