[ixpmanager] SFLOW Under Reporting?
André Grüneberg
andre.grueneberg at bcix.de
Thu Jun 29 08:52:38 IST 2023
Hi,
I didn't know where exactly to jump into the conversation. So I'd take the
tail.
I eventually followed another lead. What happens while the
sflow-to-rrd-handler script is flushing data into RRDs?
Well, it's not reading from the input pipe fed by sflowtool. Ok, there
should be a buffer on the pipe?!
But eventually sflowtool will block processing, because it cannot feed data
into the output pipe.
On the other end of sflowtool, it receives UDP datagrams. Isn't there a
buffer? And indeed, Linux is buffering the inbound flow of UDP.
So I looked at `netstat -uanp | grep 6343` ... second column (Recv-Q) show
the use of the buffer. From time to time (during flush), the buffer is
filled ... and maxes out at ~200k.
Next I increased the buffer size to 25M using sysctl:
net.core.rmem_max=26214400
net.core.rmem_default=26214400
After a restart of the script, I can see that the receive queue fills up to
~10 MiB.
Looking at the graphs I see an improvement (
https://www.bcix.de/ixp/statistics/vlan/1/ipv4/bits, ~9:30 today).
Maybe this helps others?!
André
On Wed, 28 Jun 2023 at 12:34, Nick Hilliard (INEX) via ixpmanager <
ixpmanager at inex.ie> wrote:
> Ian Chilton wrote on 28/06/2023 07:54:
>
> Anyone have experience with threads in Perl and able to suggest why?
>
>
> shorter answer: https://twitter.com/nedbat/status/194452404794691584
>
> Probably what's happening here is that there is some thread magic going on
> behind the scenes which is creating anonymous references to functions /
> variable. If this happens in perl, and the anonymous reference is lost,
> then garbage collection won't free up these resources until the script
> exits. Although not very sexy, it would probably be safer to fork a
> subprocess to handle the flush, rather than using threads. Even this
> approach needs to be handled carefully (i.e. close the sflowtool pipe for
> the child process, ensure the child process has a well defined exit point,
> and put in some magic to ensure that orderly shutdowns work).
>
> Nick
>
> _______________________________________________
> INEX IXP Manager mailing list
> ixpmanager at inex.ie
> Unsubscribe or change options here:
> https://www.inex.ie/mailman/listinfo/ixpmanager
>
--
André Grüneberg, Managing Director
andre.grueneberg at bcix.de
+49 30 2332195 42
BCIX Management GmbH
Albrechtstr. 110
12103 Berlin
Germany
Geschäftsführer/Managing Directors: Jens Lietzmann, André Grüneberg
Handelsregister: Amtsgericht Charlottenburg, HRB 143581 B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20230629/ee011ee7/attachment.htm>
More information about the ixpmanager
mailing list