autoscaler
autoscaler copied to clipboard
Human readable memory for VPA
Hello, I have 2 questions that I cannot find answers for online
question 1: is it possible to have the indication of memory in a more human readable fashion? like in Kb, Mb, Gb, etc
NAMESPACE NAME MODE CPU MEM PROVIDED AGE default analyzer-vpa Off 1038m 4992073454 True 72m default input-manager-vpa Off 25m 262144k True 72m
question 2: is the indication of the cpu and memory usage per pods or per deployment? if I activate the autoscaler, would it divide the request and limit per pods accordingly?
thank you in advance
/area vertical-pod-autoscaler
Would also love human-readable memory!
/retitle Human readable memory for VPA
This has been merged to master, and should be available in the next VPA release. /close
Thanks @omerap12 for doing this one!
@adrianmoisey: Closing this issue.
In response to this:
This has been merged to master, and should be available in the next VPA release. /close
Thanks @omerap12 for doing this one!
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
This has been merged to master, and should be available in the next VPA release.
/close
Thanks @omerap12 for doing this one!
My pleasure 😀
Hi all, I tried with 1.3.0 image with "--humanize-memory=true" today, but found the MEM value now having more digits with the unit "milibyte". This value looks to align with the code design 272063528960/1000/1024/1024=259.46Mi, but seems more unreadable. Is there some configuration I missed?
$ k get verticalpodautoscalers.autoscaling.k8s.io -n logging fluent-bit-service
NAME MODE CPU MEM PROVIDED AGE
fluent-bit-service Initial 126m 272063528960m True 2d21h
Hi all, I tried with 1.3.0 image with "--humanize-memory=true" today, but found the MEM value now having more digits with the unit "milibyte". This value looks to align with the code design 272063528960/1000/1024/1024=259.46Mi, but seems more unreadable. Is there some configuration I missed?
Can you give us some steps to reproduce this? I tested it and I got the correct result:
$ k get vpa -w
NAME MODE CPU MEM PROVIDED AGE
hamster-vpa Auto 8s
hamster-vpa Auto 627m 250Mi True 48s
hamster-vpa Auto 627m 250Mi True 108s
I then turned the setting off, and the recommendation reverted to the non-human-readable format:
$ k get vpa -w
NAME MODE CPU MEM PROVIDED AGE
hamster-vpa Auto 627m 250Mi True 2m22s
hamster-vpa Auto 627m 262144k True 3m23s
hamster-vpa Auto 627m 262144k True 4m23s
Hi @adrianmoisey , my vpa is installed with
tag=1.3.0; helm upgrade -i -n kube-system vpa fairwinds-stable/vpa -f vpa-values.yaml --set recommender.image.tag=$tag,updater.image.tag=$tag,admissionController.image.tag=$tag
# vpa-values.yaml
recommender:
# recommender.enabled -- If true, the vpa recommender component will be installed.
enabled: true
# recommender.extraArgs -- A set of key-value flags to be passed to the recommender
extraArgs:
v: "4"
humanize-memory: true # starting from 1.3.0
pod-recommendation-min-cpu-millicores: 10
pod-recommendation-min-memory-mb: 50
target-cpu-percentile: 0.50
target-memory-percentile: 0.50
replicaCount: 1
Without "humanize-memory: true", I get this result, seems already worse than yours :\
$ k get vpa -A -w
NAMESPACE NAME MODE CPU MEM PROVIDED AGE
kube-system vpa-admission-controller Auto 11m 52428800 True 158d
kube-system vpa-recommender Auto 11m 63544758 True 158d
kube-system vpa-updater Auto 11m 78221997 True 158d
logging fluent-bit-service Initial 126m 225384266 True 3d2h
monitoring grafana Auto 11m 93633096 True 146d
With "humanize-memory: true", I get a result where 50Mi looks good but the others not.
$ k get vpa -A -w
NAMESPACE NAME MODE CPU MEM PROVIDED AGE
kube-system vpa-admission-controller Auto 11m 50Mi True 158d
kube-system vpa-recommender Auto 11m 63543705600m True 158d
kube-system vpa-updater Auto 11m 93637836800m True 158d
logging fluent-bit-service Initial 126m 272063528960m True 3d2h
monitoring grafana Auto 11m 93637836800m True 146d
Thanks for your help!
Hi @adrianmoisey , my vpa is installed with
tag=1.3.0; helm upgrade -i -n kube-system vpa fairwinds-stable/vpa -f vpa-values.yaml --set recommender.image.tag=$tag,updater.image.tag=$tag,admissionController.image.tag=$tag# vpa-values.yaml recommender: # recommender.enabled -- If true, the vpa recommender component will be installed. enabled: true # recommender.extraArgs -- A set of key-value flags to be passed to the recommender extraArgs: v: "4" humanize-memory: true # starting from 1.3.0 pod-recommendation-min-cpu-millicores: 10 pod-recommendation-min-memory-mb: 50 target-cpu-percentile: 0.50 target-memory-percentile: 0.50 replicaCount: 1Without "humanize-memory: true", I get this result, seems already worse than yours :\
$ k get vpa -A -w NAMESPACE NAME MODE CPU MEM PROVIDED AGE kube-system vpa-admission-controller Auto 11m 52428800 True 158d kube-system vpa-recommender Auto 11m 63544758 True 158d kube-system vpa-updater Auto 11m 78221997 True 158d logging fluent-bit-service Initial 126m 225384266 True 3d2h monitoring grafana Auto 11m 93633096 True 146dWith "humanize-memory: true", I get a result where 50Mi looks good but the others not.
$ k get vpa -A -w NAMESPACE NAME MODE CPU MEM PROVIDED AGE kube-system vpa-admission-controller Auto 11m 50Mi True 158d kube-system vpa-recommender Auto 11m 63543705600m True 158d kube-system vpa-updater Auto 11m 93637836800m True 158d logging fluent-bit-service Initial 126m 272063528960m True 3d2h monitoring grafana Auto 11m 93637836800m True 146dThanks for your help!
Can you share the recommender logs? We print wether we convert the metrics or not
Can you paste your VPA objects here too please? At least for the VPA components.
Ah, I reproduced it by increasing memory usage:
$ k get vpa -w -A
NAMESPACE NAME MODE CPU MEM PROVIDED AGE
default hamster-vpa Auto 100m 50Mi True 3m2s
kube-system vpa-recommender Auto 10m 50Mi True 110s
default hamster-vpa Auto 100m 183049912320m True 4m42s
I didn't get a log similar to:
I0126 08:28:31.646220 1 types.go:99] "Converting raw value to humanized value" rawValue=52428800 humanizedValue="50.00Mi"
@omerap12 my logs recommender.log
@adrianmoisey My VPA Objects for the VPA components.
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: vpa-admission-controller
namespace: kube-system
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: vpa-admission-controller
updatePolicy:
updateMode: Auto
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: vpa-recommender
namespace: kube-system
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: vpa-recommender
updatePolicy:
updateMode: Auto
resourcePolicy:
containerPolicies:
- containerName: '*'
minAllowed:
memory: 50Mi
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: vpa-updater
namespace: kube-system
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: vpa-updater
updatePolicy:
updateMode: Auto
@kyleli666 could you open a new bug issue for this? It's strange to keep discussion on a closed issue
@kyleli666 could you open a new bug issue for this? It's strange to keep discussion on a closed issue
Here it is https://github.com/kubernetes/autoscaler/issues/7770