# Monitoring ElasticSearch Performance

**URL:** <https://discuss.elastic.co/t/monitoring-elasticsearch-performance/33895>\
**Category:** Elasticsearch\
**Created:** [November 5, 2015, 4:55pm UTC](https://discuss.elastic.co/t/monitoring-elasticsearch-performance/33895 "2015-11-05T16:55:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cterron](https://avatars.discourse-cdn.com/v4/letter/c/ccd318/32.png) [@cterron](https://discuss.elastic.co/u/cterron)\
**Post date:** [November 5, 2015, 4:55pm UTC](https://discuss.elastic.co/t/monitoring-elasticsearch-performance/33895/1 "2015-11-05T16:55:37Z")

</div>

I have trying to monitor how different configuration variables and hardware change the performance of a Elasticsearch cluster. I have read documentation about the [indeces stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html). If I understand the documentation correctly, I can obtain some performance metrics from this REST API call

> curl -XGET [http://localhost:9200/\_stats?pretty](http://localhost:9200/_stats?pretty)

If I'm correct about this JSON output , the indexing and search keys:

- \_all.total.indexing.index\_total is the total index request that the system has processed from the last call to the upper REST point.
- \_all.total.indexing.index\_time\_in\_millis is the total time in milliseconds the system spends indexing the data

With all.total.indexing.index\_time\_in\_millis/\_all.total.indexing.index\_total I can obtain the mean index time per requests.

Those stats are reset each time the end point curl -XGET [http://localhost:9200/\_stats?pretty](http://localhost:9200/_stats?pretty) is called?

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [November 6, 2015, 3:23pm UTC](https://discuss.elastic.co/t/monitoring-elasticsearch-performance/33895/2 "2015-11-06T15:23:47Z")

</div>

Just a note: I would prefer [Node Stats](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-nodes-stats.html) over Indices Stats. When doing performance testing/tuning, it's usually better to watch the overall stats of the node itself, not for a particular set of indices.

> [@cterron](#):
>
> all.total.indexing.index.total is the total index request that the system has processed from the last call to the upper REST point.

This is the total time spent indexing, cumulative since the server started. It will only increase. The stats APIs are stateless...they don't "reset" any of the stats, just poll the current value and return it. So to use the indexing time well, you'll have to make two calls, then find the derivative (based on your polling interval) to determine "documents per second". That's basically what Marvel does.

> [@cterron](#):
>
> all.total.indexing.index.time\_in\_millis is the total time in milliseconds the system spends indexing the data

Correct. And like the previous, this is a cumulative stat.

> [@cterron](#):
>
> With all.total.indexing.index\_time\_in\_millis/\_all.total.indexing.index\_total I can obtain the mean index time per requests.

Yep!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:40pm UTC](https://discuss.elastic.co/t/monitoring-elasticsearch-performance/33895/3 "2017-07-05T23:40:07Z")

</div>


