Skip to content
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

feat(vm): add support for cpu affinity attribute (#1148) #1153

Merged
merged 4 commits into from
Mar 24, 2024

Conversation

sergelogvinov
Copy link
Contributor

@sergelogvinov sergelogvinov commented Mar 23, 2024

It helps to pin VMs to the special cpu.

Contributor's Note

  • I have added / updated documentation in /docs for any user-facing features or additions.
  • I have added / updated templates in /example for any new or updated resources / data sources.
  • I have ran make example to verify that the change works as expected.

Proof of Work

  cpu {
    cores = 2
    affinity = "2,3"
  }
Screenshot 2024-03-23 at 9 30 59 PM

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #1148

It helps to pin VMs to the special cpu.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
bpg added 3 commits March 23, 2024 21:06
…ffinity`

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Copy link
Owner

@bpg bpg left a comment

Choose a reason for hiding this comment

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

Thanks so much for contributing this feature @sergelogvinov!

I've made a few fixes for the default case when affinity is not set, and also added a bit more details to the docs.

All my tests pass, both make example and make testacc, so I think it is good to go.

LGTM! 🚀

@bpg bpg merged commit 83a5971 into bpg:main Mar 24, 2024
8 checks passed
@bpg
Copy link
Owner

bpg commented Mar 24, 2024

@all-contributors please add @sergelogvinov for code

Copy link
Contributor

@bpg

I've put up a pull request to add @sergelogvinov! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPU Affinity
2 participants