Skip to content
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

macOS version doesn't use jemalloc #323

Open
ashie opened this issue Jul 28, 2021 · 12 comments
Open

macOS version doesn't use jemalloc #323

ashie opened this issue Jul 28, 2021 · 12 comments
Labels
enhancement New feature or request mac

Comments

@ashie
Copy link
Member

ashie commented Jul 28, 2021

Although dmg package for macOS bundles jemalloc as same as packages for linux platforms, it doesn't use jemalloc.
To enable it, LD_PRELOAD environment variable is required. But probably no one sets it on macOS.

@ashie
Copy link
Member Author

ashie commented Jul 28, 2021

Probably we need to add EnvironmentVariables to td-agent.plist.

@kenhys
Copy link
Contributor

kenhys commented Jul 28, 2021

@ashie
will you fix for 4.2.0?

@ashie
Copy link
Member Author

ashie commented Jul 28, 2021

No. I'm in final testing for 4.2.0.
It should be fixed in future version.

@cosmo0920
Copy link
Contributor

FYI; td-agent 4.5.0 (or under version?) has dead lock issue on macOS.
If we use jemalloc on macOS, we might have to revert to downgrade jemalloc version.
jemalloc/jemalloc#895

@cosmo0920
Copy link
Contributor

And also, we should use DYLD_LIBRARY_PATH on macOS instead of LD_LIBRARY_PATH to replace malloc implementation with jemalloc.

@ashie
Copy link
Member Author

ashie commented Jul 28, 2021

FYI; td-agent 4.5.0 (or under version?) has dead lock issue on macOS.

Thanks for the information.
Do you mean jemalloc?

- td-agent 4.5.0
+ jemalloc 4.5.0

It seems that it's affect to jemalloc 4.5.0 - 5.0.0.
<= 4.4.0 or >= 5.1.0 aren't affected.

If we use jemalloc on macOS, we might have to revert to downgrade jemalloc version.
jemalloc/jemalloc#895

td-agent 4.2.0 includes an amazing challenge for jemalloc.
It downgrades jemalloc to 3.6.0: #305

@ashie
Copy link
Member Author

ashie commented Jul 28, 2021

And also, we should use DYLD_LIBRARY_PATH on macOS instead of LD_LIBRARY_PATH to replace malloc implementation with jemalloc.

You are right, I forgot it.
Thanks for notifying it.

@ashie
Copy link
Member Author

ashie commented Jul 28, 2021

FYI; td-agent 4.5.0 (or under version?) has dead lock issue on macOS.

BTW it might not be so critical for Ruby, because it uses Giant VM Lock.

@cosmo0920
Copy link
Contributor

Thanks for the information.
Do you mean jemalloc?

Yes, I mean jemalloc.

@ashie
Copy link
Member Author

ashie commented Jul 28, 2021

It seems that it's affect to jemalloc 4.5.0 - 5.0.0.
<= 4.4.0 or >= 5.1.0 aren't affected.

  * [rust-lang/jemalloc@11bfb0d...3288e06](https://github.com/rust-lang/jemalloc/compare/11bfb0dcf85f7aa92abd30524bb1e42e18d108c6...3288e0659c08fb5006f6d6dd4b5675ed0c2c432a)

No, it bumped from 4.1.0 to 4.5.0.
So 4.1.1 - 5.0.0 are possible to be affected.

@cosmo0920
Copy link
Contributor

Oh, it's widely spreaded issue...

@github-actions
Copy link

This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days

@github-actions github-actions bot added the stale label Feb 14, 2022
@cosmo0920 cosmo0920 added enhancement New feature or request and removed stale labels Feb 15, 2022
@ashie ashie added the mac label Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mac
Projects
None yet
Development

No branches or pull requests

3 participants