Determining if the Elasticsearch queries need optimization

When it comes to search applications, the user experience is usually highly correlated to the latency of search requests. Search results are expected to be quick and precise.

The metric listed here will help you to check if the Elasticsearch queries need optimization.

Average response time of a query

Average response time of a query helps us understand if the defined queries are effective. A high response time indicates that the application requires more time to fetch results and your searches take too long to execute. For more information about this attribute, see Average response time of a query attribute page.

Set threshold on this attribute to get notified about the average response time of a query. Since this metric directly impacts users, consider setting up an alert to trigger if the average response time is low. The KM generates an alarm and triggers an event when the threshold values are met. 

Suggested action

There are multiple things that can affect your query performance. Here are some things you might want to check:

  • Reconstruct your queries for better response time. Queries can be redefined and this metric can be compared to measure efficiency of queries. 
  • JVM memory and garbage collection 
  • Disk input output activity

Where to go from here

Using the TrueSight console, you can adjust the thresholds ranges for these monitoring attributes with the Agent Threshold tab in the Infrastructure Policies page. For more information see, Defining a monitoring policy.

Was this page helpful? Yes No Submitting... Thank you

Comments