Merge pull request #171 from flagon-io/runner-capacity
Room for public repositories' ubuntu-latest jobs: 30 sandboxes on the 4-core machine, a pool of 60
4 files+17−110/4 viewed
| 54 | 54 | ||
| 55 | 55 | | | | | |
| 56 | 56 | | --------------------------- | ------------------------------------------------------------------------------------------------- | | |
| 57 | − | | Hosted jobs running at once | 4 per workspace always, up to 12 while the pool of 40 sandboxes keeps 8 free for other workspaces | | |
| 57 | + | | Hosted jobs running at once | 4 per workspace always, up to 12 while the pool of 60 sandboxes keeps 8 free for other workspaces | | |
| 58 | 58 | | A hosted job's timeout | 60 minutes at most | | |
| 59 | 59 | | A self-hosted job's timeout | 24 hours at most | | |
| 60 | 60 | | Logs | 4 MiB a job, kept 90 days | |
| 342 | 342 | 16 GB), and so is `runs-on: g1t-2core`, in a class of its own; jobs that | |
| 343 | 343 | ask for `runs-on: g1t-4core`, and `ubuntu-latest` jobs in a public | |
| 344 | 344 | repository, get `standard-4` (4 vCPU, 12 GiB, 20 GB). At | |
| 345 | − | the `max_instances` in `services/runner/wrangler.jsonc` (20, 10 and 10), | |
| 346 | − | 40 sandboxes at once hold 100 vCPU, 360 GiB of memory and 680 GB of disk, | |
| 345 | + | the `max_instances` in `services/runner/wrangler.jsonc` (20, 10 and 30), | |
| 346 | + | 60 sandboxes at once hold 180 vCPU, 600 GiB of memory and 1,080 GB of disk, | |
| 347 | 347 | which your account's Containers limits for live instances must allow. | |
| 348 | 348 | ||
| 349 | 349 | Set the runner Worker's `DOCKER` variable to `off` to give workflow jobs no |
| 65 | 65 | /// The most one workspace may run at once while the pool has room to spare. | |
| 66 | 66 | pub const BURST_PER_WORKSPACE: u32 = 12; | |
| 67 | 67 | /// Sandboxes g1t's own machines have between them (services/runner's | |
| 68 | − | /// wrangler.jsonc: 20 standard, 10 g1t-2core, 10 g1t-4core). | |
| 69 | − | pub const HOSTED_POOL: u32 = 40; | |
| 68 | + | /// wrangler.jsonc: 20 standard, 10 g1t-2core, 30 g1t-4core, which every | |
| 69 | + | /// public repository's ubuntu-latest jobs run on). | |
| 70 | + | pub const HOSTED_POOL: u32 = 60; | |
| 70 | 71 | /// Kept free while workspaces run past their share, so another workspace's | |
| 71 | 72 | /// first jobs still start at once. | |
| 72 | 73 | pub const POOL_HEADROOM: u32 = 8; |
| 9 | 9 | // types: standard-3 (2 vCPU, 8 GiB, 16 GB of disk) for the standard | |
| 10 | 10 | // machine and g1t-2core, which is kept as a name of it so workflows that | |
| 11 | 11 | // ask for it keep working, and standard-4 (4 vCPU, 12 GiB, 20 GB) for | |
| 12 | − | // g1t-4core. At these max_instances, 40 sandboxes at once hold 100 vCPU, | |
| 13 | − | // 360 GiB and 680 GB, well inside the account's limits for live | |
| 14 | − | // instances (1,500 vCPU, 6 TiB of memory). crates/contracts | |
| 12 | + | // g1t-4core, which is also what ubuntu-latest gets in a public | |
| 13 | + | // repository. At these max_instances, 60 sandboxes at once hold 180 vCPU, | |
| 14 | + | // 600 GiB and 1,080 GB, well inside the account's limits for live | |
| 15 | + | // instances (1,500 vCPU, 6 TiB of memory, 30 TB of disk). crates/contracts | |
| 15 | 16 | // (INSTANCE_TYPES) and services/billing (keeper.rs) say the same sizes. | |
| 16 | 17 | // scripts/deploy.mjs deploys with each image set to the reference it | |
| 17 | 18 | // built and pushed ("The runner's images" in | |
| ⋯ | |||
| 22 | 23 | "class_name": "AttemptSandbox", | |
| 23 | 24 | "image": "./Dockerfile", | |
| 24 | 25 | // Workflow jobs with `runs-on: ubuntu-latest` (and every other | |
| 25 | − | // hosted label), and all other work: 2 vCPU, 8 GiB, 16 GB. | |
| 26 | + | // hosted label) in a private repository, checks, the merge queue and | |
| 27 | + | // all other work: 2 vCPU, 8 GiB, 16 GB. | |
| 26 | 28 | "instance_type": "standard-3", | |
| 27 | 29 | "max_instances": 20, | |
| 28 | 30 | // A deploy that changes the image or these settings replaces every | |
| ⋯ | |||
| 41 | 43 | "rollout_active_grace_period": 7200 | |
| 42 | 44 | }, | |
| 43 | 45 | { | |
| 44 | − | // Workflow jobs with `runs-on: g1t-4core`: 4 vCPU, 12 GiB, 20 GB. | |
| 46 | + | // Workflow jobs with `runs-on: g1t-4core`, and `ubuntu-latest` (and | |
| 47 | + | // every other hosted label) in a public repository: 4 vCPU, 12 GiB, | |
| 48 | + | // 20 GB. Every public repository's workflow jobs run here, so it has | |
| 49 | + | // the most room. | |
| 45 | 50 | "class_name": "Sandbox4Core", | |
| 46 | 51 | "image": "./Dockerfile", | |
| 47 | 52 | "instance_type": "standard-4", | |
| 48 | − | "max_instances": 10, | |
| 53 | + | "max_instances": 30, | |
| 49 | 54 | "rollout_active_grace_period": 7200 | |
| 50 | 55 | } | |
| 51 | 56 | ], | |
Comments
Sign in to comment.