Skip to content

Commit

Permalink
chore(ci): Limit tokio/rayon pools for zk_toolbox CI (matter-labs#2828)
Browse files Browse the repository at this point in the history
## What ❔

Limits rayon threadpool size to 2 and tokio threadpool size to 4 in
zk_toolbox CI.
I have checked locally, and with this configuration time to run
integration tests is pretty close to the default configuration.

## Why ❔

By default, both tokio and rayon will try to use all the CPUs. When we
run multiple Rust binaries at the same time (3 servers and 3 ENs in our
case), it causes a lot of conflict for resources, regardless of the
number of CPUs.
  • Loading branch information
popzxc authored Sep 10, 2024
1 parent b8925dd commit fb57d05
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/ci-zk-toolbox-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ on:

env:
CLICOLOR: 1
# We run multiple binaries in parallel, and by default they will try to utilize all the
# available CPUs. In tests, there is not much CPU-intensive work (rayon), but a lot of
# async work (tokio), so we prioritize tokio.
TOKIO_WORKER_THREADS: 4
RAYON_NUM_THREADS: 2

jobs:
lint:
name: lint
uses: ./.github/workflows/ci-core-lint-reusable.yml

tests:
runs-on: [ matterlabs-ci-runner ]
runs-on: [ matterlabs-ci-runner-ultra-performance ]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
Expand Down

0 comments on commit fb57d05

Please sign in to comment.