Well, the patch I attached to bug#128 *does* convert all ints to floats
when doing sums, but it has not yet been applied to trunk as of 1078.

The issue has never been RRD; you're right RRD always uses floats.  The
issue is that gmetad increments val.d for float sources and val.int32
(or val.uint32) for integer sources.  But only one of these *separate*
totals is written out to the summary RRD because the metric can have
only one of these types.  So, if you have different types of sources,
you end up randomly toggling the summary graph from the integer sum to
the float sum, and never recording the actual total.  This is bad and
will prevent a smooth transition from 3.0 to 3.1.

You should not need a large system to test this: simply configure a
gmetad that polls an integer source (3.0) and a float source (3.1) with
different values and notice that the sum randomly changes from the
integer subtotal to the float subtotal and never shows the real total of
all data.

So, what my patch does is just always do the sums as float no matter
what the input types are.  Again, you probably want to read all of
bug#128 and consider applying the final patch there, or doing something
similar to get the complete totals when there are sources of different
types.

Maybe you need me to enter a new bug for exactly this issue; it seems
like #128 has been abandoned.  But, the fix would still be similar.

-twitham

-----Original Message-----
From: Brad Nicholes [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 17, 2008 5:20 PM
To: Witham, Timothy D; ganglia-developers@lists.sourceforge.net
Subject: Re: [Ganglia-developers] [Ganglia-general] Time to create
the3.1.xstable branch...

>>> On 3/14/2008 at 10:04 AM, in message
<[EMAIL PROTECTED]>,
"Witham, Timothy D" <[EMAIL PROTECTED]> wrote:

> I haven't used 3.1 yet but I see memory changes to float.  That is
good.
> However, old 3.0 gmonds could still be reporting integers.  Are you
sure
> that gmetad can successfully get one correct total from two data
types?
> 
> Please read bug#128 and see if it makes sense to change gmetad to do
> sums as double no matter what the input type is.  It seems to work for
> me, but maybe you have a reason for not doing that?  Thanks!
> 

I think that we are OK here since RRD stores everything as floats.  It
is just a matter of the XML parser doing the right thing.  Since the
datatype for an older gmond is int32 and the data type for a newer gmond
is float, the XML parser code should convert these numbers correctly and
store them in RRD as float.  I don't have a large enough system to
verify this so somebody else will have to do the actual testing.

Brad


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to