@happy-cat

Как правильно выставить лимит CPU для виртауалок на Proxmoxe?

Собственно вопрос - в настройках ВМ на проксмоксе вижу что можно выставить лимиты на ЦПУ,
1. Насколько это оправданно? Есть некоторые ВМ которые за несколько месяцев (в статистике) потребляют в среднем 30% от 100% - я им выставил 0.5 - это правильно? Не будет излишней перестраховкой?
2. Я правильно понимаю принцип - выставил 0,5 это теоретически ограничивает ресурс цпу на уровне 50% от условных 100%?
  • Вопрос задан
  • 145 просмотров
Решения вопроса 1
ky0
@ky0
Миллиардер, филантроп, патологический лгун
Не очень понял, что вы там выставили (или собираетесь), но в Проксмоксе есть прекрасный и очень подробный раздел прямо во встроенной справке - по нажатию кнопки Help в соответствующем окне.

Позволю себе процитировать кусочек:

In addition to the number of virtual cores, you can configure how much resources a VM can get in relation to the host CPU time and also in relation to other VMs. With the cpulimit (“Host CPU Time”) option you can limit how much CPU time the whole VM can use on the host. It is a floating point value representing CPU time in percent, so 1.0 is equal to 100%, 2.5 to 250% and so on. If a single process would fully use one single core it would have 100% CPU Time usage. If a VM with four cores utilizes all its cores fully it would theoretically use 400%. In reality the usage may be even a bit higher as Qemu can have additional threads for VM peripherals besides the vCPU core ones. This setting can be useful if a VM should have multiple vCPUs, as it runs a few processes in parallel, but the VM as a whole should not be able to run all vCPUs at 100% at the same time. Using a specific example: lets say we have a VM which would profit from having 8 vCPUs, but at no time all of those 8 cores should run at full load - as this would make the server so overloaded that other VMs and CTs would get to less CPU. So, we set the cpulimit limit to 4.0 (=400%). If all cores do the same heavy work they would all get 50% of a real host cores CPU time. But, if only 4 would do work they could still get almost 100% of a real core each.

The second CPU resource limiting setting, cpuunits (nowadays often called CPU shares or CPU weight), controls how much CPU time a VM gets in regards to other VMs running. It is a relative weight which defaults to 1024, if you increase this for a VM it will be prioritized by the scheduler in comparison to other VMs with lower weight. E.g., if VM 100 has set the default 1024 and VM 200 was changed to 2048, the latter VM 200 would receive twice the CPU bandwidth than the first VM 100.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы