forge
Explore
Log in

Don't you dare go Hollow

Declare 5g per job, jobs cannot swap so leave room above the rustc peak

Browse files at this commit

7e7f29543726305b71e774cfc91d9d98913dd0d6Ahmet Kaan GümüşParent: edff93b
  • ci
    • declare 5g per job, jobs cannot swap so leave room above the rustc peak
Show full message
👷 ci: declare 5g per job, jobs cannot swap so leave room above the rustc peak
.forge/ci.tomlmodified+5 -5
@@ -5,7 +5,7 @@
5 # (two runners, or one runner with concurrency = 2). Capacity includes memory: each job declares its5 # (two runners, or one runner with concurrency = 2). Capacity includes memory: each job declares its
6 # peak in `memory`, and a runner admits a job only while the declared memory of its running jobs6 # peak in `memory`, and a runner admits a job only while the declared memory of its running jobs
7 # fits its budget. On the 7.6 GiB runner host the budget is about 6.5 GiB, and test plus build7 # fits its budget. On the 7.6 GiB runner host the budget is about 6.5 GiB, and test plus build
8-# declare 4g each, so they do NOT run together there: one heavy job at a time is the point. An8+# declare 5g each, so they do NOT run together there: one heavy job at a time is the point. An
9 # earlier run with concurrency 4 hit a host-wide OOM and the kernel killed rustc mid-build.9 # earlier run with concurrency 4 hit a host-wide OOM and the kernel killed rustc mid-build.
10 # The build job's artifacts are still only used10 # The build job's artifacts are still only used
11 # once the whole run is green: a tag push matching "v*" publishes a release with the build job's11 # once the whole run is green: a tag push matching "v*" publishes a release with the build job's
@@ -21,8 +21,8 @@ tags = ["v*"]
21 [jobs.test]21 [jobs.test]
22 image = "docker.io/library/rust:1"22 image = "docker.io/library/rust:1"
23 # Runner has a few GB RAM and 2 CPUs: rustc runs one crate at a time because a single forge-web compile needs several GB. Also drops debuginfo.23 # Runner has a few GB RAM and 2 CPUs: rustc runs one crate at a time because a single forge-web compile needs several GB. Also drops debuginfo.
24-# memory: rustc peaked at 3.1 to 3.6 GB RSS in the OOM data, so 4g is the expected peak, and the job's cgroup is capped at 4g plus slack.24+# memory: rustc peaked at 3.1 to 3.6 GB RSS in the OOM data. Jobs cannot swap, so 5g leaves room for cargo and the linker on top; only one heavy job fits the budget either way.
25-memory = "4g"25+memory = "5g"
26 env = { CARGO_BUILD_JOBS = "1", CARGO_PROFILE_DEV_DEBUG = "0", CARGO_PROFILE_TEST_DEBUG = "0", CARGO_INCREMENTAL = "0" }26 env = { CARGO_BUILD_JOBS = "1", CARGO_PROFILE_DEV_DEBUG = "0", CARGO_PROFILE_TEST_DEBUG = "0", CARGO_INCREMENTAL = "0" }
27 run = """27 run = """
28 cargo test --workspace28 cargo test --workspace
@@ -33,8 +33,8 @@ timeout_minutes = 120
33 [jobs.build]33 [jobs.build]
34 image = "docker.io/library/rust:1"34 image = "docker.io/library/rust:1"
35 # Runner has a few GB RAM and 2 CPUs: rustc runs one crate at a time because a single forge-web compile needs several GB.35 # Runner has a few GB RAM and 2 CPUs: rustc runs one crate at a time because a single forge-web compile needs several GB.
36-# memory: the dist profile uses thin LTO, whose link step peaks like the test build (3.1 to 3.6 GB RSS seen), so 4g.36+# memory: the dist profile uses thin LTO, whose link step peaks like the test build (3.1 to 3.6 GB RSS seen). 5g for the same headroom reason.
37-memory = "4g"37+memory = "5g"
38 env = { CARGO_BUILD_JOBS = "1", CARGO_INCREMENTAL = "0" }38 env = { CARGO_BUILD_JOBS = "1", CARGO_INCREMENTAL = "0" }
39 run = """39 run = """
40 cargo build --profile dist -p forge-web -p forge-runner40 cargo build --profile dist -p forge-web -p forge-runner