[ovs-discuss] ovs-vswitchd 100% CPU in OVN scale test

Han Zhou zhouhan at gmail.com
Thu Feb 22 20:30:45 UTC 2018

> Hi Han,
> If you investigate the patch you referenced, it's fairly small. It adds
an extra strcmp() call and an extra call to ofproto_port_open_type(). It's
most likely the extra call to ofproto_port_open_type() is causing the extra
CPU usage. Most of the processing done by calling it a second time is
> Patch one to optimize the behavior would be to factor out the common
parts of ofproto_port_open_type() so that it may be called once. Then call
the parts that differ for each port type. This should be simple. It would
be worth testing again with this patch alone to see how much of an impact
this makes.
> Patch two would be to start caching results of ofproto_port_open_type()
locally since the result is not likely to differ between repeated calls.
This would be a bit trickier to make 100% correct because you would need to
be able to reliably detect when your cached value is "dirty". This patch
would be worth pursuing if patch one does not do enough on its own.
> Mark!

The ideas looks good. One thing I am still not clear is the trigger of this
problem. I tried repeating same add-port command in a simple sandbox, but
there is no obvious difference whether I revert the patch 8c319e8b7. The
issue is only reproduced in the scale test environment. We might need to
dig deeper into this to understand the root cause. At the same time we will
try the patch you suggested.

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

More information about the discuss mailing list