-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Make EphemeralRunnerController MaxConcurrentReconciles configurable #3832
Conversation
// This updates the option value only if the environment variable is set. | ||
// If the option is already set (via a command-line flag), the value from the environment variable takes precedence. | ||
func (o *Options) LoadEnv() error { | ||
v, err := o.getEnvInt("RUNNER_MAX_CONCURRENT_RECONCILES") |
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 added this env just to make it easy to give it a shot without modifying the chart.
Instead, we can modify the manager args template there
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.
@mumoshu - I recommend we go with modifying the chart and adding this as an extra element under flags
:
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.
// rather than having to correlate those in multiple places. | ||
func OptionsWithDefault() Options { | ||
return Options{ | ||
RunnerMaxConcuncurrentReconciles: 2, |
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.
Making 2 the new default so that users can benefit from the update without any config changes.
Formerly it was treated 1 as not specified, and having 2 shouldn't be harmful as you should be able to limit CPU req/lim at the K8s level anyway.
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.
Thank you @mumoshu 🙏
Improve the runner pod startup times by using more goroutines(almost "more cpus", assuming you are NOT K8s API or network bounded) for ephemeralrunner reconciliation.
Today,
cotroller-runtime
and hence ARC reconciles EphemeralRunnerPod one by one, which should be limiting the runner pod creation throughput to almostunit time / latency of the GHA jit config API
.If you are not bounded by CPU, K8s, network, or GHA-API yet, setting N MaxConcurrentReconciles should improve the throughput by N.
This is the PR for the second commit mentioned in #3276 (comment).