-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Concurrent Segment Search]: Design/Prototype changes for TaskResourceTrackingFramework and SearchBackpressure with concurrent search #7425
Comments
I'm taking a look at this, will share a design for the changes needed soon. |
BackgroundWith the current implementation of concurrent search and the task resource framework tracking components, only the main thread resources are tracked during concurrent search. In order to implement a search back-pressure implementation for concurrent search we need to make the task resource tracking framework properly track resource usage in the concurrent search threads as well. Figure 1. Lifecycle of a search task with concurrent search
|
@jed326 Thanks for the detailed proposal. For 1, making For 2, related to
|
tagging @andrross for feedback too. Thanks! |
I'm working on the API response PR still but in the meantime wanted to start some discussion on the search backpressure component. Today in search backpressure we look at the total resource usage and we don't consider active vs inactive threads because with the single threaded model we don't expect any inactive threads. In this context "active thread" is from the perspective of the task, ie whether or not the threads that picked up the Runnable for the task are currently working on the Runnable or not. In the concurrent search world this distinction may matter a bit more. For example, the same thread may work on multiple Runnables for the same task id. Bringing this back to search backpressure, this means that with the current model we are also considering the CPU and memory usage of threads that have already finished executing the Runnable they picked up. From both the search backpressure and the stats API perspective, it seems like the question we are asking is "How much resources is this task consuming at the current point in time?". From the CPU time perspective it seems like we should not include non-active threads in our consideration because the thread is not consuming any more CPU once it is not active. Search backpressure does not currently consider the CPU usage anyways. From the memory perspective it seems difficult to determine if the heap usage for inactive threads has been released at that point in time so I think we could go either way here. @ketanv3 since you worked on the search backpressure implementation do you have any thoughts on this? |
There is TaskResourceTrackingService and SearchBackpressureService which works based on the resource consumption by each threads associated with a task. With concurrent search there will be multiple threads working on a
ShardSearchRequest
and from different threadpools. This issue is to figure out design and changes needed to:i) Correctly track the resource consumption with concurrent search model
ii) Changes needed for SearchBackPressureService
The text was updated successfully, but these errors were encountered: