Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Monitoring Elasticsearch

You're reading from   Monitoring Elasticsearch

Arrow left icon
Product type Paperback
Published in Jul 2016
Publisher Packt
ISBN-13 9781784397807
Length 180 pages
Edition 1st Edition
Arrow right icon
Authors (3):
Arrow left icon
Dan Noble Dan Noble
Author Profile Icon Dan Noble
Dan Noble
Pulkit Agrawal Pulkit Agrawal
Author Profile Icon Pulkit Agrawal
Pulkit Agrawal
Mahmoud Lababidi Mahmoud Lababidi
Author Profile Icon Mahmoud Lababidi
Mahmoud Lababidi
Arrow right icon
View More author details
Toc

Analyzing queries


Analyzing slow queries and improving their performance can be very challenging. This section examines how to look for the root cause of poor query performance, and it offers some different approaches to finding a solution.

Slow log

If you notice poor query performance, start with the slow log. To enable the slow log, edit elasticsearch.yml and add these configuration options to all nodes on the cluster:

index.search.slowlog.threshold.query.warn: 8s
index.search.slowlog.threshold.query.info: 4s
index.search.slowlog.threshold.query.debug: 2s
index.search.slowlog.threshold.query.trace: 500ms

index.search.slowlog.threshold.fetch.warn: 1s
index.search.slowlog.threshold.fetch.info: 750ms
index.search.slowlog.threshold.fetch.debug: 500ms
index.search.slowlog.threshold.fetch.trace: 250ms

index.indexing.slowlog.threshold.index.warn: 8s 
index.indexing.slowlog.threshold.index.info: 4s 
index.indexing.slowlog.threshold.index.debug: 2s 
index.indexing.slowlog.threshold.index.trace:...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime