Subject: RE: Cflowd Memory leak. I think that this is the solution.
From: Albert Collet (albert.collet@telindus.es)
Date: Fri Feb 22 2002 - 08:36:57 CST
Hi Roman, Can you instruct me on how to do the "unified diffs" ? (only a fast how-to). Thinking about the memory leak problem, Perhaps it's better to get the whole "if" that controls the close and the timestamp for the raw-files and put it after the "for" (before the return(numpackets)). I think that it's better because the "pending" flows will not be written to disk if we clear the tables. So, we must clear the tables after writing the flows. What do you think ? Another thinking it's about the design of cflowd. You can see that at the begin there's an OpenRawFlowLogs() (for the arts++ files). The CloseRawFlowLogs() it's executed when the SIGTERM signal is recieved. In the middle there isn't any "WriteFlowLogs()" or something similar, so it's possible that the Close() flushes all the stored, this is, acumulated data (here's the reason of the "memory leak") to disk. Is this possible ? Is this the normal behaviour of cflowd ? As you can see the tables are only cleared when they are tranferred to the Collector (cfdcollect), see HandleCollectorClient() function. thinking more... thanks. > -----Mensaje original----- > De: Roman Hochuli [SMTP:r.hochuli@gpstechnik.ch] > Enviado el: viernes, 22 de febrero de 2002 11:57 > Para: Albert Collet > Asunto: Re: Cflowd Memory leak. I think that this is the solution. > > Hello Albert > > > I noticed that it has a memory leak. This memory leak increases the used > > memory about 8K each time. > > > This effect can lead to: > > > > Hang the machine or when the cflowd process has consumed lots of megs > cflowd > > cannot write the full raw-files resulting in less traffic being reported > and > > the overall system performance goes down. > > > I noticed that too. It troubled me for the last few day. Unfortunatly I > had not enough time to throw a look at the code. > > Anyway I applied your patch just now and am starting testing your > version. Thank you. I will give feedback in one or two days. > > Just a little side note: Please submit patches as so-called "unified > diffs". > > That way it is possible to use the "patch" programm to apply your patch. > > > -- > Kind regards, > Roman Hochuli > > GPS-Technik AG > Zürcherstrasse 139 > 8952 Schlieren > Switzerland > Tel +41-1-7329977 > Fax +41-1-7311840 > X-NCC-RegID: ch.gps > -- Help mailto:majordomo@net.doit.wisc.edu and say "help" in message body Unsubscribe mailto:majordomo@net.doit.wisc.edu and say "unsubscribe flowscan" in message body Archive http://net.doit.wisc.edu/~plonka/list/flowscan/archive/
This archive was generated by hypermail 2b25 : Fri Feb 22 2002 - 08:50:09 CST