[{"data":1,"prerenderedAt":19},["ShallowReactive",2],{"$fudpy5bz0g10c":3},{"slug":4,"title":5,"date":6,"description":7,"tags":8,"cover":13,"source":14,"canonical":13,"link":13,"series":13,"draft":15,"glossary":16,"readingTime":17,"html":18},"tuning-actions-runner-controller-flag-ratios","Tuning actions-runner-controller: Flag Ratios and Concurrency Profiles","2026-11-04T00:00:00.000Z","How ARC's four reconcile-concurrency flags, the Kubernetes client rate limiter and the workqueue limiter fit together, with sizing profiles from small to XL.",[9,10,11,12],"kubernetes","github-actions","arc","devops",null,"hanselwei.dev",false,true,11,"\u003Cp>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\" target=\"_blank\" rel=\"noopener\">actions-runner-controller\u003C\u002Fa> (\u003Cabbr class=\"term\" data-term=\"arc\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-arc-1\">ARC\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-arc-1\" hidden>Actions Runner Controller: runs GitHub Actions jobs on your own Kubernetes cluster.\u003C\u002Fspan>) runs \u003Cabbr class=\"term\" data-term=\"github-actions\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-github-actions-2\">GitHub Actions\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-github-actions-2\" hidden>GitHub's automation: runs builds, tests and deploys when code changes.\u003C\u002Fspan> jobs on your own \u003Cabbr class=\"term\" data-term=\"kubernetes\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-kubernetes-3\">Kubernetes\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-kubernetes-3\" hidden>A system that runs and manages many containers across many servers.\u003C\u002Fspan> cluster. Out of the box it is tuned for a handful of \u003Cabbr class=\"term\" data-term=\"runner-scale-set\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-runner-scale-set-4\">runner scale sets\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-runner-scale-set-4\" hidden>A group of identical self-hosted GitHub Actions runners that ARC grows and shrinks with the number of waiting jobs.\u003C\u002Fspan> and a modest stream of jobs. Push it harder and you find a set of flags in \u003Ccode>main.go\u003C\u002Fcode> that decide how much work the controller does at once, and how hard it may lean on the Kubernetes \u003Cabbr class=\"term\" data-term=\"api-server\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-api-server-5\">API server\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-api-server-5\" hidden>The front door of a Kubernetes cluster: every read and write to the cluster's objects goes through it.\u003C\u002Fspan> and on GitHub while doing it.\u003C\u002Fp>\n\u003Cp>The flags are easy to raise one at a time and hard to raise \u003Cem>together\u003C\u002Fem>. This post is the set of ratios I use to keep them in proportion, and four sizing profiles to start from.\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>\u003Cstrong>Version:\u003C\u002Fstrong> everything here is from \u003Cstrong>ARC 0.15.1\u003C\u002Fstrong> (the \u003Ccode>gha-runner-scale-set-controller\u003C\u002Fcode> chart and controller image, released October 2026), read from the upstream source at the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\u002Ftree\u002Fgha-runner-scale-set-0.15.1\" target=\"_blank\" rel=\"noopener\">\u003Ccode>gha-runner-scale-set-0.15.1\u003C\u002Fcode>\u003C\u002Fa> tag. Flags and defaults move between releases, so check \u003Ccode>main.go\u003C\u002Fcode> for the version you run.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cp>The code behind it, in \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\" target=\"_blank\" rel=\"noopener\">actions\u002Factions-runner-controller\u003C\u002Fa>:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\u002Fblob\u002Fgha-runner-scale-set-0.15.1\u002Fmain.go#L129-L171\" target=\"_blank\" rel=\"noopener\">\u003Ccode>main.go\u003C\u002Fcode> lines 129-171\u003C\u002Fa>: the flags\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\u002Fblob\u002Fgha-runner-scale-set-0.15.1\u002Fmain.go#L243-L245\" target=\"_blank\" rel=\"noopener\">\u003Ccode>main.go\u003C\u002Fcode> lines 243-245\u003C\u002Fa>: where the client \u003Cabbr class=\"term\" data-term=\"qps\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-qps-6\">QPS\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-qps-6\" hidden>Queries per second: how many requests a client may send each second before it starts waiting.\u003C\u002Fspan> and burst are applied\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\u002Fblob\u002Fgha-runner-scale-set-0.15.1\u002Fcontrollers\u002Factions.github.com\u002Foptions.go#L45-L52\" target=\"_blank\" rel=\"noopener\">\u003Ccode>controllers\u002Factions.github.com\u002Foptions.go\u003C\u002Fcode> lines 45-52\u003C\u002Fa>: the shipped defaults\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\u002Fblob\u002Fgha-runner-scale-set-0.15.1\u002Fcontrollers\u002Factions.github.com\u002Foptions.go#L87-L99\" target=\"_blank\" rel=\"noopener\">\u003Ccode>controllers\u002Factions.github.com\u002Foptions.go\u003C\u002Fcode> lines 87-99\u003C\u002Fa>: the \u003Cabbr class=\"term\" data-term=\"workqueue\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-workqueue-7\">workqueue\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-workqueue-7\" hidden>A controller's to-do list of objects to reconcile. Each object is in it at most once, and is handed to one worker at a time.\u003C\u002Fspan> \u003Cabbr class=\"term\" data-term=\"rate-limiter\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-rate-limiter-8\">rate limiter\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-rate-limiter-8\" hidden>Something that caps how many requests can be sent in a given time, making the rest wait (or rejecting them).\u003C\u002Fspan> notes\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The background discussion lives upstream in \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\u002Fissues\u002F3021\" target=\"_blank\" rel=\"noopener\">actions\u002Factions-runner-controller#3021\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2>The four concurrency flags\u003C\u002Fh2>\n\u003Cp>ARC's scale set mode runs four controllers, and each gets its own \"max concurrent \u003Cabbr class=\"term\" data-term=\"reconcile\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-reconcile-9\">reconciles\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-reconcile-9\" hidden>What a Kubernetes controller does: compare an object's desired state with what actually exists, and make changes until they match.\u003C\u002Fspan>\" flag: the number of workers pulling from that controller's queue at the same time.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Cp class=\"table-hint\" aria-hidden=\"true\">Scroll sideways \u003Cspan class=\"table-hint-arrow\">→\u003C\u002Fspan>\u003C\u002Fp>\u003Cdiv class=\"table-frame\">\u003Cdiv class=\"table-scroll\" role=\"region\" aria-label=\"Table\" tabindex=\"0\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Flag\u003C\u002Fth>\n\u003Cth>Controller\u003C\u002Fth>\n\u003Cth>Default\u003C\u002Fth>\n\u003Cth>One object per…\u003C\u002Fth>\n\u003Cth>Typical count\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>\u003Ccode>--autoscaling-runner-set-max-concurrent-reconciles\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Cabbr class=\"term\" data-term=\"autoscaling-runner-set\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-autoscaling-runner-set-10\">AutoscalingRunnerSet\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-autoscaling-runner-set-10\" hidden>An ARC object describing one runner scale set: which runners to start and how many, at least and at most.\u003C\u002Fspan>\u003C\u002Ftd>\n\u003Ctd>2\u003C\u002Ftd>\n\u003Ctd>scale set\u003C\u002Ftd>\n\u003Ctd>number of scale sets\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--autoscaling-listener-max-concurrent-reconciles\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Cabbr class=\"term\" data-term=\"autoscaling-listener\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-autoscaling-listener-11\">AutoscalingListener\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-autoscaling-listener-11\" hidden>An ARC object, one per runner scale set, that runs a listener pod. The pod waits on GitHub for new jobs and asks for more or fewer runners.\u003C\u002Fspan>\u003C\u002Ftd>\n\u003Ctd>2\u003C\u002Ftd>\n\u003Ctd>scale set\u003C\u002Ftd>\n\u003Ctd>number of scale sets\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--ephemeral-runner-set-max-concurrent-reconciles\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Cabbr class=\"term\" data-term=\"ephemeral-runner-set\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-ephemeral-runner-set-12\">EphemeralRunnerSet\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-ephemeral-runner-set-12\" hidden>An ARC object, one per runner scale set, that creates and removes EphemeralRunners to match the number of runners wanted.\u003C\u002Fspan>\u003C\u002Ftd>\n\u003Ctd>2\u003C\u002Ftd>\n\u003Ctd>scale set\u003C\u002Ftd>\n\u003Ctd>number of scale sets\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--ephemeral-runner-max-concurrent-reconciles\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Cabbr class=\"term\" data-term=\"ephemeral-runner\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-ephemeral-runner-13\">EphemeralRunner\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-ephemeral-runner-13\" hidden>An ARC object for one single-use runner: it registers with GitHub, runs exactly one job in its own pod, then is removed.\u003C\u002Fspan>\u003C\u002Ftd>\n\u003Ctd>4\u003C\u002Ftd>\n\u003Ctd>runner\u003C\u002Ftd>\n\u003Ctd>hundreds, at peak\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>The detail that makes these flags make sense: \u003Cstrong>\u003Cabbr class=\"term\" data-term=\"controller-runtime\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-controller-runtime-14\">controller-runtime\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-controller-runtime-14\" hidden>The Go library most Kubernetes controllers, ARC included, are built on: it watches objects, queues changes and runs the reconcile workers.\u003C\u002Fspan> never reconciles the same object twice at once.\u003C\u002Fstrong> Its workqueue hands each object key to one worker at a time, and if the object changes mid-reconcile, the key is queued again for after that worker finishes. So the parallelism you actually get is:\u003C\u002Fp>\n\u003Cpre tabindex=\"0\">\u003Ccode class=\"language-text\">effective parallelism = min(flag, number of distinct objects with pending work)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>That is why EphemeralRunner is the only controller with a higher default. It reconciles one object per runner, so a scale set with \u003Ccode>maxRunners: 50\u003C\u002Fcode> really can have 50 independent pieces of work in flight, each going create → running → finished → delete. The other three reconcile one object per \u003Cem>scale set\u003C\u002Fem>. With three scale sets, setting \u003Ccode>--ephemeral-runner-set-max-concurrent-reconciles\u003C\u002Fcode> to 16 still means at most three busy workers; the other thirteen sit idle.\u003C\u002Fp>\n\u003Cfigure>\n\u003Ca href=\"\u002Fimages\u002Fblog\u002Ftuning-actions-runner-controller-flag-ratios\u002Fset-level-workers.svg\">\u003Cimg src=\"\u002Fimages\u002Fblog\u002Ftuning-actions-runner-controller-flag-ratios\u002Fset-level-workers.svg\" alt=\"Line chart: busy workers against the set-level flag from 1 to 32. With 3, 10 and 30 scale sets, each line rises one for one and then goes flat at the scale set count. Everything above the line is idle workers.\" width=\"720\" height=\"440\" loading=\"lazy\">\u003C\u002Fa>\n\u003Cfigcaption>Busy workers = min(flag, scale sets). Past the knee, each extra set-level worker adds nothing.\u003C\u002Ffigcaption>\n\u003C\u002Ffigure>\n\n\u003Cp>Two more things to know before tuning:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Zero doesn't mean \"off\".\u003C\u002Fstrong> Any value of zero or less is swapped for the shipped default before it reaches controller-runtime, so you can't use 0 to disable a controller's concurrency.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The runner flag sizes a second pool.\u003C\u002Fstrong> \u003Ccode>--ephemeral-runner-max-concurrent-reconciles\u003C\u002Fcode> also sets the number of background workers that remove runner registrations from GitHub after a job (\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\u002Fblob\u002Fgha-runner-scale-set-0.15.1\u002Fmain.go#L364-L368\" target=\"_blank\" rel=\"noopener\">\u003Ccode>main.go\u003C\u002Fcode> lines 364-368\u003C\u002Fa>). Raising it speeds up GitHub-side cleanup too, and adds GitHub calls in parallel.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Sizing profiles\u003C\u002Fh2>\n\u003Cp>Four starting points. Small is the shipped defaults; each step up assumes more runner scale sets and more runners.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Cp class=\"table-hint\" aria-hidden=\"true\">Scroll sideways \u003Cspan class=\"table-hint-arrow\">→\u003C\u002Fspan>\u003C\u002Fp>\u003Cdiv class=\"table-frame\">\u003Cdiv class=\"table-scroll\" role=\"region\" aria-label=\"Table\" tabindex=\"0\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Flag\u003C\u002Fth>\n\u003Cth>Small (1-5 sets, under 50 runners)\u003C\u002Fth>\n\u003Cth>Medium (10-30 sets, ~200 runners)\u003C\u002Fth>\n\u003Cth>Large (50+ sets, 500+ runners)\u003C\u002Fth>\n\u003Cth>XL (100+ sets, 1,000+ runners)\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>\u003Ccode>--ephemeral-runner-max-concurrent-reconciles\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>4 (default)\u003C\u002Ftd>\n\u003Ctd>8-10\u003C\u002Ftd>\n\u003Ctd>16-32\u003C\u002Ftd>\n\u003Ctd>64\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--autoscaling-runner-set-max-concurrent-reconciles\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>2 (default)\u003C\u002Ftd>\n\u003Ctd>4-8\u003C\u002Ftd>\n\u003Ctd>10-16\u003C\u002Ftd>\n\u003Ctd>16-32\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--ephemeral-runner-set-max-concurrent-reconciles\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>2 (default)\u003C\u002Ftd>\n\u003Ctd>2-4\u003C\u002Ftd>\n\u003Ctd>4-8\u003C\u002Ftd>\n\u003Ctd>8-16\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--autoscaling-listener-max-concurrent-reconciles\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>2 (default)\u003C\u002Ftd>\n\u003Ctd>2\u003C\u002Ftd>\n\u003Ctd>4\u003C\u002Ftd>\n\u003Ctd>4-8\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--k8s-client-rate-limiter-qps\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>20 (default)\u003C\u002Ftd>\n\u003Ctd>50\u003C\u002Ftd>\n\u003Ctd>100-150\u003C\u002Ftd>\n\u003Ctd>200+\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--k8s-client-rate-limiter-burst\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>30 (default)\u003C\u002Ftd>\n\u003Ctd>100\u003C\u002Ftd>\n\u003Ctd>200\u003C\u002Ftd>\n\u003Ctd>300-400\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--workqueue-rate-limiter\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>bucket_rate_limiter\u003C\u002Fcode> (default)\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>bucket_rate_limiter\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>typed_rate_limiter\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>typed_rate_limiter\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--sync-period\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>1m (default)\u003C\u002Ftd>\n\u003Ctd>1m-5m\u003C\u002Ftd>\n\u003Ctd>5m\u003C\u002Ftd>\n\u003Ctd>5m-10m\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--default-scale-down-delay\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>default\u003C\u002Ftd>\n\u003Ctd>default\u003C\u002Ftd>\n\u003Ctd>default, or +50%\u003C\u002Ftd>\n\u003Ctd>tuned to the gap between job bursts\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--terminated-runner-pod-grace-period-seconds\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>0 (default)\u003C\u002Ftd>\n\u003Ctd>0\u003C\u002Ftd>\n\u003Ctd>0\u003C\u002Ftd>\n\u003Ctd>0\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--watch-namespace\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>all \u003Cabbr class=\"term\" data-term=\"namespace\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-namespace-15\">namespaces\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-namespace-15\" hidden>A named group inside a Kubernetes cluster that keeps one team's or app's objects apart from the rest.\u003C\u002Fspan> (default)\u003C\u002Ftd>\n\u003Ctd>all\u003C\u002Ftd>\n\u003Ctd>consider one namespace\u003C\u002Ftd>\n\u003Ctd>one namespace per controller (\u003Cabbr class=\"term\" data-term=\"shard\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-shard-16\">shard\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-shard-16\" hidden>One slice of a workload split across several copies of a system, so each copy only handles its share.\u003C\u002Fspan>)\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>Notes on the rows that aren't about workers:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>\u003Ccode>--sync-period\u003C\u002Fcode>\u003C\u002Fstrong>: how often every object the controller watches is reconciled again with nothing changed, as a safety net for missed events. Events still trigger a reconcile straight away; this is only the fallback. Longer means less background work at scale and slower recovery from a missed event.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>--default-scale-down-delay\u003C\u002Fcode>\u003C\u002Fstrong>: the cool-down before scaling down after a scale-up, to stop flapping. Longer leaves idle runners around; shorter risks down → up → down loops when jobs arrive in bursts. It's read by the legacy (summerwind.net) \u003Cabbr class=\"term\" data-term=\"horizontal-runner-autoscaler\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-horizontal-runner-autoscaler-17\">HorizontalRunnerAutoscaler\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-horizontal-runner-autoscaler-17\" hidden>The autoscaler from ARC's older (summerwind.net) mode, from before runner scale sets.\u003C\u002Fspan>; in scale set mode the listener drives scaling.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>--terminated-runner-pod-grace-period-seconds\u003C\u002Fcode>\u003C\u002Fstrong>: 0 removes a finished runner \u003Cabbr class=\"term\" data-term=\"pod\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-pod-18\">pod\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-pod-18\" hidden>The smallest thing Kubernetes runs: one or more containers started together on the same machine.\u003C\u002Fspan> straight away so its replacement can start at once. A negative value hands over to the pod's own \u003Ccode>terminationGracePeriodSeconds\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>--watch-namespace\u003C\u002Fcode>\u003C\u002Fstrong>: limits the controller's cache to one namespace, which cuts memory and the number of events it handles. At XL, splitting scale sets across namespaces with one controller each is a way to shard the load.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>The ratios\u003C\u002Fh2>\n\u003Cp>Raising one flag moves the bottleneck to the next one. These are the ratios that keep them in step.\u003C\u002Fp>\n\u003Ch3>1. Worker ratio: runner workers at 2-4x the set-level workers\u003C\u002Fh3>\n\u003Cp>Keep \u003Ccode>--ephemeral-runner-max-concurrent-reconciles\u003C\u002Fcode> at roughly \u003Cstrong>2-4x\u003C\u002Fstrong> the set-level controllers. Runners outnumber scale sets by a wide margin, so the runner controller is where work piles up first.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Cp class=\"table-hint\" aria-hidden=\"true\">Scroll sideways \u003Cspan class=\"table-hint-arrow\">→\u003C\u002Fspan>\u003C\u002Fp>\u003Cdiv class=\"table-frame\">\u003Cdiv class=\"table-scroll\" role=\"region\" aria-label=\"Table\" tabindex=\"0\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Profile\u003C\u002Fth>\n\u003Cth>ephemeral-runner\u003C\u002Fth>\n\u003Cth>autoscaling-runner-set\u003C\u002Fth>\n\u003Cth>ephemeral-runner-set\u003C\u002Fth>\n\u003Cth>listener\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>Default\u003C\u002Ftd>\n\u003Ctd>4\u003C\u002Ftd>\n\u003Ctd>2\u003C\u002Ftd>\n\u003Ctd>2\u003C\u002Ftd>\n\u003Ctd>2\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Medium\u003C\u002Ftd>\n\u003Ctd>8\u003C\u002Ftd>\n\u003Ctd>4\u003C\u002Ftd>\n\u003Ctd>2\u003C\u002Ftd>\n\u003Ctd>2\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Large\u003C\u002Ftd>\n\u003Ctd>16\u003C\u002Ftd>\n\u003Ctd>8\u003C\u002Ftd>\n\u003Ctd>4\u003C\u002Ftd>\n\u003Ctd>4\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>XL\u003C\u002Ftd>\n\u003Ctd>64\u003C\u002Ftd>\n\u003Ctd>16\u003C\u002Ftd>\n\u003Ctd>8\u003C\u002Ftd>\n\u003Ctd>4\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>And the set-level flags should never go above your scale set count: past that, the extra workers have nothing to do.\u003C\u002Fp>\n\u003Ch3>2. Client QPS to workers: about two writes in flight per worker\u003C\u002Fh3>\n\u003Cp>The controller's Kubernetes client has its own rate limiter (\u003Ccode>--k8s-client-rate-limiter-qps\u003C\u002Fcode> and \u003Ccode>--k8s-client-rate-limiter-burst\u003C\u002Fcode>), applied once to the client config in \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\u002Fblob\u002Fgha-runner-scale-set-0.15.1\u002Fmain.go#L243-L245\" target=\"_blank\" rel=\"noopener\">\u003Ccode>main.go\u003C\u002Fcode> lines 243-245\u003C\u002Fa>. All four controllers share it.\u003C\u002Fp>\n\u003Cp>The good news is that reads are free: \u003Ccode>Get\u003C\u002Fcode> and \u003Ccode>List\u003C\u002Fcode> are served from the \u003Cabbr class=\"term\" data-term=\"informer-cache\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-informer-cache-19\">informer cache\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-informer-cache-19\" hidden>A controller's local copy of the Kubernetes objects it cares about, kept up to date by a watch, so reading them never calls the API server.\u003C\u002Fspan>, a local copy of the objects kept up to date by a watch, and never touch the client limiter. Only \u003Cstrong>writes\u003C\u002Fstrong> do: Create, Patch, Delete and status patches. For an EphemeralRunner that's about \u003Cstrong>1-4 writes per reconcile\u003C\u002Fstrong> (add the \u003Cabbr class=\"term\" data-term=\"finalizer\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-finalizer-20\">finalizer\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-finalizer-20\" hidden>A marker on a Kubernetes object that holds off its deletion until a controller has finished cleaning up after it.\u003C\u002Fspan>, create the registration secret, create the pod, patch status), and \u003Cstrong>6-10 writes over one runner's life\u003C\u002Fstrong> once cleanup (delete the pod and secret, remove the finalizer) is counted.\u003C\u002Fp>\n\u003Cp>So:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>QPS ≥ total workers × ~2\u003C\u002Fstrong> writes in flight.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Burst ≥ QPS\u003C\u002Fstrong>, and \u003Cstrong>burst ≥ your largest worker pool\u003C\u002Fstrong>, so a full pool waking up at once isn't throttled on its first write.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Worked through for the profiles, taking the top of each range:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Cp class=\"table-hint\" aria-hidden=\"true\">Scroll sideways \u003Cspan class=\"table-hint-arrow\">→\u003C\u002Fspan>\u003C\u002Fp>\u003Cdiv class=\"table-frame\">\u003Cdiv class=\"table-scroll\" role=\"region\" aria-label=\"Table\" tabindex=\"0\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Profile\u003C\u002Fth>\n\u003Cth>Total workers\u003C\u002Fth>\n\u003Cth>× 2\u003C\u002Fth>\n\u003Cth>QPS \u002F burst\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>Small\u003C\u002Ftd>\n\u003Ctd>4 + 2 + 2 + 2 = 10\u003C\u002Ftd>\n\u003Ctd>20\u003C\u002Ftd>\n\u003Ctd>20 \u002F 30\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Medium\u003C\u002Ftd>\n\u003Ctd>10 + 8 + 4 + 2 = 24\u003C\u002Ftd>\n\u003Ctd>48\u003C\u002Ftd>\n\u003Ctd>50 \u002F 100\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Large\u003C\u002Ftd>\n\u003Ctd>32 + 16 + 8 + 4 = 60\u003C\u002Ftd>\n\u003Ctd>120\u003C\u002Ftd>\n\u003Ctd>100-150 \u002F 200\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>XL\u003C\u002Ftd>\n\u003Ctd>64 + 32 + 16 + 8 = 120\u003C\u002Ftd>\n\u003Ctd>240\u003C\u002Ftd>\n\u003Ctd>200+ \u002F 300-400\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>Plotted, the rule is a set of knees. Each worker adds about two writes a second until the client limiter is full; after that, more workers just wait in line for it:\u003C\u002Fp>\n\u003Cfigure>\n\u003Ca href=\"\u002Fimages\u002Fblog\u002Ftuning-actions-runner-controller-flag-ratios\u002Fworkers-vs-qps.svg\">\u003Cimg src=\"\u002Fimages\u002Fblog\u002Ftuning-actions-runner-controller-flag-ratios\u002Fworkers-vs-qps.svg\" alt=\"Line chart: Kubernetes writes per second against EphemeralRunner workers from 0 to 64, at QPS 20, 50 and 100. Each line climbs at about 2 writes per second per worker, then flattens at its QPS: near 10 workers for QPS 20, 25 for QPS 50 and 50 for QPS 100. 64 workers at QPS 20 gets about 20 writes a second, less than 16 workers at QPS 50 (about 31).\" width=\"720\" height=\"440\" loading=\"lazy\">\u003C\u002Fa>\n\u003Cfigcaption>An illustrative model built from the ratios above (about 2 writes a second per worker, capped at QPS), not a benchmark. The point is where the curves bend: about QPS ÷ 2 workers.\u003C\u002Ffigcaption>\n\u003C\u002Ffigure>\n\n\u003Cp>The limiter only protects the controller from itself. The \u003Cabbr class=\"term\" data-term=\"api\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-api-21\">API\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-api-21\" hidden>Application programming interface: a set way for one program to ask another for data or to do something.\u003C\u002Fspan> server is the real ceiling: 150 writes a second is meaningful load, so on a small or shared \u003Cabbr class=\"term\" data-term=\"control-plane\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-control-plane-22\">control plane\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-control-plane-22\" hidden>The parts of Kubernetes that run the cluster itself (the API server, its database and the schedulers), as opposed to the machines that run your apps.\u003C\u002Fspan> check the API server's own request latency before going higher.\u003C\u002Fp>\n\u003Ch3>3. Workqueue limiter: \u003Ccode>typed_rate_limiter\u003C\u002Fcode> once you pass ~16 workers\u003C\u002Fh3>\n\u003Cp>The flag's help text and the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\u002Fblob\u002Fgha-runner-scale-set-0.15.1\u002Fcontrollers\u002Factions.github.com\u002Foptions.go#L87-L99\" target=\"_blank\" rel=\"noopener\">\u003Ccode>options.go\u003C\u002Fcode> notes\u003C\u002Fa> describe the default as controller-runtime's limiter: per-item \u003Cabbr class=\"term\" data-term=\"exponential-backoff\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-exponential-backoff-23\">exponential backoff\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-exponential-backoff-23\" hidden>Retrying after a failure with a wait that doubles each time, so something that keeps failing is tried less and less often.\u003C\u002Fspan> plus a \u003Cabbr class=\"term\" data-term=\"token-bucket\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-token-bucket-24\">token bucket\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-token-bucket-24\" hidden>A rate-limiting scheme: tokens drip into a bucket at a steady rate, each request spends one, and a full bucket allows a short burst.\u003C\u002Fspan> of 10 adds per second (burst 100) shared by every item in a controller's queue. With a few workers you never notice that bucket. Above roughly \u003Cstrong>16 total workers\u003C\u002Fstrong>, a burst of new runners empties it and items wait for tokens while workers sit idle. \u003Ccode>--workqueue-rate-limiter=typed_rate_limiter\u003C\u002Fcode> removes the shared bucket and keeps per-item backoff, so one failing object still backs off on its own without slowing the rest.\u003C\u002Fp>\n\u003Cp>One caveat from reading the 0.15.1 code: when no limiter is passed, \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\u002Fblob\u002Fgha-runner-scale-set-0.15.1\u002Fcontrollers\u002Factions.github.com\u002Foptions.go#L115-L130\" target=\"_blank\" rel=\"noopener\">\u003Ccode>newControllerOptions\u003C\u002Fcode> (\u003Ccode>options.go\u003C\u002Fcode> lines 115-130)\u003C\u002Fa> only uses that bucket if controller-runtime's \u003Cabbr class=\"term\" data-term=\"priority-queue\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-priority-queue-25\">priority queue\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-priority-queue-25\" hidden>A queue where some items can jump ahead of others. controller-runtime's version lets new changes go before routine re-checks.\u003C\u002Fspan> is explicitly turned off. Otherwise the default is already per-item backoff only (5ms up to 30s), and every limiter is capped at a 30-second wait. So in 0.15.1, \u003Ccode>typed_rate_limiter\u003C\u002Fcode> changes the backoff curve more than it removes a bottleneck. Set it at Large and above anyway (it makes the no-shared-bucket behaviour explicit, whatever the build), and treat the queue as a bottleneck only if \u003Ccode>workqueue_depth\u003C\u002Fcode> says so.\u003C\u002Fp>\n\u003Ch3>4. Sync period vs. scale-down delay\u003C\u002Fh3>\n\u003Cp>Where scale-down waits for a reconcile, the effective scale-down latency is about:\u003C\u002Fp>\n\u003Cpre tabindex=\"0\">\u003Ccode class=\"language-text\">scale-down latency ≈ max(scale-down-delay, sync-period)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cfigure>\n\u003Ca href=\"\u002Fimages\u002Fblog\u002Ftuning-actions-runner-controller-flag-ratios\u002Fscale-down-latency.svg\">\u003Cimg src=\"\u002Fimages\u002Fblog\u002Ftuning-actions-runner-controller-flag-ratios\u002Fscale-down-latency.svg\" alt=\"Line chart: scale-down latency against sync period from 0 to 10 minutes, for 1 and 5 minute delays. Each line stays flat at its delay until the sync period passes it, then rises with it; a 1 minute delay with a 10 minute sync period takes about 10 minutes.\" width=\"720\" height=\"440\" loading=\"lazy\">\u003C\u002Fa>\n\u003Cfigcaption>Once the sync period is longer than the delay, the sync period sets the latency.\u003C\u002Ffigcaption>\n\u003C\u002Ffigure>\n\n\u003Cp>If you raise \u003Ccode>--sync-period\u003C\u002Fcode> to cut background work at scale, raise \u003Ccode>--default-scale-down-delay\u003C\u002Fcode> with it, or the delay you configured is not the one you get.\u003C\u002Fp>\n\u003Ch3>5. GitHub's API budget\u003C\u002Fh3>\n\u003Cp>The Kubernetes side is only half of it. Runner registration (the just-in-time runner config) and removal call GitHub, and GitHub's limits don't move with your flags:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Cp class=\"table-hint\" aria-hidden=\"true\">Scroll sideways \u003Cspan class=\"table-hint-arrow\">→\u003C\u002Fspan>\u003C\u002Fp>\u003Cdiv class=\"table-frame\">\u003Cdiv class=\"table-scroll\" role=\"region\" aria-label=\"Table\" tabindex=\"0\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Auth\u003C\u002Fth>\n\u003Cth>Budget\u003C\u002Fth>\n\u003Cth>Roughly\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>Personal access token (\u003Cabbr class=\"term\" data-term=\"pat\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-pat-26\">PAT\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-pat-26\" hidden>Personal access token: a password-like token for your GitHub account that a script or tool uses to call the GitHub API as you.\u003C\u002Fspan>)\u003C\u002Ftd>\n\u003Ctd>~5,000 requests\u002Fhour\u003C\u002Ftd>\n\u003Ctd>~80 runner transitions\u002Fminute\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cabbr class=\"term\" data-term=\"github-app\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-github-app-27\">GitHub App\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-github-app-27\" hidden>A way to give a tool its own identity and permissions on GitHub, instead of using a person's account. It also gets higher API rate limits.\u003C\u002Fspan>\u003C\u002Ftd>\n\u003Ctd>up to ~15,000 requests\u002Fhour\u003C\u002Ftd>\n\u003Ctd>~250 runner transitions\u002Fminute\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>Those per-minute figures assume about one GitHub call per transition, and they drop fast as that number grows. Divide by however many calls your runners really make:\u003C\u002Fp>\n\u003Cfigure>\n\u003Ca href=\"\u002Fimages\u002Fblog\u002Ftuning-actions-runner-controller-flag-ratios\u002Fgithub-budget.svg\">\u003Cimg src=\"\u002Fimages\u002Fblog\u002Ftuning-actions-runner-controller-flag-ratios\u002Fgithub-budget.svg\" alt=\"Line chart: runner transitions per minute against GitHub API calls per transition from 1 to 6. A PAT (5,000 requests an hour) allows about 83 a minute at 1 call and 28 at 3 calls; a GitHub App (15,000 an hour) allows 250 at 1 call and 83 at 3.\" width=\"720\" height=\"440\" loading=\"lazy\">\u003C\u002Fa>\n\u003Cfigcaption>Transitions a minute = hourly budget ÷ 60 ÷ calls per transition. At three calls each, a GitHub App gives you what a PAT gives at one.\u003C\u002Ffigcaption>\n\u003C\u002Ffigure>\n\n\u003Cp>64 runner workers (and 64 cleanup workers) can burst well past a token's budget, so at that size \u003Cstrong>GitHub App authentication is effectively required\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Ch2>Anti-patterns\u003C\u002Fh2>\n\u003Cp>Each of these is one flag out of proportion with the rest:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>64 runner workers with the default 20 QPS.\u003C\u002Fstrong> The workers spend their time queued behind the client limiter, and it's worse than the defaults. A balanced 16 workers at 50 QPS beats it. If the API server can't take more QPS, lower the workers instead of starving them.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Set-level workers above your scale set count.\u003C\u002Fstrong> 32 AutoscalingRunnerSet workers with 5 scale sets means 27 that never get work. Size those flags to the scale set count, not the runner count.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>--sync-period=10m\u003C\u002Fcode> with \u003Ccode>--default-scale-down-delay=1m\u003C\u002Fcode>.\u003C\u002Fstrong> The 1-minute delay becomes ~10 minutes in practice.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Burst below QPS.\u003C\u002Fstrong> Burst is the size of the bucket, so a burst under QPS makes the QPS you set unreachable.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Raising listener workers first.\u003C\u002Fstrong> There's one AutoscalingListener per scale set, its reconciles are the cheapest of the four (make sure the listener pod and its secret exist, patch status), and the listener pod does its own \u003Cabbr class=\"term\" data-term=\"long-polling\" tabindex=\"0\" aria-describedby=\"tuning-actions-runner-controller-flag-ratios-term-long-polling-28\">long polling\u003C\u002Fabbr>\u003Cspan id=\"tuning-actions-runner-controller-flag-ratios-term-long-polling-28\" hidden>Asking a server for news and letting it hold the request open until there is something to send back, instead of asking over and over.\u003C\u002Fspan>. It's the last place to add workers.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Checking your work\u003C\u002Fh2>\n\u003Cp>The controller's metrics endpoint (\u003Ccode>--metrics-addr\u003C\u002Fcode>) shows which limit you're hitting:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Cp class=\"table-hint\" aria-hidden=\"true\">Scroll sideways \u003Cspan class=\"table-hint-arrow\">→\u003C\u002Fspan>\u003C\u002Fp>\u003Cdiv class=\"table-frame\">\u003Cdiv class=\"table-scroll\" role=\"region\" aria-label=\"Table\" tabindex=\"0\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Signal\u003C\u002Fth>\n\u003Cth>What it tells you\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>\u003Ccode>workqueue_depth\u003C\u002Fcode> (by controller)\u003C\u002Ftd>\n\u003Ctd>Which queue is backing up. Rising while workers are busy: add workers.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>rest_client_requests_total\u003C\u002Fcode> (and \u003Ccode>rest_client_request_latency_seconds\u003C\u002Fcode>)\u003C\u002Ftd>\n\u003Ctd>Whether the Kubernetes client is saturated. Flat at your QPS: the client limiter is the ceiling.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>controller_runtime_reconcile_time_seconds\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Time per reconcile: are the workers the bottleneck, or the API server and GitHub behind them?\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>GitHub rate-limit headers (\u003Ccode>x-ratelimit-remaining\u003C\u002Fcode>, \u003Ccode>x-ratelimit-reset\u003C\u002Fcode>)\u003C\u002Ftd>\n\u003Ctd>How much GitHub budget is left before the hour resets.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>If \u003Ccode>workqueue_depth\u003C\u002Fcode> for the EphemeralRunner controller is already near zero, raising QPS further does nothing: the workers aren't waiting.\u003C\u002Fp>\n\u003Cp>Tune in this order, one change at a time, and check the signals between each:\u003C\u002Fp>\n\u003Col>\n\u003Cli>Runner workers (\u003Ccode>--ephemeral-runner-max-concurrent-reconciles\u003C\u002Fcode>)\u003C\u002Fli>\n\u003Cli>Client QPS and burst\u003C\u002Fli>\n\u003Cli>Set-level workers (up to your scale set count)\u003C\u002Fli>\n\u003Cli>Workqueue limiter\u003C\u002Fli>\n\u003Cli>Sync period\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>Most clusters can stop at step 2. If you get to step 5, the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Factions\u002Factions-runner-controller\u002Fissues\u002F3021\" target=\"_blank\" rel=\"noopener\">upstream discussion\u003C\u002Fa> has real-world numbers worth a read.\u003C\u002Fp>\n",1795361471127]