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

Allow float value for VM cpu #5975

Closed
maximebrun opened this issue Mar 13, 2021 · 7 comments
Closed

Allow float value for VM cpu #5975

maximebrun opened this issue Mar 13, 2021 · 7 comments
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@maximebrun
Copy link

NetBox version

v2.9.11

Feature type

Data model extension

Proposed functionality

Allow to set cpu in float format for virtual machine.

Use case

We use virtual machine and set cpu less than 1. For example, 0.5.

Database changes

Change PositiveSmallIntegerField to DecimalField for vcpus in VirtualMachine model.

External dependencies

Unknown

@maximebrun maximebrun added the type: feature Introduction of new functionality to the application label Mar 13, 2021
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Mar 16, 2021
@jeremystretch jeremystretch added this to the v2.11 milestone Mar 16, 2021
@jeremystretch
Copy link
Member

Tagging this for v2.11 since we're changing the field type from integer to float.

Does it make sense to limit this value to a particular granularity (e.g. 0.5)?

@ypid
Copy link
Contributor

ypid commented Apr 24, 2021

@maximebrun

Can you give a reference which Hypervisor software allows this setting? I have not seen this before.

@jogulin
Copy link

jogulin commented May 24, 2021

@maximebrun

I cannot find a reference to a hypervisor configuration that permits fractional assignments. Virtual CPUs must be assigned as integer values. VMware is a drop-down. KVM is also an integer assignment. Please provide a reference as to why this change was included. The closest thing I can find is a weight limit for Hyper-V, but you are still assigning whole integer values as the number of vCPUs. You are just limiting how much of the physical CPUs the vCPUs can consume. That is not the same as assigning half of a vCPU.

@ziggekatten
Copy link

AIX LPARs can do this in 0.25 chunks.

@maximebrun
Copy link
Author

@maximebrun

I cannot find a reference to a hypervisor configuration that permits fractional assignments. Virtual CPUs must be assigned as integer values. VMware is a drop-down. KVM is also an integer assignment. Please provide a reference as to why this change was included. The closest thing I can find is a weight limit for Hyper-V, but you are still assigning whole integer values as the number of vCPUs. You are just limiting how much of the physical CPUs the vCPUs can consume. That is not the same as assigning half of a vCPU.

Sorry for late answer, i missed notifications...

Perhaps we didn't use this field in the same manner. I use it to set the hypervisor cpu reserved for the vm, not the number of cpu the vm see (vcpu).

I am using OpenNebula/KVM.

@jogulin
Copy link

jogulin commented Jun 16, 2021

AIX LPARs can do this in 0.25 chunks.

People still use AIX? :)

Sorry for late answer, i missed notifications...

Perhaps we didn't use this field in the same manner. I use it to set the hypervisor cpu reserved for the vm, not the number of cpu the vm see (vcpu).

I am using OpenNebula/KVM.

I thought it was how many virtual CPUs were assigned to the VM itself, or at least that's how we have been using it. We are migrating away from KVM ingeneral but still have some of it sitting around, and are primarily using VMware now. In both cases we have it reflect the number of CPUs the VM will show when you sign into the guest OS, not the number of physical CPUs reserved for the VM.

@ziggekatten
Copy link

ziggekatten commented Jun 16, 2021

Hey, AIX is still king:-)

Linux is good but those of us that want pure performance still use good ol' blue Power systems.

:-)

Joke aside, some AIX features from before year 2000 is still better than Linux counterparts today. LVM is one of those, even if Linux is almost at par with AIX (thanks to IBM).

So, you are allowed to joke about us that knows better :-)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

5 participants