couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Runtime_Statistics" by MarcaJames
Date Fri, 23 Oct 2009 15:37:46 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Runtime_Statistics" page has been changed by MarcaJames.
The comment on this change is: Took the liberty of adding some questions from the mailing
list..
http://wiki.apache.org/couchdb/Runtime_Statistics?action=diff&rev1=4&rev2=5

--------------------------------------------------

  {{{
  /_stats
  }}}
- 
  and CouchDB will return
  
  {{{
@@ -60, +59 @@

    }
  }
  }}}
- 
  Your output may vary. Depending on the number and type of requests CouchDB has processed
so far, the output will include more or less metrics. Let's break the above down for a bit.
  
  Statistics are reported by 'group'. Often the group is just the couchdb module that counted
the metric (`httpd` for the HTTP API for example), or it is a subgroup within a module, like
`httpd_status_codes`. Each group or subgroup contains one or more 'keys'. Keys are unique
identifies for a single metric in a module. The combination of group and key (`{httpd, requests}`)
uniquely identifies a single metric.
@@ -74, +72 @@

  {{{
  /_stats/group/key
  }}}
- 
  for example
  
  {{{
  /_stats/httpd/requests
  }}}
- 
  and the response will include only the aggregate values for this single metric.
  
  {{{
@@ -98, +94 @@

    }
  }
  }}}
- 
  If you want to query a different time period, use the `?range=60` (or `300` or `900`). You
won't get useful results if you query any other time range and you can't yet configure the
different time ranges.
  
  If you are parsing the responses into native objects in your programming language, you can
simply access all the aggregate values using the object-attribute accessor method of your
language. Here is an example for JavaScript.
@@ -107, +102 @@

    // `var stats` is filled with an XMLHttpRequest.
    alert(stats.httpd.requests.max);
  }}}
- 
  At the moment the following list of metrics is collected; it might expand in the future:
  
- 
  {{{
-   
  {couchdb, database_writes}, number of times a database was changed}
  {couchdb, database_reads}, number of times a document was read from a database}
  {couchdb, open_databases}, number of open databases}
@@ -146, +138 @@

  {httpd_status_codes, '412'}, number of HTTP 412 Precondition Failed responses}
  {httpd_status_codes, '500'}, number of HTTP 500 Internal Server Error responses}
  }}}
+ ----
+ == Questions about Statistics from the mailing list ==
+ === What exactly is 'current' & 'count'. What are each of them recording   and why is
'count' less than 'current' in my system (seems counter intuitive    to me). ===
+ Current is a sum of the values recorded. For things like HTTP requests, this is the total
number of requsts.
  
+ Count is the number of updates for this metric in the given time span.
+ 
+ Stats works with two parts, a collector and an aggregator. The collector part receives messages
from through out CouchDB and holds that data in a table. Once a second the aggregator will
sweep through the collector and update its stats.
+ 
+ So, if you had 20K requests between to aggregator sweeps, Current would be incremented by
20K and Count is incremented by 1.
+ 
+ === Can the 'mean' here be interpreted as average reads per second? ===
+ For requests, the mean is roughly the requests per second. Its not as theoretically correct
as something like RRDtool because we don't interpolate, we just average the reads we take
roughly once a second.
+ 
+ === Is there any indication of exactly where within the 5 minute interval    we are? ===
+ No, but the current implementation (committed after 0.10.x was branched) does not reset
statistic aggregators as the old code did. The new method is the more standard "these stats
reflect all values seen in the last 5 minutes" regardless of when you query it.
+ 
+ == Another metric that I'm having trouble with is the 'request_time'. Querying it returns
data similar to: ===
+ 
+ [snip]
+ 
+ === Again, same question about exactly what the 'count' and 'current'    values mean for
this metric. ===
+ 
+ Oh weird. So, Count has the same meaning as before, but here Current is the length of the
last recorded request. The weirdness comes from the fact that this is averaging a set of distinct
points, where as things like requests are averaging the relative change so current makes a
bit more sense there.
+ 
+ === Does the 'mean' represent the average time for a request in CouchDB in   seconds? ===
+ 
+ milliseconds.
+ 

Mime
View raw message