Monitoring ElasticSearch Performance


(Carlos Terron) #1

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. If I understand the documentation correctly, I can obtain some performance metrics from this REST API call

curl -XGET 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 is called?


(Zachary Tong) #2

Just a note: I would prefer Node Stats 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.

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.

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

Yep!


(system) #3