[rrd-users] RPN limitation

Tobias Oetiker tobi at oetiker.ch
Sat Oct 12 14:34:06 CEST 2013


Today Simon Hobson wrote:

> Munroe Sollog wrote:
> >It looks like I'm running up against an RPN limitation.  I'm trying to add ~1600 values, but the
> >rrdgraph function dies with:
> >
> >invalid rpn expression in: <spits out the first 4081 chars for the string>
> >
> >My full CDEF function is ~20379 chars long
> >
> >Is this a known bug?  Any suggestions on how to work around it?
>
> Three things come to mind ...
>
> 1) Can you split the expression into smaller chunks ?
>
> 2) How are you doing the add ?
> If you do a,b,c, ...,+,+,+ then that's going to need an awful lot of stack to execute. While a,b,+,c,+,... shouldn't. But I don't know how RRD processes the expression - logically it should just work left-right adding things to the stack or executing operators as it find them.
>
> 3) How are you passing the instructions ? Could you be hitting an
> OS limitation - eg shells often have a limit on the length of
> command+paramters that will fit in a buffer.
>
>
> I suspect it's not a specific limit in RRD, just a limit in
> <something in teh system>.  I have graphs with 510 graph elements
> and 1020 legend items - so RRD can certainly handle large
> definitions.  What I don't have is any particualrly large RPN
> expressions.

note that rrdtool 1.4.8 is much faster (and stable) in handling
experssions with hundreds and thousands of elements!

cheers
tobi


-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-users mailing list