[Core] ray.util.ActorPool
supports batch submission of remote actor tasks.
#39196
Labels
core
Issues that should be addressed in Ray Core
core-util
enhancement
Request for new feature and/or capability
P2
Important issue, but not time-critical
1. Description
Recently, I submitted a Ray Enhancement proposal :
[Core] Add a new interface for submitting actor tasks in batches (Batch Remote) #39048 .
The implementation of batch remote api for batch submit actor task:
[WIP][Core]Add batch remote api for batch submit actor task #35597
I believe that the batch remote interface is a great addition to be used with the ActorPool.
The current usage of ActorPool mainly involves coordinating the semantics of
map
,submit
, andget_next
.For simple scenarios involving batch submission of ActorTasks, the current API usage of ActorPool becomes overly redundant.
I would like to propose adding a new
batch_submit_handle()
method to address this. The main purpose are:1. Simpler syntax for invocation
2. Improved performance.
2. User Usage
Scenario:
3. Advantages
1. Significant performance improvement
We have already implemented and conducted extensive performance testing internally.
The following are the performance comparison results.
Table 1: Comparison of remote call time with varying parameter sizes and 400 Actors
Conclusion:
Table 2: Comparison of remote call time with varying numbers of Actors and a fixed parameter size (1MB)
Conclusion:
The more actors, the greater the performance gain.
Table 3: Comparison of remote call time with varying numbers of Actors and no parameters in remote calls
This test is to confirm the degree of performance optimization after reducing the frequency of switching between the Python and C++ execution layers.
Conclusion:
After comparison, in the scenario of remote calls without parameters, the performance is optimized by 2+ times.
Table 4: Comparison of remote call time with varying numbers of Actors and object ref parameters in remote calls
Conclusion:
After comparison, in the scenario of remote calls with object ref paramter, the performance is optimized by 3~4 times.
Summary:
The newly added Batch Remote API can improve performance in the case of batch calling Actor task. It can reduce performance costs such as parameter serialization, object store consumption, and Python and C++ execution layer switching, thereby improving the performance of the entire distributed computing system.
Especially in the following scenario:
4. Implementation
The text was updated successfully, but these errors were encountered: