-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature Request] [Parallel downloads] Investigate the use of virtual threads as the new I/O mechanism for segment downloads #11708
Comments
Experiments performedAll of the experiments below were performed on a self managed cluster with 3 Recovery
Virtual threaded multipart approach is roughly 34% faster than the file approach and ~22% faster than the blocking multipart approach. Replication
Case 1: 1s Refresh Interval for
Case 2: 10s Refresh Interval for
Compared to the file based approach, the virtual, multithreaded approach gives comparatively better performance. The inherent fairness added by the part based approach helps reduce the overall replication lag and improve replication performance. The baseline case has been added in for comparison purposes and the virtual, multipart approach is the most fair approach as compared to the other approaches. Security (JSM)
Path forwardThe next steps for multipart download support would be as follows -
TLDR:
CodeWith Security Manager: main...kotwanikunal:OpenSearch:virtual-thread-sm cc: @Bukhtawar @andrross @mch2 |
@kotwanikunal thanks a lot for exploring this area, there have been discussions related to virtual threads for a while now (both in OpenSearch and Apache Lucene communities), at the moment there are a few cautionary cases that we may look into more closely:
|
Nice to hear from you @reta! :) |
For the approach we are looking at, the queue is not unbounded and we will limit job submissions at the recovery/replication event level. We can build up guardrails and framework around it with these set of operations. |
❤️ Same, @kotwanikunal !
I think for downloading segments (network I/O) the virtual threads are the perfect fit, for filesystem we may need to weight in the tradeoff. As far as I understand, the experimental implementation does not indicate from where exactly gains come from, just in general there are some. If we could collect precise measurements here - it would help.
My apologies, guardrails are certainly needed but I meant different subject here: we need to have visibility into virtual threads disregarding where they are being used. Can we track the CPU share used by virtual thread? (as we do for regular one) Can we capture stacks to collect hot threads? And things like that ... |
Is your feature request related to a problem? Please describe
Coming in from #11461 - we need to investigate utilizing virtual threads as the default I/O mechanism for segment downloads.
Describe the solution you'd like
#10786 talks about using virtual threads as the I/O mechanism over the current code base.
As a part of parallel downloads -
A major benefit of the virtual thread mechanism is that the existing code constructs and APIs do not need to change - it will leverage the benefits at a logically lower level.
The aim of this issue is to test and compare the overall effort, performance benefits between the two mechanisms as well as documenting the suggested path forward.
Related component
Search:Remote Search
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: