-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Use jemalloc to compile dist on CI (x86_64-linux) #122047
Conversation
I think this is good, and haven't gotten a bad review. Let's hope that I'm right! |
This comment has been minimized.
This comment has been minimized.
Use jemalloc to compile dist on CI (x86_64-linux) Based on [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Is.20the.20BOLT.20on.20CI.20using.20jemalloc/near/424424207) I added Jemalloc for building LLVM, this should cut some CI time. r? `@Kobzol`
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
Co-authored-by: Rémy Rakic <[email protected]>
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Use jemalloc to compile dist on CI (x86_64-linux) Based on [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Is.20the.20BOLT.20on.20CI.20using.20jemalloc/near/424424207) I added Jemalloc for building LLVM, this should cut some CI time. r? `@Kobzol`
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.
I'm pretty sure that this only applies to the first command, and not to the whole chain (commands after &&
) 😆. Bash is annoying.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Also for the next attempt, we don't need to run the benchmarks, just try :) |
Finished benchmarking commit (df44909): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 646.206s -> 646.285s (0.01%) |
Hmmm... How should I check if this implies an improvement 😅 The action took 2h 24m, we can compare that with an arbitrary merge, and compared to e.g. #122054, this one seems to take an 40 minutes (1h 44m), is there any other number that I can check? I don't think that installing a simple jemalloc dependency could increase that much CI time (it should cut some minutes.) |
We have to do two (or more) try builds in a row, so that the Docker cache kicks in. @bors try |
Use jemalloc to compile dist on CI (x86_64-linux) Based on [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Is.20the.20BOLT.20on.20CI.20using.20jemalloc/near/424424207) I added Jemalloc for building LLVM, this should cut some CI time. r? `@Kobzol`
☀️ Try build successful - checks-actions |
Ah, the environment command is still wrong. We need to use it for the invocation of ENV SCRIPT python3 ../x.py build --set rust.debug=true opt-dist && \
LD_PRELOAD=`jemalloc-config --libdir`/libjemalloc.so.`jemalloc-config --revision` ./build/$HOSTS/stage0-tools-bin/opt-dist linux-ci -- python3 ../x.py dist \
--host $HOSTS --target $HOSTS \
--include-default-paths \ |
Sorry for wasting so much time. It's a little bit embarrassing to mess up a simple 2-line change so many times. |
Nah, you're not wasting time, this could actually help in the end :) You should check out some of my PRs that modify CI workflows, I have run try builds several hundred times at least 😆 It's normal. @bors try |
Use jemalloc to compile dist on CI (x86_64-linux) Based on [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Is.20the.20BOLT.20on.20CI.20using.20jemalloc/near/424424207) I added Jemalloc for building LLVM, this should cut some CI time. r? `@Kobzol`
Hmm, this prints an empty line: FOO=BAR echo $(printenv) | grep FOO so that would suggest that |
I think subshells only get Seems like inline env only gets sent to the first process? I.e. Feels like I learn something new about bash every day :) |
Ah, makes sense. Yeah, for a Rust process, it should be enough if the parent gets the env, and then it should (hopefully) propagate through everything (I think that bootstrap does indeed propagate ENVs by default).
Yeah, same 😆 |
☀️ Try build successful - checks-actions |
@@ -33,6 +33,7 @@ RUN yum upgrade -y && \ | |||
xz \ | |||
zlib-devel.i686 \ | |||
zlib-devel.x86_64 \ | |||
jemalloc-devel \ |
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.
You don't need -devel
-- the base package includes a jemalloc.sh
wrapper script that will set LD_PRELOAD
for you.
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.
Sorry for the delay, do you know where this jemalloc.sh script is located?
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 /usr/bin/jemalloc.sh
, so that's even in the PATH
.
@bors try |
Use jemalloc to compile dist on CI (x86_64-linux) Based on [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Is.20the.20BOLT.20on.20CI.20using.20jemalloc/near/424424207) I added Jemalloc for building LLVM, this should cut some CI time. r? `@Kobzol`
☀️ Try build successful - checks-actions |
Doesn't seem to have helped. It's hard to say whether it was used at all though. Maybe we could check e.g. in bootstrap. |
I'll do some debugging in my machine to make sure that it is 100% being compiled with jemalloc. |
Hmmm... But I'm not sure how Docker would have this issue, if the Dockerfile does a |
Inside the |
Hmmmm... I've been trying for a while (for like a month and a half) to just get this to run in my machine, including changing distro and getting a new hard drive (and changing from HDD to SSD). I'll close this to get the issue free for people that have the workflow already set up. It seems like my PC is just not having it :/ |
Based on this Zulip thread
I added Jemalloc for building LLVM, this should cut some CI time.
r? @Kobzol