athavan kanapuli
athavan kanapuli

Reputation: 492

How does Elasticsearch handles incoming queries when it's current querying is very CPU intensive?

I have a master-slave elastic cluster(Elastic version 5.4.2) with more than 30 indexes. I do a search in one of my Metrics index to bring around 2 billion data and it's aggregations, the CPU spikes up to 100% and it takes nearly 10 seconds to retrieve back the data(including the network transfer). At the same time, the smaller queries to other indexes gets slowed down. So what happens behind the scenes?

Does adding a timeout in the first query solves this problem?

Any help would be greatly appreciated.

Upvotes: 0

Views: 57

Answers (1)

Nirmal
Nirmal

Reputation: 1336

From your description , its clear that there are not enough resources to complete other queries when expensive query is running.In addition to that expensive queries might be consuming search thread pools, thus adding new "smaller" queries to queue ( http://yourserver:port/_cat/thread_pool should give you an idea about current search thread pool sizes )

It is not possible to add timeout to queries to solve this problem.

Upvotes: 0

Related Questions