Reported DNS lookup times can be inaccurate
Categories
(Core :: Networking: DNS, defect, P2)
Tracking
()
Performance Impact | medium |
People
(Reporter: acreskey, Assigned: acreskey)
References
(Blocks 1 open bug)
Details
(Keywords: perf:pageload, Whiteboard: [necko-triaged])
Based on this comment, https://bugzilla.mozilla.org/show_bug.cgi?id=1596935#c21, we may be misreporting the time spent doing DNS lookup. (As reported though the Performance Timing api).
That is, the resolved address is being used in the socket process but the reported time is only calculated once the event is processed on the main thread of the parent process, possibly including a significant processing delay.
This bug is to verify and ensure that the DNS lookup time, i.e. DomainLookupEnd, reported to the Performance Timing api is as accurate as possible.
This should be the case for both OS-based DNS and DoH.
This discrepancy in reporting may be the root of Bug 1583298 and Bug 1596935.
Assignee | ||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
Hi Greg,
Could you find someone to work on this?
Thanks.
Setting perf flags, because this is a dependency for perf bug 1583298.
Assignee | ||
Comment 3•3 years ago
|
||
Ed, I'm happy to look into this one as well - let me know if you'd like to hand it off.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
What I'm seeing so far is that the DNS lookup completes in the socket thread in DnsAndConnectSocket::OnLookupComplete()
.
We stay on the socket thread and call nsHttpTransaction::OnTransportStatus(NS_NET_STATUS_RESOLVED_HOST)
and record the DomainLookupEndTime.
I have more to look at, but so far it seems that the timing is calculated without any additional delay from a main thread hop.
Assignee | ||
Comment 6•3 years ago
|
||
Hi Dragana,
I've looked into this possible inaccuracy (see Comment 1), but it looks to me that the Domain Lookup Start and Domain Lookup End times are both correct.
We call SetDomainLookupStart
here on the socket thread.
And we call SetDomainLookupEnd
here also on the socket thread with out additional main thread event processing.
Let me know if I'm missing anything.
Comment 7•3 years ago
|
||
Thank you for investigating. This must have been fixed at some moment.
Description
•