[ixpmanager] SFLOW Under Reporting?
Nick Hilliard (INEX)
nick at inex.ie
Tue Jun 27 10:49:52 IST 2023
Ian Chilton wrote on 27/06/2023 10:18:
> Added `use threads;` and did this 1 line fix:
>
> - process_rrd($interval, $matrix, $rrdcached);
> + threads->create('process_rrd', $interval, $matrix,
> $rrdcached);
>
> Bingo!
>
> We're now doing 736G according to MRTG, the life sflow graphs are
> reporting 332G, now my new instance in a VM is giving 703G and on bare
> metal 705G.
That sounds a lot better. In terms of approaches, I was considering a
straightforward fork, but probably the threads approach is simpler in
this case. The complete patch would include a change to the default
timer interval from 60s to 300s, and also to make a copy of $matrix
before passing to the thread, to ensure that concurrency problems are
ruled out.
> I still think it's worth re-writing this in Go for performance, which I
> can look at in the future, but for now that appears to have resolved
> things.
the performance bottleneck is the rrd/rrdcached flush process, not the
perl bits. Rewriting in go won't fix this.
Nick
More information about the ixpmanager
mailing list