On 01/12/2017 04:49 PM, Ciara Loftus wrote: > This patch is part of the OVS-DPDK performance optimizations presented > on the OVS fall conference > (http://openvswitch.org/support/ovscon2016/8/1400-gray.pdf) > > The Exact Match Cache does not perform well in use cases with a high > numbers of parallel packet flows. When the flow count exceeds 8k, which > is the size of the EMC, 'thrashing' occurs. Subsequent packets incur > EMC misses and lead to the insertion of new entries, which are likely > already overwritten by the time the next packet of a flow arrives. > > The extra cost of useless EMC insertions and failed EMC lookups degrades > the performance of the netdev-dpdk datapath up to 30% compared to the > pure performance of the dpcls classifier with EMC disabled. Profiling > has shown that the bulk of the degradation is caused by the EMC > insertions. > > To avoid this degradation we apply 'probabilistic' EMC insertions, whereby > an EMC miss only results in an EMC insertion with a random probability > of P=1/N (N integer). With this model, the insertion overhead of the EMC > can be reduced by a factor N, while the EMC speedup is maintained for a > small to medium number of flows. Probabilistic insertion can be > implemented with minimal run-time cost and naturally favors long-lived > flows. > > Different values for P from 1/100 to 1/4000 were validated and benchmarked > when creating this patch. Not much variance between different probabilities > was observed. > > We chose P=1/100 because it gives almost the same improvement as lower > probabilities while reaching the EMC capacity and thus optimal performance > quicker than the lower probabilities. > > For P=1/100, the EMC reached full capacity after 843ms when subjecting the > datapath with 100000 long-lived flows at 14.8 Mpps. This is much quicker > compared to P=1/500 and P=1/1000, which took 3792ms and 7370ms > respectively.
The performance results are very impressive - it looks like ~50% performance improvement after about 10K flows. Did you measure any negative effects when the the emc is not full? What about about only using this type of scheme once the emc is full or above a certain threshold? Kevin. > > lib/dpif-netdev.c | 20 ++++++++++++++++++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
