title: Differences of using the rrdtool RRD PDP or RRA consolidation function to calculate the average reading?
body: <p>I'm updating a <code>rrdtool</code> round-robin database with 1 minute intervals. I want to store the average value of five updates as one RRA entry in <code>rrdtool</code> RRD. One way to do this is like this:</p>
  
  <pre><code>$ rrdtool create foo.rrd --start 1000000500 --step 60 \
  &gt; DS:ping:GAUGE:120:0:1000 RRA:AVERAGE:0.5:5:12; \
  &gt; rrdtool update foo.rrd 1000000560:10 1000000620:20 \
  &gt; 1000000680:30 1000000740:40 1000000800:50
  </code></pre>
  
  <p>It accumulates five readings and stores the average of those as an entry in RRA. However, one could achieve the same with this:</p>
  
  <pre><code>$ rrdtool create bar.rrd --start 1000000500 --step 300 \
  &gt; DS:ping:GAUGE:600:0:1000 RRA:AVERAGE:0.5:1:12; \
  &gt; rrdtool update bar.rrd 1000000560:10 1000000620:20 \
  &gt; 1000000680:30 1000000740:40 1000000800:50
  </code></pre>
  
  <p>As seen above, <code>step</code> is 300 seconds, but as RRD PDP accepts values between the intervals and calculates the average, then both examples store 30(<code>(10+20+30+40+50)/5</code>) in RRA. One difference, which I can tell, is that first example requires at least three updates to store an entry to RRA while in case of the second example, a single update within 300 second step is enough. Are there any other differences?</p>