Skip to content

Commit

Permalink
add some swap to avoid memory fragmentation (#10387)
Browse files Browse the repository at this point in the history
This should hopefully fix failing builds like
https://github.com/near/nearcore/actions/runs/7410527434/job/20163048488

My guess is this issue is not actually OOM, but memory fragmentation,
because AFAIR larger github runners don’t have any swap.

Adding just a bit of swap would thus likely solve the issue, but we have
1.2T of disk space, so we may as well add quite a bit so that linux can
do whatever it wants to be faster.

Part of near/near-one-project-tracking#9
  • Loading branch information
Ekleog-NEAR authored Jan 5, 2024
1 parent ccbb5e4 commit 02c725c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/master_fuzzer_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
id-token: "write"

steps:
- run: sudo fallocate -l 128G /swap-file
- run: sudo chmod 600 /swap-file
- run: sudo mkswap /swap-file
- run: sudo swapon /swap-file

- id: "auth"
uses: "google-github-actions/auth@v1"
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ondemand_fuzzer_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
id-token: "write"

steps:
- run: sudo fallocate -l 128G /swap-file
- run: sudo chmod 600 /swap-file
- run: sudo mkswap /swap-file
- run: sudo swapon /swap-file

- id: "auth"
uses: "google-github-actions/auth@v1"
with:
Expand Down

0 comments on commit 02c725c

Please sign in to comment.