pcp
[Top] [All Lists]

Re: automatic derived metrics slowing down remote pcp clients, esp. pmlo

To: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Subject: Re: automatic derived metrics slowing down remote pcp clients, esp. pmlogconf
From: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Date: Sun, 15 May 2016 08:22:42 +1000
Cc: pcp developers <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <20160514220852.GD1418@xxxxxxxxxx>
References: <20160514193945.GC1418@xxxxxxxxxx> <d2f3f657-fe0b-c967-b7c0-e4603c9f5f9c@xxxxxxxxxx> <20160514220852.GD1418@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0
On 05/15/2016 08:08 AM, Frank Ch. Eigler wrote:
Hi -

since derived metrics are never logged (they're defined client side only),
the above makes the most sense. This is akin to the call to the call to
__pmSetInternalState(PM_STATE_PMCS) in tools such as pmlogextract and other
places. Looks like there are few othertools that need to set this too.

OK, how about:

diff --git a/src/pmlogconf/pmlogconf.sh b/src/pmlogconf/pmlogconf.sh
index 3531c676130e..dfd2e92137f4 100755
--- a/src/pmlogconf/pmlogconf.sh
+++ b/src/pmlogconf/pmlogconf.sh
@@ -28,6 +28,11 @@
 # Get standard environment
 . $PCP_DIR/etc/pcp.env

+# Clear this part to ensure many short-lived pmprobe children
+# don't waste time analyzing derived metrics.
+PCP_DERIVED_CONFIG=
+export PCP_DERIVED_CONFIG
+
 status=1
 tmp=`mktemp -d /tmp/pcp.XXXXXXXXX` || exit 1
 trap "rm -rf $tmp; exit \$status" 0 1 2 3 15



patch looks good - HOWEVER, thinking about this a bit more, ideally if
a pmlogger config (or pmlogconf config) asks for a derived metric to be logged,
it should expand this and log the leaf operand metrics.

I just ran some tests and if you have a pmlogger config that asks for a
derived metric to be logged, e.g. disk.dev.util, it will be. IMO it would be 
more
correct to log the operands (i.e. disk.dev.avactive), and then clients would 
derive
disk.dev.util on replay). pmlogger is a bit schizo - it's more a client in many 
ways ...

Cheers

<Prev in Thread] Current Thread [Next in Thread>