On 11 Sep 2024, at 14:47, Peter Spreadborough via dev wrote:
> Hi all, > > I'm looking at the performance of OVS-DPDK when offloading up to 1M flows > to hardware and I'm seeing an excessive amount of time being spent in the > clock_gettime() call. For the samples I have taken using Intel's VTune > profiler I'm seeing just under a quarter of the entire time in > clock_gettime(). > > Is this expected and/or are there any build or runtime options to alleviate > this? It’s been a while since I used perf to profile OVS-DPDK, but I can’t remember clock_gettime() popped up high on the list. Is this with 3.1 only? Can you try the latest main or 3.4? Just to be sure it’s not something already fixed. In addition, do you see this also with HW offload disabled? Also, I noticed that if no packets are received in a processing loop, we will call pmd_thread_ctx_time_update(). So it might be a side effect of the PMD thread not having anything to do due to hardware offload, and it’s calling this every PMD loop round. You might want to take a loop at the PMD stats, which might indicate the CPU is not busy at all, so it should not be a problem. https://github.com/openvswitch/ovs/blob/234e626198a4d99b6839061ca7e123f5c31c5ebe/lib/dpif-netdev.c#L7317 > I'm testing on a Dell R760 server running Redhat Linux 9.1 > (5.14.0-162.6.1.el9_1.x86_64) > > Top Hotspots > Function Module CPU Time % of CPU Time > clock_gettime libc.so.6 97.908s 22.2% > dp_netdev_process_rxq_port ovs-vswitchd 78.844s 17.9% > pmd_perf_end_iteration ovs-vswitchd 35.506s 8.0% > bnxt_rep_rx_burst ovs-vswitchd 35.330s 8.0% > bnxt_recv_pkts ovs-vswitchd 33.970s 7.7% > [Others] N/A* 159.643s 36.2% > > > The call stack of the clock_gettime() calls: > libc.so.6 ! clock_gettime > ovs-vswitchd ! time_usec + 0x2f > ovs-vswitchd ! pmd_thread_main + 0x57c > ovs-vswitchd ! ovsthread_wrapper + 0x74 > libc.so.6 ! start_thread + 0x2d1 > libc.so.6 ! __clone3 + 0x2f > > Thanks, > > Pete _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
