Details
-
Improvement
-
Resolution: Fixed
-
Critical
-
2.0, 2.0.1
-
Security Level: Public
-
None
-
1
Description
Using a special URL, it's possible to get view engine utilization
stats per design document (index), and per node.
These stats consist on the total indexing time (sum of indexing times
for all index updater runs), total compaction time, number of index
updates, number of compactions, etc.
At any time, it's possible to ask to reset these stats.
This is useful for rebalance performance/analysus tests, for example,
right after an index is created and before the rebalance it triggered,
a test can ask to reset the stats and after the rebalance finishes
it queries the stats - these allows the test to know how much of
the total rebalance time was spent on indexing and index compaction
per design document and per node.
Note that these stats are kept in memory, not persisted to disk.
This means that after a node is restarted, all the stats values
are zeroed.
Examples:
- Get current utilization stats for design document A, bucket 'default'
$ curl -s http://192.168.1.2:9500/_set_view/default/_design/A/_get_utilization_stats | json_xs
{ "updater_interruptions" : 0, "compactor_interruptions" : 0, "useful_indexing_time" : 82.364292, "updates" : 1, "wasted_indexing_time" : 0, "total_indexing_time" : 82.364292, "compactions" : 0, "compaction_time" : 0 }- Reset the utilization stats for the previous design document and bucket.
- Success return HTTP code is 201
$ curl -X POST http://192.168.1.2:9500/_set_view/default/_design/A/_reset_utilization_stats
true
- Get the utilization stats again.
$ curl -s http://192.168.1.2:9500/_set_view/default/_design/A/_get_utilization_stats | json_xs
{ "updater_interruptions" : 0, "compactor_interruptions" : 0, "useful_indexing_time" : 0, "updates" : 0, "wasted_indexing_time" : 0, "total_indexing_time" : 0, "compactions" : 0, "compaction_time" : 0 }These allows stigmatization of the analysis done at:
https://docs.google.com/document/d/1eUV53B5pXj-5X5FPcbOA3jz1U6jOjh1hnZmZa9bUNs0/edit