how to config memory usage for victoriametrics on percona/pmm-server:2.37.0
Hello @TangHong,
Why do you feel you need to configure this? How many servers are your monitoring?
we use pmm-server to monitor mysql and backup, we deploy them in k8s,and i have 3 mysql.
pmm pod sometimes costs 6G and most of them was used by victoriametrics,so i want to try to make it query slow or use less memory, when i limit the cpu and mem usage ,victoriametric will crash in pmm pod.could you give me the ofiicicail configuration of them,or how to calculate how much mem or cpu pmm-server pod should need.
Hi @TangHong, you can use VM_MEMORY_ALLOWEDPERCENT
or VM_MEMORY_ALLOWEDBYTES
env variables to limit victoriametrics resource usage.
Hi, i used VM_MEMORY_ALLOWEDBYTES: ‘500MB’,and in my pod, do env |grep VM,its there,here is the command log, please check if i config error
when it runs few hours, it costs 740252 kB, larget than 500MB
Hi @TangHong, you are right, Victoria Metrics documentation says that it limits internal caches of VictoriaMetrics. You can also use VM_search_maxMemoryPerQuery to limit the amount of memory used by each request. You also can play with other flags listed here by converting them using these rules and prepending VM_
.
okay,i see, thankyou! i will try later.