On 19 April 2016 at 12:56, Adil Ahmad <adilahma...@gmail.com> wrote: > Hi, > > I am trying to decrease the time that OVS takes to update its packet/byte > counters. I was previously told that the line 898 of ofproto-dpif-upcall.c > which is part of function udpif_validator is used to set the timer. The line > is as follows: > > // Original > poll_timer_wait_until(start_time + MIN(ofproto_max_idle, 500)); > > //Changed > poll_timer_wait_until(start_time + MIN(ofproto_max_idle, 1));
Note that this timer simply sets the typical time that the revalidator thread will sleep *after finishing all of its work*, so it doesn't guarantee that stats will be synchronized every 1ms. > I changed it to 1 and I can now get updated counters at ~1ms frequency. > However, I have noticed that after about 30 ms, there is a sudden jump and > the stats handler takes a jump by about ~50ms. My controller is POX based > and my timer is python datetime timer with microsecond granularity. > > Can anyone tell me why I see the jump? What do you mean by "jump"? All you've done is increase the consistency of stats within OVS - the kernel module is more closely synchronised with the OpenFlow rules in userspace. If you're fetching the stats via OpenFlow, then the main thread might not be able to wake up and provide stats as quickly as you want. Even if that is possible, there's still a whole host of other potential pitfalls to trying to get realtime stats. _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss