In the docs for the PERCENT function, it says:<br><br><blockquote><i>Unknown</i> values are considered lower than any finite number for this purpose so if this operator returns an <i>unknown</i> you have quite a lot of them in your data. <b>Inf</b>inite numbers are lesser, or more, than the finite numbers and are always more than the <i>Unknown</i> numbers. (NaN < -INF < finite values < INF)<br>
<br></blockquote>How does that affect my results? I ask because it appears as if the NaN's are being factored in the final sorted list. Witness:<br><blockquote>webservd@water:/nfs/info/integra.engr/stats/ubi/rrd $ rrdtool graph /dev/null \<br>
--start=02/20/09 \<br> --end=03/20/09 \<br> DEF:i=iahigl415050ubielg.rrd:ingress:MAX \<br> DEF:e=iahigl415050ubielg.rrd:egress:MAX \<br> CDEF:max_bits=i,e,MAX,8,* \<br> VDEF:ptile_bits=max_bits,95,PERCENT \<br>
PRINT:ptile_bits:%.0lf<br>0x0<br>43488451<br><br></blockquote>I've exported the data from that time window. There are 8064 lines of data. 7769 of them have values. The final 323 are filled with NaN's. Some are there because we missed polls. 269 of the NaN's are there at the end of the export because the end date is in the future.<br>
<br>Here's the funny thing: looking through my exported data, I can find 43488450.8, which is the only number close to 43488451. It's at index 7741. What percentile is that?<br><blockquote><br>webservd@water:/nfs/info/integra.engr/stats/ubi/rrd $ bc -l<br>
7741/7769<br>.99639593255245205303<br><br></blockquote>Whoa, whoa, whoa. That doesn't look right. That's the 99.6396th percentile! That's too far to the end! Hmm. What if we include the NaN's for the final position?<br>
<blockquote><br>7741/8064<br>.95994543650793650793<br><br></blockquote>Well, the 95.9945th percentile is closer to what we want, but it's still not the 95th percentile (7660 or 7661).<br><br>It looks like rrdtool is using the NaN's to calculate the result but it's a bit off. (95.9945th percentile instead of 95.0th percentile)<br>
<br>I don't understand these results. What's happening here?<br><br>-Joshua<br><br>PS I've uploaded an RRD dump and the data export for 2/20/09-3/20/09 to <a href="http://keroes.com/rrd/">http://keroes.com/rrd/</a> if you'd like to see for yourself.<br>