In continuation to my comments on this SO answer, I have below setup:
Using read heavy ES index which also get index requests but ratio is 25:1 and using refresh_interval of 1 sec, and trying to improve the query performance by explicitly setting this param so that it caches the search query hits
as well but not seeing any performance gain.
Also I see hits.total is also changing,As my index is also getting the write request and I feel this could be the cause as shard is getting refreshed and cache is getting invalidated.
Please confirm if my assumption is correct and is there is any way to improve the performance using various cache settings available in ES?
Note I used the monitoring cache section mentioned in https://opensourceconnections.com/blog/2017/07/10/caching_in_elasticsearch/ and below is the O/P I got.
URL:- http://:9200/_cat/nodes?v&h=queryCacheMemory,queryCacheEvictions,requestCacheMemory,requestCacheHitCount,requestCacheMissCount,flushTotal,flushTotalTime
queryCacheMemory queryCacheEvictions flushTotal flushTotalTime
0b 0 353204 1.9h
0b 0 0 0s
0b 0 464814 2.2h
0b 0 292127 1.6h
0b 0 409013 2.1h
0b 0 394303 2h
0b 0 369545 2.1h
0b 0 0 0s
0b 0 0 0s
Please note, even after having requestCacheMemory
, hit
and miss
count of it, its not included in the O/P