-
Notifications
You must be signed in to change notification settings - Fork 653
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
github workflow: use GOMEMLIMIT
to limit mem usage
#610
Conversation
Remove the comment and switch from `GOGC` to `GOMEMLIMIT` as the project uses Go 1.21. Signed-off-by: Ivan Valdes <[email protected]>
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
Thanks for updating.
I was thinking we should use large runner to test. Never mind, it should be other pull request.
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.
Comparing actions run times with this pr things look pretty normal compared to historic and all green. Thanks for tidying this up @ivanvc.
@fuweid, I can work on it in another PR, do you have a reference of how to define a large runner? |
@ivanvc you can try to use REF: etcd-io/etcd@3f6a5c0 |
Thanks, I'll try it out. |
We should consider to use larger runner for the following tests which used to run longer than other workflows,
|
# | ||
# REF: https://github.com/actions/runner-images/issues/6680#issuecomment-1335778010 | ||
GOGC=30 CPU=4 ENABLE_RACE=true make test | ||
GOMEMLIMIT=2048MiB CPU=4 ENABLE_RACE=true make test |
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.
Based on the Suggested uses
in https://tip.golang.org/doc/gc-guide,
Don't use the memory limit when deploying to an execution environment you don't control
.Don't set a memory limit to avoid out-of-memory conditions when a program is already close to its environment's memory limits.
Also the default value for GOGC is 100, which should be good enough.
What we can do is to try to use larger runner.
So can we just remove the configuration? I mean we don't use GOGC, nor GOMEMLIMIT?
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.
The original issue seems to imply jobs are being killed due to excessive resource usage: actions/runner-images#6680 and based on discussion / linked issues it appears to be ongoing.
However I don't actually know if we are still impacted by this, based on the comments we were historically.
Agree let's try large runner for longer jobs and see if we can just remove it altogether. We can always reinstate the limit if necessary.
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.
These changes would change the approach for this PR. I pushed them to #612.
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.
The GOGC was used to prevent from unexpected kill. I think the issue is still here if we don't use larger size runner.
Yeah, I prefer to abort this one and use #612.
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.
Would using the large runner just for the race test case make sense? And leave the others with the regular runner? I can change the implementation if that sounds good.
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.
SGTM - 4cpu race (amd64 +arm64) and windows tests are the ones that need extra resources.
Closing in favor of #612. |
Remove the comment and switch from
GOGC
toGOMEMLIMIT
as the project uses Go 1.21.Fixes #609.