-
Notifications
You must be signed in to change notification settings - Fork 370
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
[CELEBORN-1094] Optimize mechanism of ChunkManager expired shuffle key cleanup to avoid memory leak #2053
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2053 +/- ##
==========================================
+ Coverage 46.68% 46.76% +0.08%
==========================================
Files 165 165
Lines 10549 10577 +28
Branches 961 961
==========================================
+ Hits 4924 4945 +21
- Misses 5303 5310 +7
Partials 322 322
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
c865e2e
to
a39ad7f
Compare
@waitinfuture, @FMX, could you help to review this pull requst? Otherwise I should always resolve the conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. The default value I think can be changed to avoid too many threads.
…y cleanup to avoid memory leak
a39ad7f
to
e22ef17
Compare
…y cleanup to avoid memory leak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks. Merged into main.
…y cleanup to avoid memory leak ### What changes were proposed in this pull request? The `cleaner` of `Worker` executes the `StorageManager#cleanupExpiredShuffleKey` to clean expired shuffle keys with daemon cached thread pool. The optimization speeds up cleaning including expired shuffle keys of ChunkManager to avoid memory leak. ### Why are the changes needed? `ChunkManager#streams` could lead memory leak when the speed of cleanup is slower than expiration for expired shuffle of worker. The behavior that `ChunkStreamManager` cleanup expired shuffle key should be optimized to avoid memory leak, which causes that the VM thread of worker is 100%. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? `WorkerSuite#clean up`. Closes #2053 from SteNicholas/CELEBORN-1094. Authored-by: SteNicholas <programgeek@163.com> Signed-off-by: mingji <fengmingxiao.fmx@alibaba-inc.com> (cherry picked from commit 4e8e8c2) Signed-off-by: mingji <fengmingxiao.fmx@alibaba-inc.com>
What changes were proposed in this pull request?
The
cleaner
ofWorker
executes theStorageManager#cleanupExpiredShuffleKey
to clean expired shuffle keys with daemon cached thread pool. The optimization speeds up cleaning including expired shuffle keys of ChunkManager to avoid memory leak.Why are the changes needed?
ChunkManager#streams
could lead memory leak when the speed of cleanup is slower than expiration for expired shuffle of worker. The behavior thatChunkStreamManager
cleanup expired shuffle key should be optimized to avoid memory leak, which causes that the VM thread of worker is 100%.Does this PR introduce any user-facing change?
No.
How was this patch tested?
WorkerSuite#clean up
.