[ovs-dev] [PATCH] bridge: Allow users to configure statistics update to OVSDB.

Joe Stringer joestringer at nicira.com
Tue Apr 29 23:45:11 UTC 2014


On 30 April 2014 05:29, Alex Wang <alexw at nicira.com> wrote:
>
> +dnl disable the stats update, the following 'recv' should not be updated.
> +AT_CHECK([ovs-vsctl set O . other_config:stats-update-interval=10000000])
> +for i in `seq 0 10`; do ovs-appctl time/warp 1000; done
> +for i in `seq 1 5`; do
> +    AT_CHECK([ovs-appctl netdev-dummy/receive p1
> 'eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
> +done
>

This might be a little more robust if you also check that after N seconds
(here it's 10000000) the stats are updated. The comment says disable, but
it's actually reducing the frequency to very low.


+      <column name="other_config" key="stats-update-interval"
> +              type='{"type": "integer"}'>
> +        <p>
> +          Period of statistics update to database, in milliseconds.  This
> +          option will affect the update of the <code>statistics</code>
> column
> +          in the following tables: <code>Port</code>,
> <code>Interface</code>,
> +          <code>Mirror</code>.


Could you add the default value here?


Do you have a preference on the behaviour when someone sets the
stats-update-interval to 0 or a negative number? 0 sounds like never
updating, but in this code I think it would constantly wake up the main
thread. A negative number doesn't make much sense - I don't know whether we
usually just let users set silly values or try to tell them that they're
doing something odd.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20140430/b237fc2f/attachment-0005.html>


More information about the dev mailing list