Skip to content

Conversation

kirschem-fernride
Copy link
Contributor

@kirschem-fernride kirschem-fernride commented Sep 25, 2025

This PR adds a feature which enables to use of cpu_options in the runner config.

Context: We have a workload where hyperthreading hurts performance. With this option, we can opt-out of hyperthreading for a certain runner configuration.

Tested by applying to our internal dev infra.

@kirschem-fernride kirschem-fernride requested review from a team as code owners September 25, 2025 13:15
@npalm npalm changed the title feat: add cpu_options feat: add cpu_options for EC2 launch template Oct 3, 2025
Copy link
Member

@npalm npalm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kirschem-fernride thx looks good! Quick pro tip, when contributing to OS would be great if you can enable signed commits.

@npalm npalm merged commit 20eeead into github-aws-runners:main Oct 3, 2025
40 checks passed
npalm added a commit that referenced this pull request Oct 3, 2025
🤖 I have created a release *beep* *boop*
---


##
[6.8.0](v6.7.9...v6.8.0)
(2025-10-03)


### Features

* add cpu_options for EC2 launch template
([#4789](#4789))
([20eeead](20eeead))
@kirschem-fernride


### Bug Fixes

* **lambda:** bump the aws group across 1 directory with 7 updates
([#4805](#4805))
([3025930](3025930))
* **lambda:** bump the octokit group in /lambdas with 3 updates
([#4794](#4794))
([73cf01e](73cf01e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
Co-authored-by: github-aws-runners-pr|bot <github-aws-runners-pr[bot]@users.noreply.github.com>
Co-authored-by: Niek Palm <npalm@users.noreply.github.com>
npalm pushed a commit that referenced this pull request Oct 4, 2025
This PR will replace:

```hcl
cpu_options {
  core_count       = var.cpu_options != null ? var.cpu_options.core_count : null
  threads_per_core = var.cpu_options != null ? var.cpu_options.threads_per_core : null
}
```

with:

```hcl
dynamic "cpu_options" {
  for_each = var.cpu_options != null ? [var.cpu_options] : []
  content {
    core_count       = try(cpu_options.value.core_count, null)
    threads_per_core = try(cpu_options.value.threads_per_core, null)
  }
}
```

This way, if `cpu_options` is not set, Terraform will **not force a
resource update every time**.

This issue was introduced in PR #4789 


<img width="346" height="94" alt="image"
src="https://github.com/user-attachments/assets/5a3ca60d-7300-4957-91c3-ff87c2cd5b62"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants