Platform Team/Server Kit/Guide/Usage Statistics

From Sugar Labs
< Platform Team‎ | Server Kit
Revision as of 10:46, 22 February 2012 by M anish (talk | contribs)
Jump to navigation Jump to search

RRD (Round Robin Database) file data types

There is a standard set of rrd databases containing stats for journal, system, shell. For each activity there is an independent rrd database which tracks a standard set of parameters, the details for which are listed below.

  • database files conform Statistics identifiers list;
  • database file name for non-activities is in format <TOP-LEVEL-STAT-ID>.rrd;
  • database file name for activities is in format activity.<BUNDLE-ID>.rrd;
  • the set of database fields conform second level stat identifiers for particular stat.

Factors affecting network bandwidth

The only factor that really affects the network bandwidth usage is the resolution at which the data is being stored. Currently, the default step-size is 60 seconds.

Factors affecting database size on the client side

The factor that affects the database size on the client is the RRAs (Round Robin Archives) being cached on the Client XO.

The default RRA configuration on the client side reads something like

RRA:AVERAGE:0.5:1:4320 RRA:AVERAGE:0.5:5:2016

This means that there is one RRA (Round robin archive) within the DB that stores one value every minute for 4320 samples. This makes the total length of this 1 minute resolution RRA to be 4320 minutes = 3 days

The other RRA stores an average of 5 samples, for a total of 2016 samples. Thus its total duration is 5x2016 min= 10080 min= 7 days.

Thus the default duration of high resolution samples is 3 days and lower resolution samples is 7 days. Tweaking these values will affect both the database size on the client size and the network usage.

For locations with very intermittent connectivity, having bigger-duration databases might be advisable. sample RRA's could be

RRA:AVERAGE:0.5:1:43200 (30 days) RRA:AVERAGE:0.5:5:20160 (70 days)

The above sample values will not be having any impact on network usage, since we're not increasing their resolution, frequency or adding/removing more RRA's

Notes on reading/interpreting the RRD databases

Dumping all information

  • To dump all the information contained in an rrd file, one could use 'rrdtool dump' command.
  • To dump the same info in a more pretty print format (tabular), you may use dsreport. You'll need to install rrdtool-perl to make the script work.