You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "cfmcgrady (via GitHub)" <gi...@apache.org> on 2023/07/14 08:50:24 UTC
[GitHub] [incubator-celeborn] cfmcgrady opened a new pull request, #1716: [CELEBORN-796] Support for globally disabled thread-local cache in the shared PooledByteBufAllocator
cfmcgrady opened a new pull request, #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716
<!--
Thanks for sending a pull request! Here are some tips for you:
- Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX] Your PR title ...'.
- Be sure to keep the PR description updated to reflect all changes.
- Please write your PR title to summarize what this PR proposes.
- If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
### Why are the changes needed?
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] github-actions[bot] commented on pull request #1716: [WIP][CELEBORN-796] Support for globally disabled thread-local cache in the shared PooledByteBufAllocator
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#issuecomment-1665220238
This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] pan3793 commented on pull request #1716: [CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#issuecomment-1668950342
BTW, I rolled this patch on a small cluster, it shows helps with memory reduction without
obvious performance dropping.
Before (cache enabled)

After (cache disabled)

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] pan3793 commented on pull request #1716: [WIP][CELEBORN-796] Support for globally disabled thread-local cache in the shared PooledByteBufAllocator
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#issuecomment-1635979588
Will disable cache hurt performance and increase cpu usage?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] cfmcgrady commented on pull request #1716: [CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
Posted by "cfmcgrady (via GitHub)" <gi...@apache.org>.
cfmcgrady commented on PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#issuecomment-1670587947
the netty memory grows more slowly than before in our production environment after applying this patch.
Before this PR (cache enabled)

