Comments (6)
Please note that this isn't causing huge problems for me. Yet. But eventually I want to distribute aarch64-linux builds of my Nix package for buck2. So, this is mainly just to catalogue the issue since I suspect any movement towards an actual solution will require a bit of stakeholder input, and because someone else may eventually run into it.
from buck2.
We have now disabled jemalloc everywhere apart from Mac/Linux, since it doesn't play well on other OS's like Illumos #120. We also disable jemalloc if you are doing a build of Buck2 with Buck2, mostly because we haven't setup Buck2 to build Jemalloc. Is that enough?
from buck2.
That's close, but an aarch64-linux package for e.g. NixOS (just as an example) won't be able to work cross-system unless we also turn off jemalloc there, too.
Would a patch to make jemalloc
an optional Cargo feature be accepted? Then we could just turn it off, and it could default to on, to leave the current behavior. I could write this.
It might also be worth exploring if other allocators can boost performance while more gracefully handling these requirements.
from buck2.
Internally we'll probably always use jemalloc, and it's been well tuned, so I am suspicious there is anything else out there with higher performance. But if you find something, we'd switch.
Happy for it to be an optional Cargo feature. Note that it is already gated on a few things. Alternatively have you tried asking upstream at jemalloc, in case they can have a fallback path for the NixOS example?
from buck2.
I believe Jason has stated multiple times that the page size being (effectively) part of the API isn't going to change because it would require a large rework; see jemalloc/jemalloc#467. That said, apparently jemalloc can support sizes smaller than the baked in page size (e.g. build for 16k, run on 4k using the --with-lg-page
option) — and it looks like NixOS enables that feature! Which is nice, but...
It would probably be good to still add a flag for places that don't enable this, and also because packages like jemallocator
tend to do things like build their own copy of jemalloc as part of their build.rs
, which then thwarts usage of the NixOS version with the appropriate flags. While this can (and probably should) be fixed on our side, it's likely not the last time something like this will happen.
from buck2.
A feature flag to disable jemalloc seems reasonable, and like it would solve all the issues here. Patch welcome.
from buck2.
Related Issues (20)
- Treat
- Test
- Does not prebuilt_cxx_library.static_lib support $(location //:target)? HOT 3
- Conflicting inputs on erlang build of Opentelemetry HOT 1
- error: Variable `typing` not found HOT 2
- Excluding rules from certain platforms HOT 6
- Unable to `buck2 clean` a repo which uses `git_fetch()` on Windows
- `configured_alias` and configuration modifiers HOT 2
- review Go analysis.Pass.Module proposal
- Creating symbolic links to toolchains HOT 10
- Early-building some parts of graph HOT 7
- How to use "buck2 clean" or other commands to delete only the generated files (cache) without killing the daemon? HOT 2
- Question: how to pass dependencies that change state forward across a non-output-changing rule HOT 4
- buck2 : Is java supported as a part of buck2 HOT 2
- Share work across configurations by setting working directory for actions then canonicalizing that working directory in RE HOT 5
- How to use multiple execution platforms HOT 1
- Distributed project.ignore
- How to use c/aquery to find the dependents of an anon_target HOT 3
- Trouble linking Apple Frameworks HOT 1
- documentation mentions `frecli` which doesn't seem to be available publicly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buck2.