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(scheduler): support optional cpu constraints and make sort by guest count optional #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tamcore
Copy link
Contributor

@tamcore tamcore commented Dec 27, 2023

This optionally allows the scheduler to take CPU cores into account, as well as disabling the sorting by guest count. I think with this it should be relatively simple, to, for example, include a host's actual cpu load as well.

@tamcore tamcore marked this pull request as ready for review December 27, 2023 12:50
@mcbenjemaa
Copy link
Member

Thanks for your PR, We will check this.

@@ -78,6 +78,15 @@ type SchedulerHints struct {
// By default 100% of a node's memory will be used for allocation.
// +optional
MemoryAdjustment *uint64 `json:"memoryAdjustment,omitempty"`

// Like MemoryAdjustment, but for CPU resources.
Copy link
Member

Choose a reason for hiding this comment

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

Please write a meaningful description here.
Re-explain the adjustment term here as well.

// +optional
CPUAdjustment *uint64 `json:"cpuAdjustment,omitempty"`

// +optional
Copy link
Member

Choose a reason for hiding this comment

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

Here we also need a description and why this is needed.

requested uint64
// InsufficientResourcesError is used when the scheduler cannot assign a VM to a node because no node
// would be able to provide the requested resources.
type InsufficientResourcesError struct {
Copy link
Member

Choose a reason for hiding this comment

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

I guess its better to separate the error by CPU, Memory.

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.

3 participants