After this PR (cache disabled)

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] pan3793 commented on pull request #1716: [CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#issuecomment-1668946975
I think it's good to go as it does not change the default behavior.
Generally disabling cache would hurt performance, any chance to provide a benchmark with cache enabled/disabled? e.g. terasort https://github.com/pan3793/spark-terasort
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1716: [CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#discussion_r1286863827
##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -1232,6 +1235,15 @@ object CelebornConf extends Logging {
.timeConf(TimeUnit.MILLISECONDS)
.createWithDefaultString("10s")
+ val NETWORK_MEMORY_ALLOCATOR_ALLOW_CACHE: ConfigEntry[Boolean] =
+ buildConf("celeborn.network.memory.allocator.allowCache")
+ .categories("network")
+ .internal
+ .version("0.4.0")
Review Comment:
maybe 0.3.1, if @waitinfuture not oppose to
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] cfmcgrady commented on a diff in pull request #1716: [WIP][CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
Posted by "cfmcgrady (via GitHub)" <gi...@apache.org>.
cfmcgrady commented on code in PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#discussion_r1285484336
##########
common/src/main/java/org/apache/celeborn/common/network/util/NettyUtils.java:
##########
@@ -42,7 +42,8 @@
/** Utilities for creating various Netty constructs based on whether we're using EPOLL or NIO. */
public class NettyUtils {
- private static volatile PooledByteBufAllocator _allocator;
+ private static final PooledByteBufAllocator[] _sharedPooledByteBufAllocator =
Review Comment:
It's derived from Spark and I prefer to keep it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] codecov[bot] commented on pull request #1716: [WIP][CELEBORN-796] Support for globally disabled thread-local cache in the shared PooledByteBufAllocator
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#issuecomment-1635539756
## [Codecov](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1716?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#1716](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1716?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (457f059) into [main](https://app.codecov.io/gh/apache/incubator-celeborn/commit/867469a201cc0640db5b5d150000512b5699c9aa?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (867469a) will **decrease** coverage by `0.06%`.
> The diff coverage is `75.00%`.
```diff
@@ Coverage Diff @@
## main #1716 +/- ##
==========================================
- Coverage 46.80% 46.74% -0.06%
==========================================
Files 161 161
Lines 9995 10006 +11
Branches 924 926 +2
==========================================
- Hits 4677 4676 -1
- Misses 5005 5017 +12
Partials 313 313
```
| [Impacted Files](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1716?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...pache/celeborn/common/network/util/NettyUtils.java](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1716?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jZWxlYm9ybi9jb21tb24vbmV0d29yay91dGlsL05ldHR5VXRpbHMuamF2YQ==) | `37.94% <61.54%> (+8.31%)` | :arrow_up: |
| [...cala/org/apache/celeborn/common/CelebornConf.scala](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1716?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvY2VsZWJvcm4vY29tbW9uL0NlbGVib3JuQ29uZi5zY2FsYQ==) | `87.27% <100.00%> (+0.04%)` | :arrow_up: |
... and [1 file with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1716/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1716: [CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture commented on code in PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#discussion_r1286885738
##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -1232,6 +1235,15 @@ object CelebornConf extends Logging {
.timeConf(TimeUnit.MILLISECONDS)
.createWithDefaultString("10s")
+ val NETWORK_MEMORY_ALLOCATOR_ALLOW_CACHE: ConfigEntry[Boolean] =
+ buildConf("celeborn.network.memory.allocator.allowCache")
+ .categories("network")
+ .internal
+ .version("0.4.0")
Review Comment:
The graph looks great!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1716: [CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#discussion_r1286864332
##########
common/src/main/java/org/apache/celeborn/common/network/util/NettyUtils.java:
##########
@@ -42,7 +42,8 @@
/** Utilities for creating various Netty constructs based on whether we're using EPOLL or NIO. */
public class NettyUtils {
- private static volatile PooledByteBufAllocator _allocator;
+ private static final PooledByteBufAllocator[] _sharedPooledByteBufAllocator =
Review Comment:
not a big deal, both are fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1716: [CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture commented on code in PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#discussion_r1286884547
##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -1232,6 +1235,15 @@ object CelebornConf extends Logging {
.timeConf(TimeUnit.MILLISECONDS)
.createWithDefaultString("10s")
+ val NETWORK_MEMORY_ALLOCATOR_ALLOW_CACHE: ConfigEntry[Boolean] =
+ buildConf("celeborn.network.memory.allocator.allowCache")
+ .categories("network")
+ .internal
+ .version("0.4.0")
Review Comment:
No opposition:) I think we should merge this PR to 0.3.1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1716: [WIP][CELEBORN-796] Support for globally disabled thread-local cache in the shared PooledByteBufAllocator
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#discussion_r1285340034
##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -1232,6 +1235,15 @@ object CelebornConf extends Logging {
.timeConf(TimeUnit.MILLISECONDS)
.createWithDefaultString("10s")
+ val NETWORK_MEMORY_ALLOCATOR_ALLOW_CACHE: ConfigEntry[Boolean] =
+ buildConf("celeborn.network.memory.allocator.allowCache")
+ .categories("network")
+ .internal
+ .version("0.4.0")
+ .doc("when false, globally disabled thread-local cache in the shared PooledByteBufAllocator.")
Review Comment:
```suggestion
.doc("When false, globally disable thread-local cache in the shared PooledByteBufAllocator.")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1716: [CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture commented on code in PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#discussion_r1286884547
##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -1232,6 +1235,15 @@ object CelebornConf extends Logging {
.timeConf(TimeUnit.MILLISECONDS)
.createWithDefaultString("10s")
+ val NETWORK_MEMORY_ALLOCATOR_ALLOW_CACHE: ConfigEntry[Boolean] =
+ buildConf("celeborn.network.memory.allocator.allowCache")
+ .categories("network")
+ .internal
+ .version("0.4.0")
Review Comment:
No opposition:)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] pan3793 commented on pull request #1716: [WIP][CELEBORN-796] Support for globally disabled thread-local cache in the shared PooledByteBufAllocator
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#issuecomment-1667124050
cc @waitinfuture
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1716: [WIP][CELEBORN-796] Support for globally disabled thread-local cache in the shared PooledByteBufAllocator
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#discussion_r1285339721
##########
common/src/main/java/org/apache/celeborn/common/network/util/NettyUtils.java:
##########
@@ -42,7 +42,8 @@
/** Utilities for creating various Netty constructs based on whether we're using EPOLL or NIO. */
public class NettyUtils {
- private static volatile PooledByteBufAllocator _allocator;
+ private static final PooledByteBufAllocator[] _sharedPooledByteBufAllocator =
Review Comment:
how about splitting it into 2 variables?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on pull request #1716: [CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture commented on PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#issuecomment-1674819198
Thanks! Merging to main/0.3
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture closed pull request #1716: [CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture closed pull request #1716: [CELEBORN-796] Support for globally disable thread-local cache in the shared PooledByteBufAllocator
URL: https://github.com/apache/incubator-celeborn/pull/1716
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] pan3793 commented on pull request #1716: [WIP][CELEBORN-796] Support for globally disabled thread-local cache in the shared PooledByteBufAllocator
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #1716:
URL: https://github.com/apache/incubator-celeborn/pull/1716#issuecomment-1667042722
Let's revise this PR, it's beneficial to release the direct memory.
I hit worker memory issues recently, the worker triggers trim action, then the disk buffer become empty but direct memory does not reach the threshold, causing the worker being a PAUSE state forever.
```
MemoryManager#183 - Direct memory usage: 1536.0 MiB/3.0 GiB, disk buffer size: 0.0 B, sort memory size: 0.0 B, read buffer size: 0.0 B
StorageManager#51 - Trigger org.apache.celeborn.service.deploy.worker.storage.StorageManager trim action
StorageManager#51 - Trigger org.apache.celeborn.service.deploy.worker.storage.StorageManager trim action
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org