[
https://issues.apache.org/jira/browse/SOLR-6325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shalin Shekhar Mangar updated SOLR-6325:
----------------------------------------
Attachment: SOLR-6325.patch
Changes:
# Stats such as requests, totalTime, indexSizeBytes are aggregated per-shard
and per-collection. Using these avgTimePerRequest is calculated.
# Aggregation for /replication and /update is done only for leader nodes
# Refactored and reduced code
We do have request time percentiles per node but averaging them to get
per-shard and per-collection values will give incorrect values. But perhaps
that'd be a good enough approximation?
{code}
{
"responseHeader":{
"status":0,
"QTime":2022},
"cluster":{
"collections":{
"collection1":{
"shards":{
"shard1":{
"range":"80000000-ffffffff",
"state":"active",
"replicas":{"core_node1":{
"state":"active",
"base_url":"http://127.0.1.1:8902/solr",
"core":"collection1",
"node_name":"127.0.1.1:8902_solr",
"leader":"true",
"/get":{
"15minRateReqsPerSecond":0.0,
"75thPcRequestTime":0.0,
"999thPcRequestTime":0.0,
"requests":0,
"avgRequestsPerSecond":0.0,
"99thPcRequestTime":0.0,
"95thPcRequestTime":0.0,
"avgTimePerRequest":0.0,
"5minRateReqsPerSecond":0.0,
"medianRequestTime":0.0,
"totalTime":0.0},
"/replication":{
"15minRateReqsPerSecond":0.0,
"75thPcRequestTime":0.0,
"999thPcRequestTime":0.0,
"99thPcRequestTime":0.0,
"95thPcRequestTime":0.0,
"5minRateReqsPerSecond":0.0,
"indexSizeBytes":3428,
"requests":0,
"avgRequestsPerSecond":0.0,
"avgTimePerRequest":0.0,
"indexSize":"3.35 KB",
"medianRequestTime":0.0,
"totalTime":0.0},
"/select":{
"15minRateReqsPerSecond":0.18003956820463016,
"75thPcRequestTime":48.589593,
"999thPcRequestTime":48.589593,
"requests":2,
"avgRequestsPerSecond":0.017125745096008536,
"99thPcRequestTime":48.589593,
"95thPcRequestTime":48.589593,
"avgTimePerRequest":26.820881,
"5minRateReqsPerSecond":0.14629739152434504,
"medianRequestTime":26.820881,
"totalTime":53.641762},
"/update":{
"15minRateReqsPerSecond":0.0021613544005189404,
"75thPcRequestTime":31.588281,
"999thPcRequestTime":31.588281,
"requests":2,
"avgRequestsPerSecond":0.017126831486872777,
"99thPcRequestTime":31.588281,
"95thPcRequestTime":31.588281,
"avgTimePerRequest":17.0758355,
"5minRateReqsPerSecond":0.006133913399131633,
"medianRequestTime":17.075835499999997,
"totalTime":34.151671}}},
"/get":{
"avgTimePerRequest":0.0,
"requests":0,
"totalTime":0.0},
"/replication":{
"avgTimePerRequest":0.0,
"requests":0,
"indexSize":"3.35 KB",
"indexSizeBytes":3428,
"totalTime":0.0},
"/select":{
"avgTimePerRequest":26.820881,
"requests":2,
"totalTime":53.641762},
"/update":{
"avgTimePerRequest":17.0758355,
"requests":2,
"totalTime":34.151671}},
"shard2":{
"range":"0-7fffffff",
"state":"active",
"replicas":{"core_node2":{
"state":"active",
"base_url":"http://127.0.1.1:8901/solr",
"core":"collection1",
"node_name":"127.0.1.1:8901_solr",
"leader":"true",
"/get":{
"15minRateReqsPerSecond":0.0,
"75thPcRequestTime":0.0,
"999thPcRequestTime":0.0,
"requests":0,
"avgRequestsPerSecond":0.0,
"99thPcRequestTime":0.0,
"95thPcRequestTime":0.0,
"avgTimePerRequest":0.0,
"5minRateReqsPerSecond":0.0,
"medianRequestTime":0.0,
"totalTime":0.0},
"/replication":{
"15minRateReqsPerSecond":0.0,
"75thPcRequestTime":0.0,
"999thPcRequestTime":0.0,
"99thPcRequestTime":0.0,
"95thPcRequestTime":0.0,
"5minRateReqsPerSecond":0.0,
"indexSizeBytes":6738,
"requests":0,
"avgRequestsPerSecond":0.0,
"avgTimePerRequest":0.0,
"indexSize":"6.58 KB",
"medianRequestTime":0.0,
"totalTime":0.0},
"/select":{
"15minRateReqsPerSecond":0.18111127304638647,
"75thPcRequestTime":107.022171,
"999thPcRequestTime":107.022171,
"requests":3,
"avgRequestsPerSecond":0.02570162723571108,
"99thPcRequestTime":107.022171,
"95thPcRequestTime":107.022171,
"avgTimePerRequest":54.505850333333335,
"5minRateReqsPerSecond":0.14928852093393213,
"medianRequestTime":51.432893,
"totalTime":163.517551},
"/update":{
"15minRateReqsPerSecond":0.006490100395309772,
"75thPcRequestTime":34.3730335,
"999thPcRequestTime":58.041226,
"requests":6,
"avgRequestsPerSecond":0.05140730311056109,
"99thPcRequestTime":58.041226,
"95thPcRequestTime":58.041226,
"avgTimePerRequest":16.466008,
"5minRateReqsPerSecond":0.018453714010755254,
"medianRequestTime":5.2320905,
"totalTime":98.796048}}},
"/get":{
"avgTimePerRequest":0.0,
"requests":0,
"totalTime":0.0},
"/replication":{
"avgTimePerRequest":0.0,
"requests":0,
"indexSize":"6.58 KB",
"indexSizeBytes":6738,
"totalTime":0.0},
"/select":{
"avgTimePerRequest":54.505850333333335,
"requests":3,
"totalTime":163.517551},
"/update":{
"avgTimePerRequest":16.466008,
"requests":6,
"totalTime":98.796048}}},
"maxShardsPerNode":"1",
"router":{"name":"compositeId"},
"replicationFactor":"1",
"autoCreated":"true",
"standard":{}}},
"live_nodes":["127.0.1.1:8901_solr",
"127.0.1.1:8902_solr"]}}
{code}
Todo:
# Make it possible to request additional handler paths
# Use SOLR-6332 instead of hard coding interesting handlers
> Expose per-collection and per-shard aggregate statistics
> --------------------------------------------------------
>
> Key: SOLR-6325
> URL: https://issues.apache.org/jira/browse/SOLR-6325
> Project: Solr
> Issue Type: Sub-task
> Components: SolrCloud
> Reporter: Shalin Shekhar Mangar
> Assignee: Shalin Shekhar Mangar
> Fix For: 4.9, 5.0
>
> Attachments: SOLR-6325.patch, SOLR-6325.patch, SOLR-6325.patch
>
>
> SolrCloud doesn't provide any aggregate stats about the cluster or a
> collection. Very common questions such as document counts per shard, index
> sizes, request rates etc cannot be answered easily without figuring out the
> cluster state, invoking multiple core admin APIs and aggregating them
> manually.
> I propose that we expose an API which returns each of the following on a
> per-collection and per-shard basis:
> # Document counts
> # Index size on disk
> # Query request rate
> # Indexing request rate
> # Real time get request rate
> I am not yet sure if this should be a distributed search component or a
> collection API.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]