-
Notifications
You must be signed in to change notification settings - Fork 889
fix: reduce parallelism and increase worker size on go-test-race #15106
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @spikecurtis and the rest of your teammates on |
acd695c
to
86a7b45
Compare
@Emyrk @johnstcn @dannykopping @ammario WDYT? My hope is that this will reduce occurrences of flakes like coder/internal#102 where things just get inexplicably slow for multiple seconds. We could also consider throwing beefier hardware at the race tests, but I still think we need to explicitly limit parallelism, or Go will see the increased HW threads and do even more stuff in parallel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's give it a try! This was suggested previously in #12761 (without -p 2
).
For the benefit of future readers, I'd also suggest adding a clarifying comment and linking to this PR for context.
@spikecurtis Do you happen to know the approximate difference in execution time with and without? Do we maybe also need to update the value for -timeout
?
EDIT: should we also update test-race
to be more in line with the CI version?
Edit:
My suggestion was exactly opposite to what you are saying. |
With this PR, the |
@matifali I think what's going on is that in CI, we are running too many things in parallel and starving individual tests of CPU they need to execute in something close to the amount of time they were designed for. That is, we need more resources for the |
@spikecurtis Feel free to use a larger runner if it reduces CI time. if a 16-core runner does this in 5 minutes it will cost us the same amount while reducing time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How many parallel github actions jobs can run on 1 machine?
Is it possible 2 go test
are running on the same machine from different branches? Like 2 github actions firing and running in parallel?
@Emyrk, each job in the workflow is run on a new ephemeral VM. They are single tenant. See https://depot.dev/docs/github-actions/overview |
@spikecurtis do you know if we're setting |
86a7b45
to
e1d55b8
Compare
I think we are not, which makes it default to the number of HW threads |
e1d55b8
to
b8ba1b5
Compare
I increased to 4 concurrent packages and the worker to a 16 core box and we are back at ~6min. |
Are we only running one CI job per host, or multiple in parallel? In that case we could consider tuning |
Its one CI job per host, running on depot.dev VMs |
Ah. In that case the default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to experiment 👍
The slowness on that example is a bit crazy.
For the example in particular, I do think we could refactor the test to more isolate the agent and Coder ends. Make it do less 🤷♂️
Sets parallelism on go-test-race to 4 concurrent tests and 2 concurrent packages.