[ixpmanager] SFLOW Under Reporting?

Nick Hilliard (INEX) nick at inex.ie
Wed Jun 28 11:34:47 IST 2023


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20230628/6f7033e8/attachment.htm>


More information about the ixpmanager mailing list