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

CPU Affinity #1148

Closed
sergelogvinov opened this issue Mar 21, 2024 · 1 comment · Fixed by #1153
Closed

CPU Affinity #1148

sergelogvinov opened this issue Mar 21, 2024 · 1 comment · Fixed by #1153
Labels
✨ enhancement New feature or request

Comments

@sergelogvinov
Copy link
Contributor

Thank you for your project.
I am really happy to use it!

Is your feature request related to a problem? Please describe.

Add cpu-affinity param on VM resource.

Describe the solution you'd like

I'd like to pin VM to the special CPUs. It helps me to reach better performance.

resource "proxmox_virtual_environment_vm" "example_template" {
  cpu {
    cores =  8
    numa  = true
    limit = 64

    affinity = "0-3,16-19"
  }
}

If you ok with it, i think, i can implement it.
Thank you!

@sergelogvinov sergelogvinov added the ✨ enhancement New feature or request label Mar 21, 2024
@bpg
Copy link
Owner

bpg commented Mar 21, 2024

Hi @sergelogvinov! 👋🏼

This seems like a good improvement, and the implementation should be pretty straightforward.
I would really appreciate a pull request! ❤️

Thanks!

sergelogvinov added a commit to sergelogvinov/terraform-provider-proxmox-bpg that referenced this issue Mar 23, 2024
It helps to pin VMs to the special cpu.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
sergelogvinov added a commit to sergelogvinov/terraform-provider-proxmox-bpg that referenced this issue Mar 23, 2024
It helps to pin VMs to the special cpu.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
sergelogvinov added a commit to sergelogvinov/terraform-provider-proxmox-bpg that referenced this issue Mar 23, 2024
It helps to pin VMs to the special cpu.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
bpg added a commit that referenced this issue Mar 24, 2024
* feat(vm): add support for cpu `affinity` attribute (#1148)

It helps to pin VMs to the special cpu.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>

* add clarification about the format and permission requirements for `affinity`
* do not add `affinity` property to the API call if is not set

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

---------

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
@bpg bpg closed this as completed in #1153 Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
2 participants