> -----Original Message-----
> From: Kevin Traynor [mailto:ktray...@redhat.com]
> Sent: Friday, 17 February, 2017 17:38
>
> If there are multiple queues in a poll list and only one has packets,
> the cycles polling the empty queues for packets will be counted in the
> processing time - whereas you'd expect them to be in the idle time.
>
> Is there much of a performance hit if the cycle_count_intermediate() is
> moved into the poll_cnt loop? OTOH, how much would the idle queues skew
> the counters? If it's a small amount it may be better than doing a
> cycle_count per q.

In our testing an idle iteration over 8 vhostuser and one eth port consumes on 
average 600 cycles, i.e. ~60 cycles per port. Compared to the typical cost for 
processing a packet in the range of 1000 cycles, the overhead of polling idle 
queues is not significant, unless a PMD were to poll hundreds of queues. Also 
we have seen that an rte_rdtsc() call can cost up to 20 cycles.

Below are samples of how the reported load scales with the processed packets in 
our setup with VXLAN underlay (2 ports busy, 7 ports idle):

pkts/s  busy            cycles/pkt
0               0               -
149216  4.89%           788.6220446
298432  9.61%           774.8487964
447574  14.62%  786.069622
596832  19.20%  774.3068502
745965  23.80%  767.6537934
895200  28.89%  776.7226977
1042880 33.93%  782.986241
1193243 38.14%  769.2920729
1491792 47.86%  772.0912312
1788811.5       56.96%  766.3735553
2086880 66.59%  767.9209188
2385772 75.48%  761.4203964
2684853.5       85.09%  762.6955575
2979551 93.44%  754.7385526
3274118 99.07%  728.1760908

The relation between processed packets and reported processing load is almost 
perfectly linearly and not significantly disturbed by the presence of idle 
ports.

The slight decrease of cycles/pkt is due to the increased amortization of batch 
overhead with the growing size of batches.

Based on this data, I would propose to keep the original simple approach and 
not do intermediate cycle sampling per port.

BR, Jan



_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to