Domanda

I have a system that about which I want to record with Munin, which uses RRDtool. Some of the values that I want to count may (some day) grow to be very large, such as sums of terabytes of integers. I want to know that the data stores that I use in Munin won't overflow when I try to store big values in them.

I can't see any notes about supported data sizes, ranges or precision in the documentation at http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IGAUGE and I haven't succeeded in finding anything by Googling related terms.

Is there any documentation of what the supported range and precision of GAUGE, COUNTER, DERIVE, ABSOLUTE and COMPUTE data stores are, please?

È stato utile?

Soluzione

Internally, RRDTool stores values as the double data type. However, what this actually means can sometimes be dependent on your system architecture and compiler -- this is one of the reasons why RRD files are not portable.

To find out what the value is on your system, assuming you compiled the code yourself, look in the C header file for the definition of DBL_MAX (check float.h, limits.h, values.h ...)

On our system, the maximum value of a Double is 1.79769313486231470e+308; however once you get past 1.0e+15 you will start to see loss of accuracy as the mantissa length is limited (it is only 52bit precision)

It may be possible to modify the definition of rrd_value_t in rrd.h and rrd_format.h to use a long double (80 bit precision) or even __float128 or quadruple (128bit precision) if your compiler supports it, but you'd be on your own if you do, and it certainly wouldn't be backwards compatible...

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top