in reply to How can I maximize performance for my router netflow analyzer? (was: Perl Performance Question)

Another thing you could try to use is a pipe. Try writing a simple gather-script that just spits out the data to the standard output. Then write an independent process-script that does an open "gather-script |" and processes the data. This second one is the one that you execute. That way you've seperated the gathering and processing into two processes but there's no coding of forking or anything, and the buffering is handled by the OS.

-I went outside... and then I came back in!!!!

Replies are listed 'Best First'.
Re: Re: Perl Performance Question
by nardo (Friar) on Jun 13, 2001 at 22:42 UTC
    The problem with that is that if he is dropping packets, his machine isn't fast enough to process them in real-time which means the pipe will eventually fill up and writes to the pipe will block, thus causing him to miss packets sent while the write is blocked.