[ovs-discuss] Way to get average time spent

O Mahony, Billy billy.o.mahony at intel.com
Fri Mar 23 11:23:08 UTC 2018


Hi Krish,

You will need to compile with debug info and also with in-lining turned off. Many functions get in-lined and in that case the perf report cannot attribute time to the in-lined function but only to the caller. Obviously performance overall drops in that case but the relative cost of each function should not be affected.

You should also checkout Brendan Gregg’s flame graphs http://www.brendangregg.com/flamegraphs.html as a visualization of cpu cost.

If you are using dpdk-ovs then you should pin the PMD to an isolated core and use perf to sample the call stack on that core only. Details of pinning & isolation are in the dpdk sections of the ovs documentation.

I have not run perf on kernel OvS. That would be a matter of using the correct flags to sample by kernel module or thread.

You will need to be reasonably familiar with the code in order to interpret the results. These are some blog posts on the EMC and netdev datapath classifier for OvS-DPDK :
https://software.intel.com/en-us/articles/the-open-vswitch-exact-match-cache
https://software.intel.com/en-us/articles/ovs-dpdk-datapath-classifier

Again for OvS-DPDK you could also use the output from ovs-appctl dpcls/pmd-stats-show. By using a very small number of flows you can ensure that your traffic his hitting the EMC and you can measure the EMC lookup cost. Then you can disable the EMC (using emc-insert-inv-prob setting) and measure the classifier lookup cost. Be aware those cost include the rx and tx costs which actually decrease as traffic increases – as the packet batch size increases leadings to lower per-packet tx/rx cost.

Regards,
Billy.

From: ovs-discuss-bounces at openvswitch.org [mailto:ovs-discuss-bounces at openvswitch.org] On Behalf Of Krish
Sent: Thursday, March 15, 2018 2:52 AM
To: Justin Pettit <jpettit at ovn.org>; Greg Rose <gvrose8192 at gmail.com>; ovs-discuss at openvswitch.org
Subject: Re: [ovs-discuss] Way to get average time spent

Justin

Thanks for telling me about perf tool. I think its a really good tool for finding hotspots. But I don't know how to test OVS caches with the perf tool.

Greg
Can you please throw some light on this matter. If perf is the right tool for getting time spent in EMC,datapath classifier and packet header extraction?
If yes, please tell me the way to do that? Which part I should perf for?


Thanks and Regards


On Wed, Mar 14, 2018 at 4:31 PM, Krish <attkillrocks at gmail.com<mailto:attkillrocks at gmail.com>> wrote:
Justin

Thanks for telling me about perf tool. I think its a really good tool for finding hotspots. But I don't know how to test OVS caches with the perf tool.

Greg
Can you please throw some light on this matter. If perf is the right tool for getting time spent in EMC,datapath classifier and packet header extraction?
If yes, please tell me the way to do that? Which part I should perf for?


Thanks and Regards

On Tue, Mar 13, 2018 at 2:08 AM, Justin Pettit <jpettit at ovn.org<mailto:jpettit at ovn.org>> wrote:
Greg (cc'd) could probably provide you a better answer, but I suspect the perf tool is a good place to start.

--Justin


> On Mar 12, 2018, at 3:24 AM, Krish <attkillrocks at gmail.com<mailto:attkillrocks at gmail.com>> wrote:
>
> Hi users,
>
> I need to get the average time spent in packet extraction then in first level cache , second level cache. I don't know the way to measure that.
>
> Can anyone please help me pointing to right direction?
> I think, I need to modify some code. Please guide me if I am right or wrong.
>
>
> Looking forward for a response from someone.
>
> Thanks
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org<mailto:discuss at openvswitch.org>
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20180323/f2222d41/attachment-0001.html>


More information about the discuss mailing list