in reply to Re^2: leak detection in other (non-perl) processes
in thread leak detection in other (non-perl) processes
I'm not exactly sure I understand what you want to achieve (finding out there are leaks vs. what exactly they are caused by), but as you're talking about non-Perl processes, it sounds like you're looking for generic tools like valgrind.
Due to the complexity of the tool, however, it's beyond me why you would want to rewrite it in Perl (not to mention the ensuing performance issues...).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: leak detection in other (non-perl) processes
by apprentice (Scribe) on Mar 23, 2012 at 19:53 UTC | |
So, I get a baseline, like say '17' open file descriptors (FDs) for process X. Then I loop for 'n' iterations, killing process Y, waiting a bit, getting current FD count, storing it, next. Now, I may have a list that looks like one of the following:
"Peace, love, and Perl...well, okay, mostly just Perl!" --me Apprentice | [reply] [d/l] |
by BrowserUk (Patriarch) on Mar 23, 2012 at 20:52 UTC | |
Maybe something like this will get you started. Try playing with the threshhold and moving average period (see examples):
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |
by Eliya (Vicar) on Mar 23, 2012 at 20:17 UTC | |
As long as you don't set a fixed time frame for the observation/analysis, everything will be just a more or less useful heuristic. Anyhow, I think you want to fit a trend line through the entire data1, and if it isn't flat, you likely have a leak. This assumes the evaluation interval is (considerably) longer than the period of any cyclic behavior you might observe. ___ 1 if you're worried about outliers, you might want to look for a statistics package that can compute the fit based on minimizing linear deviations, instead of squared deviations, as done in a standard "least squares" fit (see also LAD). | [reply] |