We are on elastic 7.8, we have use case to fetch beyond 10k results are in interactive mode from users on pretty decent scale (say ~40 concurrent hits)
We have stumbled upon
- scroll (everytime open a scroll, retrieve and close the scroll)
- searchAfter (sorted by _id )
We did Load Testing with above both options
Config:
- Data Nodes -6 (4cores, 64G RAM, 1TB)
- Co-ordinator - 2 (4cores, 32G RAM)
- 60 Concurrent Threads doing search on cluster retrieving top 5000 results
- Index - 20M docs, 30 shards 2 replicas
Observations:
- Search is really bad with latencies over 40 secs
- With scrolls/searchAfter even regular searches are getting slower
- If disable scrolls/searchAfter, regular searches are getting better ~3-4 secs under load
- We dont see CPU/RAM being spiked up
Questions:
- Can someone throw light how scrolls/searchAfter are so expensive
- As our resources are under utilized, can someone point us to settings to be changes from default which are otherwise defaulted to conservative numbers?