Skip to content

Commit

Permalink
Reorder the sequence in sfl_agent_tick() so that when a poller
Browse files Browse the repository at this point in the history
generates a new counter sample it is flushed to the network
 right away.
This more or less eliminates the time-dither issue that impairs the
short-term accuracy of sFlow counters when the polling interval
is short, as described here:
ftp://ftp.netperf.org/papers/high_freq_sflow/hf_sflow_counters.pdf
  • Loading branch information
sflow committed Aug 19, 2016
1 parent dc86345 commit 18d33d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sflow/sflow_agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ void sfl_agent_tick(SFLAgent *agent, time_t now)
SFLPoller *pl;

agent->now = now;
/* pollers use ticks to decide when to ask for counters */
for( pl = agent->pollers; pl != NULL; pl = pl->nxt) sfl_poller_tick(pl, now);
/* receivers use ticks to flush send data */
for( rcv = agent->receivers; rcv != NULL; rcv = rcv->nxt) sfl_receiver_tick(rcv, now);
/* samplers use ticks to decide when they are sampling too fast */
for( sm = agent->samplers; sm != NULL; sm = sm->nxt) sfl_sampler_tick(sm, now);
/* pollers use ticks to decide when to ask for counters */
for( pl = agent->pollers; pl != NULL; pl = pl->nxt) sfl_poller_tick(pl, now);
}

/*_________________---------------------------__________________
Expand Down

0 comments on commit 18d33d1

Please sign in to comment.