Hello, I am relatively new to Elasticsearch. I'm getting variable query performance and I'd like to understand what is going on.
I have a public dataset which I'm indexing into a 1-node cluster on Elasticsearch 6.7. There's one index per year, right now all indices are hot, because I want this data searchable. The current year's index is about 31m documents (though nested fields increase the document count 5-6x.)
Every hour, at 15 past, I run a series of about 1,000 non-scoring queries. The query program runs the queries sequentially and there is only one outstanding query at a time.
21-22 hours of the day, the queries finish after 15 minutes. But sometimes, the queries takes much longer. What normally takes 15 minutes starts taking 2-3 times this, and then if the query program kicks off shortly after the last cycle ended, the queries can take 5-6 times the 15 minutes. The way to break the fever is to skip one cycle of these queries, then things return to normal, 15 minutes for these 1,000 queries.
I know what resources my node has, I know its not up to corporate redundancy standards at all! I'd just like to understand what is going on.
The node has 8 GB memory. The minimum and maximum Java heap size in jvm.options is set to 4 GB.
During these distressed query situations, there are no new or different processes running on the node. Several thousand new documents are indexed in a batch every 10 minutes, but this is always going on.
I read about the memory pressure indicator:
https://www.elastic.co/guide/en/cloud/current/ec-memory-pressure.html
So I did a snapshot of _nodes/stats during a time when queries were slow.
{
"nodes" : {
"node_name" : {
"jvm" : {
"mem" : {
"pools" : {
"old" : {
"used_in_bytes" : 2524861496,
"max_in_bytes" : 4120510464,
If this is the right way to calculate memory pressure, my percentage is around 59-63%, and it doesn't spike during the times when the query times are distressed.
Yes, doubling the memory or adding a second node probably fixes the problem, but that doesn't increase my understanding of Elasticsearch. And most of the time the performance is not just predictable, but also quite acceptable. Basically, I'm looking for some memory or other metric which can predict the current query performance. Any enlightenment would be greatly appreciated.
Alan