-
Notifications
You must be signed in to change notification settings - Fork 613
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
feat(build): use tikv-jemalloc only on Linux #7305
Conversation
/// Jemalloc is not supported on non-Linux OSs, because tikv-jemalloc is not available. | ||
/// See the comments for the macro enable_jemalloc_on_linux!(); | ||
#[cfg(not(target_os = "linux"))] | ||
pub async fn run(self: Arc<Self>, _: Arc<BatchManager>, _: Arc<LocalStreamManager>) {} |
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.
This is dangerous. A RisingWave CN instance without memory manager will continue to consume more memory until OOM 🥵
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.
Oh! That's not good. I guess we should warn users about this for non-Linux? I do not expect production-level usages of RisingWave on Windows/macOS, so I think this behavior might be fine (idk, it would be nice if we can implement it with the default allocator)?
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.
It's possible to get rid of jemalloc after the competition of our new memory manager (#7180), because we will only rely on the memory usage collected by ourself (with TaskLocalAlloc
)
Codecov Report
@@ Coverage Diff @@
## main #7305 +/- ##
=======================================
Coverage 73.05% 73.06%
=======================================
Files 1068 1069 +1
Lines 170985 170982 -3
=======================================
+ Hits 124913 124920 +7
+ Misses 46072 46062 -10
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Generally LGTM, and remove GlobalMemoryManager on non-production platform seems acceptable to me. BTW, there are some better solutions:
Anyway, the PR looks good enough to me, I don’t expect users to run heavy workloads on macOS. |
It's up to the moderators to decide if this is good to go 😉 |
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.
Acceptable to me because eventually #7180 will fix it
@@ -71,6 +71,7 @@ impl GlobalMemoryManager { | |||
|
|||
/// Jemalloc is not supported on non-Linux OSs, because tikv-jemalloc is not available. | |||
/// See the comments for the macro enable_jemalloc_on_linux!(); | |||
// FIXME: remove such limitation after #7180 |
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.
cc. @BowenXiao1999
The jemalloc issue only mentions the compilation problem on Windows. Should we also allow jemalloc on macOS? |
Does tikv jemalloc support macOS? Because I'm not sure about that. |
Yes. It works fine on macOS since the first day we add jemalloc. |
Okay. I'll make another pr. |
Previously I thought there were some new problems on macOS. 😄 RisingWave won't guarantee that it works on a non-Unix system, and |
I think I saw a user having macOS |
You mean this? I thought he is having problem compiling on ubuntu.. |
Yes, I meant this. They mentioned macOS in another message |
Add a data point: According to the experiment with Mac M1, the number observed in Mac M1 seems have some problem: jemalloc much higher than node memory. Switch to ubuntu fix this. But I'm not sure Mac Intel. |
Fix the warnings introduced by #7305 Approved-By: st1page Approved-By: yuhao-su Approved-By: BugenZhao Approved-By: BowenXiao1999 Approved-By: ice1000
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
Exactly as the title said.
Checklist
./risedev check
(or alias,./risedev c
)Types of user-facing changes
dep: #7306