Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

ci: gnu parallel set --memfree 100M #9136

Merged
merged 6 commits into from
Mar 19, 2020
Merged

ci: gnu parallel set --memfree 100M #9136

merged 6 commits into from
Mar 19, 2020

Conversation

ggilmore
Copy link
Contributor

@ggilmore ggilmore commented Mar 19, 2020

See golangci/golangci-lint#994

It seems like golang-ci lint uses a fair amount of memory. Running that in parallel with yarn steps might be causing memory issues / flakes. Downgrading golang-ci doens't seem to help.

I discovered a new flag for gnu parallel, --memfree $SIZE that prevents queuing new tasks if < $SIZE memory is free and will kill and restart tasks if < $SIZE/2 memory remains. Let's see if this fixes things.

see https://www.gnu.org/software/parallel/man.html


Believed to be the cause of flakes like https://buildkite.com/sourcegraph/sourcegraph/builds/58560#a827d10a-4c85-4822-bc1d-f3e3f9571792

@ggilmore ggilmore requested review from keegancsmith, uwedeportivo and a team March 19, 2020 01:17
@uwedeportivo
Copy link
Contributor

i approved since i'm in the middle of releasing and need CI to be unclogged :-)

Geoffrey Gilmore added 2 commits March 18, 2020 18:30
@ggilmore ggilmore changed the title ci: downgrade golangci-lint to 1.23.8 ci: downgrade golangci-lint to 1.23.6 Mar 19, 2020
@ggilmore ggilmore requested a review from beyang as a code owner March 19, 2020 01:51
@ggilmore ggilmore changed the title ci: downgrade golangci-lint to 1.23.6 ci: gnu parallel set --memfree 100M Mar 19, 2020
@ggilmore ggilmore merged commit a996ae3 into master Mar 19, 2020
@ggilmore ggilmore deleted the fix-ci-lint branch March 19, 2020 02:30
@keegancsmith
Copy link
Member

I recently enabled the unused staticcheck again. It likely has increased the memory usage to much. We can just disable it, the value it provides continuously is likely not worth the resource cost.

@dominikh
Copy link

I recently enabled the unused staticcheck again. It likely has increased the memory usage to much. We can just disable it, the value it provides continuously is likely not worth the resource cost.

Note also that I am working on reducing memory usage in a future release (although to benefit from it, one would have to use the staticcheck tool, not golangci-lint.)

@keegancsmith
Copy link
Member

I recently enabled the unused staticcheck again. It likely has increased the memory usage to much. We can just disable it, the value it provides continuously is likely not worth the resource cost.

Note also that I am working on reducing memory usage in a future release (although to benefit from it, one would have to use the staticcheck tool, not golangci-lint.)

Yeah I'm not actually sure when we switched to golanglint-ci, we used to directly use staticcheck. I'd be happy to switch to that again :) Also thank you so much for investigating reducing memory usage, its a tough problem to solve!

eseliger pushed a commit that referenced this pull request Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants