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

Increase runner size for Cargo Dev and Sanitizer workflows #685

Merged
merged 1 commit into from
Mar 2, 2024

Conversation

aaronmondal
Copy link
Member

@aaronmondal aaronmondal commented Mar 1, 2024

This should fix recent CI breakages on main.


This change is Reviewable

Copy link

vercel bot commented Mar 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nativelink-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 2, 2024 9:05pm

Copy link
Member Author

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+@allada +@MarcusSorealheis

Reviewable status: 0 of 2 LGTMs obtained, and pending CI: Analyze (javascript-typescript), Analyze (python), Bazel Dev / ubuntu-22.04, Cargo Dev / large-ubuntu-22.04, Cargo Dev / macos-13, Local / ubuntu-22.04, Remote / large-ubuntu-22.04, Vercel, asan / large-ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, pre-commit-checks, publish-image, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, vale, windows-2022 / stable, zig-cc ubuntu-20.04, zig-cc ubuntu-22.04 (waiting on @allada and @MarcusSorealheis)

Copy link
Member

@allada allada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 LGTMs obtained, and pending CI: Analyze (javascript-typescript), Bazel Dev / ubuntu-22.04, Local / ubuntu-22.04, Vercel, asan / large-ubuntu-22.04, docker-compose-compiles-nativelink (20.04), pre-commit-checks, publish-image, ubuntu-20.04 / stable, ubuntu-22.04, vale (waiting on @MarcusSorealheis)

a discussion (no related file):
I'm not sold we should do this. We are not doing complex stuff in these runners, why is it using so much disk size?

Last time we increased runner sizes it cost a ton of money too.


Copy link
Member Author

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 LGTMs obtained, and pending CI: Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Remote / large-ubuntu-22.04, asan / large-ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, publish-image, windows-2022 / stable (waiting on @allada and @MarcusSorealheis)

a discussion (no related file):

Previously, allada (Nathan (Blaise) Bruer) wrote…

I'm not sold we should do this. We are not doing complex stuff in these runners, why is it using so much disk size?

Last time we increased runner sizes it cost a ton of money too.

The sanitizer run produces much larger artifacts since it builds instrumented code. That run was somewhat expected to run into issues at some point.

The cargo-dev run runs into issues because the default size for the linux runners is a bit smaller than Mac and Windows, so this is also not too surprising.

I agree that we don't really need more cores though. Maybe we could add a new runner type in github that just increases the local storage size but doesn't add additional cores?


Copy link
Member

@allada allada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 LGTMs obtained (waiting on @MarcusSorealheis)

a discussion (no related file):

Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…

The sanitizer run produces much larger artifacts since it builds instrumented code. That run was somewhat expected to run into issues at some point.

The cargo-dev run runs into issues because the default size for the linux runners is a bit smaller than Mac and Windows, so this is also not too surprising.

I agree that we don't really need more cores though. Maybe we could add a new runner type in github that just increases the local storage size but doesn't add additional cores?

It looks like these runners have 14 GB according to documentation.

I'm thinking maybe sanitizers should use a non-debug build? I believe cargo by default uses debug builds.

Could we also somehow tell nix to use less disk space?


Copy link
Member Author

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 LGTMs obtained, and pending CI: Analyze (javascript-typescript), Analyze (python), Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Local / ubuntu-22.04, Remote / large-ubuntu-22.04, Vercel, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, pre-commit-checks, publish-image, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, vale, windows-2022 / stable, zig-cc ubuntu-20.04, zig-cc ubuntu-22.04 (waiting on @allada and @MarcusSorealheis)

a discussion (no related file):

Previously, allada (Nathan (Blaise) Bruer) wrote…

It looks like these runners have 14 GB according to documentation.

I'm thinking maybe sanitizers should use a non-debug build? I believe cargo by default uses debug builds.

Could we also somehow tell nix to use less disk space?

Removing debug symbols seems to help xD


Copy link
Member

@allada allada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 3 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: 0 of 2 LGTMs obtained (waiting on @MarcusSorealheis)


.github/workflows/nix.yaml line 84 at r4 (raw file):

        run: >
          nix develop --impure --command
          bash -c "cargo test --all --release"

I suggest adding this to Cargo.toml:

[profile.tiny]
inherits = "release"
opt-level = "z"
strip = true
lto = "thin"

Then use --profile=tiny instead. I think this will dramatically improve compile time too.

Introduce `smol` profile for smaller, faster builds. The new profile
reduces the size of the `target` directory from ~12GB to ~1GB.

Fixes recent CI breakages due to "no space left on device" errors.
Copy link
Member

@allada allada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r5, all commit messages.
Reviewable status: 0 of 2 LGTMs obtained, and pending CI: Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, publish-image, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, windows-2022 / stable, zig-cc ubuntu-20.04, zig-cc ubuntu-22.04 (waiting on @MarcusSorealheis)


Cargo.toml line 15 at r5 (raw file):

# Prefer this profile in CI, for instance via `cargo test --all --profile=smol`.
# It reduces the size of the `target` directory from ~12GB to ~1GB.
[profile.smol]

nit: what does smol mean?

Copy link
Member

@allada allada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 1 of 2 LGTMs obtained, and pending CI: Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, publish-image, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, windows-2022 / stable, zig-cc ubuntu-20.04, zig-cc ubuntu-22.04 (waiting on @MarcusSorealheis)

Copy link
Member Author

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-@MarcusSorealheis

Reviewable status: 1 of 1 LGTMs obtained


Cargo.toml line 15 at r5 (raw file):

Previously, allada (Nathan (Blaise) Bruer) wrote…

nit: what does smol mean?

🐈 https://knowyourmeme.com/memes/smol

See also:

Copy link
Collaborator

@MarcusSorealheis MarcusSorealheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: 1 of 1 LGTMs obtained

@aaronmondal aaronmondal merged commit b9029bb into TraceMachina:main Mar 2, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants