vlib_node_runtime_update_stats(...) From: Nagaraju Vemuri <nagarajuiit...@gmail.com> Sent: Friday, March 27, 2020 12:54 PM To: Dave Barach (dbarach) <dbar...@cisco.com> Cc: vpp-dev@lists.fd.io Subject: Re: [vpp-dev] clocks stored in vlib_node_runtime_t #vpp #counters
Thanks for your reply Dave. Can you please point me to the code where we copy into 64 bit counters when 32 bit overflows? When we issue the command "show runtime max", do we print the data from 64 bit counters? I made max_clock variable 64 bit type locally to experiment. And found different output from "show runtime max". Max clock was 7.49e9 with 64 bit field, whereas it was within 4e9(because of 32 bit limitation) with 32 bit field. Regards, Nagaraju On Fri, Mar 27, 2020 at 4:52 AM Dave Barach (dbarach) <dbar...@cisco.com<mailto:dbar...@cisco.com>> wrote: We scrape the 32-bit node-runtime counters back into the 64 bit node counters when they overflow. It should take a good long time for a 32-bit counter to overflow – O(1 seconds’ worth of node runtime) – we do this to reduce the cache footprint of the node-runtime. HTH... Dave From: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> On Behalf Of nagarajuiit...@gmail.com<mailto:nagarajuiit...@gmail.com> Sent: Friday, March 27, 2020 1:59 AM To: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Subject: [vpp-dev] clocks stored in vlib_node_runtime_t #vpp #counters Hi, I see that clib_cpu_time_now() returns u64 type data. And we are updating max clocks spent by a node in vlib_node_runtime_t using these timestamps. Why are we using u32 types in vlib_node_runtime_t? Because of this, it can only hold data within 2 seconds and anything above 32 bit range overflows in our system. Really appreciate your help. Thanks, Nagaraju -- Thanks, Nagaraju Vemuri
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15906): https://lists.fd.io/g/vpp-dev/message/15906 Mute This Topic: https://lists.fd.io/mt/72581795/21656 Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452 Mute #counters: https://lists.fd.io/mk?hashtag=counters&subid=1480452 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-