-
Notifications
You must be signed in to change notification settings - Fork 4k
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(recommender): add round cpu millicores #7682
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Omer Aplatony <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: omerap12 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Omer Aplatony <[email protected]>
humanizeMemory = flag.Bool("humanize-memory", false, "Convert memory values in recommendations to the highest appropriate SI unit with up to 2 decimal places for better readability.") | ||
roundCPUMillicores = flag.Int("round-cpu-millicores", 1, `CPU recommendation rounding factor in millicores. The CPU value will be rounded to the nearest multiple of this factor.`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious what others think, but I like the idea of these two options being similar.
humanize-memory + humanize-cpu
or
round-memory-mebibyte + round-cpu-millicores
I haven't though through if this is possible or not. So I'm unsure if my idea is a good one or not, but for some reason keeping the options similar just feels like it may be a good user experience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean you want to combine these two flags into a single one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is another option...
--humanize=cpu,memory
Or two flags:
--humanize-memory=true/false
--humanize-cpu=true/false
I'm not strongly opinionated on the direction we go, I do think more opinions may be useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but the cpu rounding depends on the user input, as it rounds to the nearest multiple of a specified factor. So, I'm not sure how the boolean flag is helpful here - unless you're suggesting that we should always round to a specific factor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless you're suggesting that we should always round to a specific factor.
☝️ this
Does it make sense to have the "memory rounding feature" and the "cpu rounding feature" to operate in similar ways? Either ask a user to input a factor, or to use the humanize feature for both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They would select the mebibyte's to round up to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I don't know if this is a good idea or not, to be honest)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But if the user would want GiB? or TiB (not sure it's possible but still )..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaaahhhhhh, ok! I see the problem now.
They are both "rounding", but the difference between a few millicore, or a few memory units (GiB, TiB) is quite different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup!
@@ -34,4 +34,20 @@ Note: Due to the conversion to binary units and decimal place rounding, the huma | |||
To enable this feature, set the `--humanize-memory` flag to true when running the VPA recommender: | |||
```bash | |||
--humanize-memory=true | |||
``` | |||
|
|||
## CPU Recommendation Rounding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for adding docs as the feature is added! This is a habit we need to be getting into
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup! Thank you :)
Co-authored-by: Adrian Moisey <[email protected]>
Don't forget to run vpa-generate-flags.go |
Signed-off-by: Omer Aplatony <[email protected]>
/milestone vertical-pod-autoscaler-1.4.0 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds the
--round-cpu-millicores
flag to the VPA recommender, enabling user-configurable rounding of CPU recommendations.Which issue(s) this PR fixes:
Fixes #7678
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: