diff --git a/src/vlib/main.h b/src/vlib/main.h
index 2b50b4e..e230ddf 100644
--- a/src/vlib/main.h
+++ b/src/vlib/main.h
@@ -95,11 +95,14 @@
   u32 main_loop_vectors_processed;
   u32 main_loop_nodes_processed;
 
-  /* Circular buffer of input node vector counts.
-     Indexed by low bits of
-     (main_loop_count >> VLIB_LOG2_INPUT_VECTORS_PER_MAIN_LOOP). */
-  u32 vector_counts_per_main_loop[2];
-  u32 node_counts_per_main_loop[2];
+  /* Internal node vectors, calls */
+  u64 internal_node_vectors;
+  u64 internal_node_calls;
+  u64 internal_node_vectors_last_clear;
+  u64 internal_node_calls_last_clear;
+
+  /* Instantaneous vector rate */
+  u32 internal_node_last_vectors_per_main_loop;
 
   /* Main loop hw / sw performance counters */
   void (**vlib_node_runtime_perf_counter_cbs) (struct vlib_main_t *,
@@ -323,75 +326,46 @@
   vlib_panic_with_error (vm, 0);
 }
 
-always_inline u32
-vlib_vector_input_stats_index (vlib_main_t * vm, word delta)
-{
-  u32 i;
-  i = vm->main_loop_count >> VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE;
-  ASSERT (is_pow2 (ARRAY_LEN (vm->vector_counts_per_main_loop)));
-  return (i + delta) & (ARRAY_LEN (vm->vector_counts_per_main_loop) - 1);
-}
 
-/* Estimate input rate based on previous
-   2^VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE
-   samples. */
-always_inline u32
-vlib_last_vectors_per_main_loop (vlib_main_t * vm)
-{
-  u32 i = vlib_vector_input_stats_index (vm, -1);
-  u32 n = vm->vector_counts_per_main_loop[i];
-  return n >> VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE;
-}
-
-/* Total ave vector count per iteration of main loop. */
 always_inline f64
-vlib_last_vectors_per_main_loop_as_f64 (vlib_main_t * vm)
+vlib_internal_node_vector_rate (vlib_main_t * vm)
 {
-  u32 i = vlib_vector_input_stats_index (vm, -1);
-  u32 v = vm->vector_counts_per_main_loop[i];
-  return (f64) v / (f64) (1 << VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE);
+  u64 vectors;
+  u64 calls;
+
+  calls = vm->internal_node_calls - vm->internal_node_calls_last_clear;
+
+  if (PREDICT_FALSE (calls == 0))
+    return 0.0;
+
+  vectors = vm->internal_node_vectors - vm->internal_node_vectors_last_clear;
+
+  return (f64) vectors / (f64) calls;
 }
 
-/* Total ave vectors/node count per iteration of main loop. */
-always_inline f64
-vlib_last_vector_length_per_node (vlib_main_t * vm)
+always_inline void
+vlib_clear_internal_node_vector_rate (vlib_main_t * vm)
 {
-  u32 i = vlib_vector_input_stats_index (vm, -1);
-  u32 v = vm->vector_counts_per_main_loop[i];
-  u32 n = vm->node_counts_per_main_loop[i];
-  return n == 0 ? 0 : (f64) v / (f64) n;
+  vm->internal_node_calls_last_clear = vm->internal_node_calls;
+  vm->internal_node_vectors_last_clear = vm->internal_node_vectors;
 }
 
-extern u32 wraps;
-
 always_inline void
 vlib_increment_main_loop_counter (vlib_main_t * vm)
 {
-  u32 i, c, n, v, is_wrap;
-
-  c = vm->main_loop_count++;
-
-  is_wrap = (c & pow2_mask (VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE)) == 0;
-
-  if (is_wrap)
-    wraps++;
-
-  i = vlib_vector_input_stats_index (vm, /* delta */ is_wrap);
-
-  v = is_wrap ? 0 : vm->vector_counts_per_main_loop[i];
-  n = is_wrap ? 0 : vm->node_counts_per_main_loop[i];
-
-  v += vm->main_loop_vectors_processed;
-  n += vm->main_loop_nodes_processed;
-  vm->main_loop_vectors_processed = 0;
-  vm->main_loop_nodes_processed = 0;
-  vm->vector_counts_per_main_loop[i] = v;
-  vm->node_counts_per_main_loop[i] = n;
+  vm->main_loop_count++;
+  vm->internal_node_last_vectors_per_main_loop = 0;
 
   if (PREDICT_FALSE (vm->main_loop_exit_now))
     clib_longjmp (&vm->main_loop_exit, VLIB_MAIN_LOOP_EXIT_CLI);
 }
 
+always_inline u32
+vlib_last_vectors_per_main_loop (vlib_main_t * vm)
+{
+  return vm->internal_node_last_vectors_per_main_loop;
+}
+
 always_inline void vlib_set_queue_signal_callback
   (vlib_main_t * vm, void (*fp) (vlib_main_t *))
 {
