Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize doc level monitor performance: Batch docs for percolate query searches based on available memory and cpu #1353

Closed
eirsep opened this issue Dec 22, 2023 · 1 comment
Labels
performance Make it fast!

Comments

@eirsep
Copy link
Member

eirsep commented Dec 22, 2023

Is your feature request related to a problem?
Doc level monitor execution does the following 2 memory, cpu sensitive operations in search path :

  • Fetch docs source for docs (> last read sequence number) for every shard per index
  • Accumulate docs source list per index and perform percolate queries this causes heap usage exceeded exception when docs in memory are too high

What solution would you like?
Collect docs from shards up until a threshold which factors heap usage and available memory. Perform percolate query. If more shards remain to be queried repeat the above process until all shards are queried in current execution of doc level monitor
TODO - factor in cpu usage also
What alternatives have you considered?
Perform percolate query per shard - caused CPU regression due to too many requests
Perform percolate query for all docs across all shards, indices being - aggravates heap usage exceed issue as more docs are queried
(Current) Perform percolate query per concrete index - still not determinisitc. may make too many percolate queries (if very few docs in memory from one index) or too less (if too many docs from one index in memory)

@eirsep
Copy link
Member Author

eirsep commented Dec 22, 2023

#1331

@eirsep eirsep changed the title Optimize doc level monitor performance: Batch docs for percolate query searches based on available memory Optimize doc level monitor performance: Batch docs for percolate query searches based on available memory and cpu Dec 22, 2023
@eirsep eirsep closed this as completed Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Make it fast!
Projects
None yet
Development

No branches or pull requests

1 participant