If you turn on the main loop dispatch event logs and look at the results in the 
g2 viewer [or dump them in ascii] you can make pretty accurate lap time 
estimates for any workload. Roughly speaking, packets take 1 lap time to arrive 
and then leave.

The “circuit-node <node-name>” game produces one elog event per frame, so you 
can look at several million frame circuit times.

Individually timestamping packets would be more precise, but calling 
clib_cpu_time_now(...) (rdtsc instrs on x86_64) twice per packet would almost 
certainly affect forwarding performance.

See https://fd.io/docs/vpp/master/gettingstarted/developers/eventviewer.html

/*?
* Control event logging of api, cli, and thread barrier events
* With no arguments, displays the current trace status.
* Name the event groups you wish to trace or stop tracing.
*
* @cliexpar
* @clistart
* elog trace api cli barrier
* elog trace api cli barrier disable
* elog trace dispatch
* elog trace circuit-node ethernet-input
* elog trace
* @cliend
* @cliexcmd{elog trace [api][cli][barrier][disable]}
?*/
/* *INDENT-OFF* */

From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Christian Hopps
Sent: Saturday, April 18, 2020 3:14 PM
To: vpp-dev <vpp-dev@lists.fd.io>
Cc: Christian Hopps <cho...@chopps.org>
Subject: [vpp-dev] Packet processing time.

The recent discussion on reference counting and barrier timing has got me 
interested in packet processing time. I realize there's a way to use "show 
runtime" along with knowledge of the arc a packet follows, but I'm curious if 
something more straight-forward has been attempted where packets are 
timestamped on ingress (or creation) and stats are collected on egress 
(transmission)?

I also have an unrelated interest in hooking into the graph 
immediate-post-transmission -- I'd like to adjust an input queue size only when 
the packet that enqueued on it is actually transmitted on the wire, and not 
just handed off downstream on the arc -- this would be a likely the same place 
packet stat collection might occur. :)

Thanks,
Chris.


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16111): https://lists.fd.io/g/vpp-dev/message/16111
Mute This Topic: https://lists.fd.io/mt/73114130/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to