[ldns-users] Question about ldns packet timings

Ryan Braud rbraud at gmail.com
Fri Mar 20 21:32:16 UTC 2015


Ideally, yes, you would use kernel timestamps for both sent and received
packets.  However, ldns does not give you (me) the ability to do this from
queries sent via ldns_resolver_query() since it keeps the sockets
internally.  In theory, I could just build the packet using ldns and send
the packets myself on sockets I create (so that I can set the proper socket
options), but it would be nice if ldns did this for me.

Ryan

On Fri, Mar 20, 2015 at 2:10 PM, Robert Edmonds <edmonds at debian.org> wrote:

> Ryan Braud wrote:
> > Hi everyone, I'm not sure if this is the correct list for this question,
> > but I had a question/enhancement request for ldns.  Currently, the
> function
> > ldns_pkt_querytime() returns the amount of time a request took, measured
> > with gettimeofday().  I was wondering if there was a good reason why this
> > time is not calculated from a kernel timestamp via the SIOCGSTAMP ioctl?
> > We are using libldns in our production environment and when the processor
> > gets busy, we end up with random spikes in latency due to scheduling
> > overhead, etc.
>
> Hi, Ryan:
>
> Doesn't SIOCGSTAMP only give you the timestamp of the last received
> packet?  If you want the "real" request latency, wouldn't you want
> kernel timestamps on both the sent and received packets?
>
> (I think you can do this, at least on Linux, with SO_TIMESTAMPING.)
>
> --
> Robert Edmonds
> edmonds at debian.org
> _______________________________________________
> ldns-users mailing list
> ldns-users at open.nlnetlabs.nl
> http://open.nlnetlabs.nl/mailman/listinfo/ldns-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20150320/d2a1c3ff/attachment.htm>


More information about the ldns-users mailing list