Task error max 1 vcpus allowed per vm on this node

My current hardware has 2x 16 core CPUs with hyperthreading enabled, giving me a max of 64 vCPU. However for a specific testing scenario I'm performing, I'm trying to override this and give a VM more than 64 vCPUs. When starting, it stops with this error TASK ERROR: MAX 64 vcpus allowed per...

  • #1

My current hardware has 2x 16 core CPUs with hyperthreading enabled, giving me a max of 64 vCPU. However for a specific testing scenario I’m performing, I’m trying to override this and give a VM more than 64 vCPUs. When starting, it stops with this error

TASK ERROR: MAX 64 vcpus allowed per VM on this node

Is there a config file or cli command I can use to override this max value?

Thanks

dietmar


  • #2

You only have 64 cores, so it would make no sense to assign more, because it would result in a performance drop.

dietmar


  • #3

All your assumption are wrong.

  • #4

I deleted my previous post but I’lll recap it here for anyone looking for the solution:

You can edit ./usr/share/perl5/PVE/QemuServer.pm and apply this diff to bypass the limit

Code:

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 02a689c..5fbba08 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2961,11 +2961,6 @@ sub config_to_command {

     my $vcpus = $conf->{vcpus} ? $conf->{vcpus} : $maxcpus;

-    my $allowed_vcpus = $cpuinfo->{cpus};
-
-    die "MAX $allowed_vcpus vcpus allowed per VM on this noden"
-       if ($allowed_vcpus < $maxcpus);
-
     push @$cmd, '-smp', "$vcpus,sockets=$sockets,cores=$cores,maxcpus=$maxcpus";

     push @$cmd, '-nodefaults';

My concerns with this code are that

  • This check is done per VM only. So if you have 64 cores on your host, it prevents you from starting a VM with 128 cores. But it wouldn’t stop you from starting 2 VMs with 64 cores each. These would have similar performance issues, yet only the former case is prevented. From the hypervisor standpoint, a vCPU is simply a QEMU process. It shouldn’t matter if these processes belong to the same VM or different VMs.
  • The sockets * cores math doesn’t take into account that the cores are virtual (hyperthreads.) From a performance standpoint, this can be important. Proxmox also doesn’t let you configure hyperthreads in your guest.
  • Not flexible. There is no config value or UI checkbox to disable this check. There are specific use cases where oversubscription of the vCPUs to physical CPUs is desired, and proxmox doesn’t allow you to do this without patching their code and rebooting. VMware at least gives you a cli tool to change it, and libvirt/Ubuntu don’t impose any limit.

All your assumption are wrong.

If you could provide any additional insight, that’d be appreciated. Providing as much flexibility as possible in CPU/hardware topologies is currently the main difference between me installing libvirt/Ubuntu, and proxmox. I’m not making assumptions about this, I’m literally reading the code.

Going back onto the mailing list and git history, there’s no explanation of why this check was added or what problem it was trying to solve.

dietmar


  • #5

This check is done per VM only. So if you have 64 cores on your host, it prevents you from starting a VM with 128 cores. But it wouldn’t stop you from starting 2 VMs with 64 cores each. These would have similar performance issues, yet only the former case is prevented. From the hypervisor standpoint, a vCPU is simply a QEMU process. It shouldn’t matter if these processes belong to the same VM or different VMs.

This is not the same. In the end, one VM with 128 cores will be much slower than 2VM with 64 cores, because the kernel inside the VM has totally wrong assumptions about physically available cores.

The sockets * cores math doesn’t take into account that the cores are virtual (hyperthreads.) From a performance standpoint, this can be important. Proxmox also doesn’t let you configure hyperthreads in your guest.

I am unable to see that this is important. Please provide benchmarks to support that claim.

Not flexible. There is no config value or UI checkbox to disable this check. There are specific use cases where oversubscription of the vCPUs to physical CPUs is desired, and proxmox doesn’t allow you to do this without patching their code and rebooting. VMware at least gives you a cli tool to change it, and libvirt/Ubuntu don’t impose any limit.

This protects users from doing bad things. I don’t really want to remove that protection.

  • #6

This is not the same. In the end, one VM with 128 cores will be much slower than 2VM with 64 cores, because the kernel inside the VM has totally wrong assumptions about physically available cores.

I am unable to see that this is important. Please provide benchmarks to support that claim.

This protects users from doing bad things. I don’t really want to remove that protection.

While it may protect users from doing bad things performance-wise it is a pain for power users operating different cpu configurations in a cluster.
We have 2 different types of machines in our cluster (2sockets,8threads and 2 sockets 16 threads).
A vm that resides on the 16 thread host can have 16vcpus assigned. If i migrate that to the 8 thread host i can’t start it because proxmox can only assign 8vcpus but the configuration states 16. I have not tested that though.
That could be a serious issue combined with HA VM’s.

Regards,
Daniel

  • #7

I confirm — this is serious issue. My configuration have 16 of 40 available cores and it have serious performance downgrade because migrated Virtual Machine cant start on another node with only 16 cpu available. This is big problem and i think this value need to dinamicly change to allowed number of cpu on current node, or just unlock option to run more then current number cpus installed

  • #8

This is not the same. In the end, one VM with 128 cores will be much slower than 2VM with 64 cores, because the kernel inside the VM has totally wrong assumptions about physically available cores.

This really depends on application. Like I said, from the host perspective, each vCPU is just another process being scheduled by the kernel. If these threads are relatively idle, there is no performance impact. Now if these vCPUs are busy, then absolutely it could have performance issues. There is no magic to this…

I am unable to see that this is important. Please provide benchmarks to support that claim.

I’m afraid I can’t provide general benchmarking numbers. However I don’t think benchmarks are required to see the issue. There are some applications which are sensitive to running on the same hyperthread. For example the VPP fd.io project recommends not running on hyperthreads. The physical context switching the CPU must perform in order to execute both hyperthreads «at the same time» can cause performance drops https://wiki.fd.io/view/VPP/How_To_Optimize_Performance_(System_Tuning)#Hyperthreading for example when you have two processes both hard-polling (looping) to pull data off of a queue. This gets more complicated when you have multiple VMs and you want to ensure two VMs aren’t running on the same physical CPU.

I’m not specifically using VPP, but I am using an application that is similarly impacted by this type of configuration. The issue is that two vCPUs of the VM can be scheduled/assigned to the same physical core by proxmox, and this causes performance drops.

This protects users from doing bad things. I don’t really want to remove that protection.

I can appreciate the effort made, however I think it should be an option to disable the check. Nobody is suggesting to completely kill the protection, but instead make it configurable for more advanced use-cases. As pointed out by other users in this thread, there are perfectly valid reasons to not have this check.

  • #9

We really need this check disabled. We need to move VMs with 32 vCPUs to hosta with 4 physical cores hosts during the night time when they are not used and back to 32 cores hosts at 8AM before starting the workshift of users. I am a proxmox fan but this limitation prevents our startup from offering our product (VDI related) to our customers. Would this work:

You can edit ./usr/share/perl5/PVE/QemuServer.pm and apply this diff to bypass the limit

Code:
diff —git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 02a689c..5fbba08 100644
— a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2961,11 +2961,6 @@ sub config_to_command {

my $vcpus = $conf->{vcpus} ? $conf->{vcpus} : $maxcpus;

— my $allowed_vcpus = $cpuinfo->{cpus};

— die «MAX $allowed_vcpus vcpus allowed per VM on this noden»
— if ($allowed_vcpus < $maxcpus);

push @$cmd, ‘-smp’, «$vcpus,sockets=$sockets,cores=$cores,maxcpus=$maxcpus»;

push @$cmd, ‘-nodefaults’;

?

Hi Dietmar. I am a Proxmox fan but this limitation is a show stopper for us….could it be fixed so we can override it?

Thanks and all the best

  • #10

Simply adjust the resources according to the current server and run backup and then resize when moving to another server according to available resources

  • #11

Simply adjust the resources according to the current server and run backup and then resize when moving to another server according to available resources

That would cause downtime for HA setup…..
Bypassing the check is better.

Содержание

  1. Proxmox VE 3.4 — Problem starting a virtual pc.
  2. lmniedas
  3. wolfgang
  4. lmniedas
  5. wolfgang
  6. lmniedas
  7. wolfgang
  8. About
  9. Quick Navigation
  10. Get your subscription!
  11. Override max vCPU allowed per VM
  12. jknight
  13. dietmar
  14. dietmar
  15. jknight
  16. Как правильно выбрать параметр CPU при установке виртуальной машины proxmox?
  17. Как правильно выбрать параметр CPU при установке виртуальной машины proxmox?
  18. task error
  19. Tape job failing with SCSI transport error
  20. [SOLVED] Backup Restore // TASK ERROR: unable to restore CT 102 — no such logical volume pve/vm-102-disk-0
  21. ext4 signature error
  22. Proxmox CT startet nicht
  23. TASK ERROR: cannot continue garbage-collection safely, permission denied on: «/sys/kernel/tracing»
  24. TASK ERROR: MAX 6 vcpus allowed per VM on this node
  25. KVM VM (64GB) won’t start with memory hotplug enabled
  26. Proxmox backup
  27. «Can’t use an undefined value as an ARRAY reference» at VM START
  28. [SOLVED] TASK ERROR: migration aborted
  29. VMS does not turn off
  30. Problem Start VM after Migrate
  31. TASK ERROR: command ‘vzctl start 100’ failed: exit code 60
  32. About
  33. Quick Navigation
  34. Get your subscription!

Proxmox VE 3.4 — Problem starting a virtual pc.

lmniedas

Member

wolfgang

Proxmox Retired Staff

Best regards,
Wolfgang

Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation

lmniedas

Member

Hi, I change the number of cores to 1 and now appear this error: No accelerator found!.

What is the problem?? I have a i5 3470 procesor. with 8 gb of ram

wolfgang

Proxmox Retired Staff

Best regards,
Wolfgang

Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation

lmniedas

Member

wolfgang

Proxmox Retired Staff

Best regards,
Wolfgang

Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Quick Navigation

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Источник

Override max vCPU allowed per VM

jknight

New Member

My current hardware has 2x 16 core CPUs with hyperthreading enabled, giving me a max of 64 vCPU. However for a specific testing scenario I’m performing, I’m trying to override this and give a VM more than 64 vCPUs. When starting, it stops with this error

TASK ERROR: MAX 64 vcpus allowed per VM on this node

Is there a config file or cli command I can use to override this max value?

dietmar

Proxmox Staff Member

Best regards,
Dietmar

Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation

dietmar

Proxmox Staff Member

Best regards,
Dietmar

Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation

jknight

New Member

I deleted my previous post but I’lll recap it here for anyone looking for the solution:

You can edit ./usr/share/perl5/PVE/QemuServer.pm and apply this diff to bypass the limit

My concerns with this code are that

    This check is done per VM only. So if you have 64 cores on your host, it prevents you from starting a VM with 128 cores. But it wouldn’t stop you from starting 2 VMs with 64 cores each. These would have similar performance issues, yet only the former case is prevented. From the hypervisor standpoint, a vCPU is simply a QEMU process. It shouldn’t matter if these processes belong to the same VM or different VMs.

The sockets * cores math doesn’t take into account that the cores are virtual (hyperthreads.) From a performance standpoint, this can be important. Proxmox also doesn’t let you configure hyperthreads in your guest.

  • Not flexible. There is no config value or UI checkbox to disable this check. There are specific use cases where oversubscription of the vCPUs to physical CPUs is desired, and proxmox doesn’t allow you to do this without patching their code and rebooting. VMware at least gives you a cli tool to change it, and libvirt/Ubuntu don’t impose any limit.
  • If you could provide any additional insight, that’d be appreciated. Providing as much flexibility as possible in CPU/hardware topologies is currently the main difference between me installing libvirt/Ubuntu, and proxmox. I’m not making assumptions about this, I’m literally reading the code.

    Going back onto the mailing list and git history, there’s no explanation of why this check was added or what problem it was trying to solve.

    Источник

    Как правильно выбрать параметр CPU при установке виртуальной машины proxmox?

    Со всеми параметрами разобрался кроме CPU.
    У меня 2 процессора по 8 ядер , но когда создаю VM я могу выбрать максимум 8 ядер.

    Либо это 2 сокета по 4 ядра, либо 1 сокет 8 ядер.
    В остальных случаях ошибка:

    Как правильно максимально эффективно настроить параметры CPU?

    • Вопрос задан более года назад
    • 717 просмотров

    Сколько указывать процессоров для VPS зависит от нагрузки каждой VPS и сколько они будут отъедать от общего процессора, это будет видно когда они будут запущены. Остальное для эмуляции многопотоков в OS.
    В среднем можно на 8 ядер (если они разпоточены, например как AMD Ryzen 7 1700X 8 ядер, то там 16 потоков), можно создать 32vCPU.

    Но если каждая VPS будет постоянно забирать 100% выделенного ей процессорного времени, то 1к1 нужно делать, и оставить хотя бы пару ядер на сам proxmox.

    Что касаемо ошибки, в какой момент она возникает? Какая версия Proxmox и как установлена, как OS или просто накачена как пакет?

    У меня без проблем дает создать сколько угодно vCPU

    Статьи не нашел, которые когда то сохранял. Но погугли на тему как работают виртуальные процессоры в вируталках.

    В двух словах, proxmox или другая система виртуализации сама следит за тем, какой виртуалке сколько нужно выделить в данный момент ресурсов. Т.е. можно сделать хоть 100 виртуальных процессоров, но они не смогут сделать больше чем твои настоящие 8 ядер. Но они спокойно смогут работать все вместе если у тебя каждая впс будет требовать 1% от общей мощности всех 8 ядер. Если вдруг какой то машине потребуется 10% от 8 ядер, proxmox заберет реальную мощность у других виртуалок и отдаст той, которой сейчас нужнее. Эти приоритеты тоже настраиваются при необходимости.

    Источник

    Как правильно выбрать параметр CPU при установке виртуальной машины proxmox?

    Со всеми параметрами разобрался кроме CPU.
    У меня 2 процессора по 8 ядер , но когда создаю VM я могу выбрать максимум 8 ядер.

    Либо это 2 сокета по 4 ядра, либо 1 сокет 8 ядер.
    В остальных случаях ошибка:

    Как правильно максимально эффективно настроить параметры CPU?

    • Вопрос задан более года назад
    • 717 просмотров

    Сколько указывать процессоров для VPS зависит от нагрузки каждой VPS и сколько они будут отъедать от общего процессора, это будет видно когда они будут запущены. Остальное для эмуляции многопотоков в OS.
    В среднем можно на 8 ядер (если они разпоточены, например как AMD Ryzen 7 1700X 8 ядер, то там 16 потоков), можно создать 32vCPU.

    Но если каждая VPS будет постоянно забирать 100% выделенного ей процессорного времени, то 1к1 нужно делать, и оставить хотя бы пару ядер на сам proxmox.

    Что касаемо ошибки, в какой момент она возникает? Какая версия Proxmox и как установлена, как OS или просто накачена как пакет?

    У меня без проблем дает создать сколько угодно vCPU

    Статьи не нашел, которые когда то сохранял. Но погугли на тему как работают виртуальные процессоры в вируталках.

    В двух словах, proxmox или другая система виртуализации сама следит за тем, какой виртуалке сколько нужно выделить в данный момент ресурсов. Т.е. можно сделать хоть 100 виртуальных процессоров, но они не смогут сделать больше чем твои настоящие 8 ядер. Но они спокойно смогут работать все вместе если у тебя каждая впс будет требовать 1% от общей мощности всех 8 ядер. Если вдруг какой то машине потребуется 10% от 8 ядер, proxmox заберет реальную мощность у других виртуалок и отдаст той, которой сейчас нужнее. Эти приоритеты тоже настраиваются при необходимости.

    Источник

    task error

    Tape job failing with SCSI transport error

    • jaff
    • Thread
    • Sep 21, 2022
    • backup failed error proxmox backup server scsi tape tape backup job task error transport write error
    • Replies: 18
    • Forum: Proxmox Backup: Installation and configuration

    [SOLVED] Backup Restore // TASK ERROR: unable to restore CT 102 — no such logical volume pve/vm-102-disk-0

    • Skream
    • Thread
    • Jun 20, 2022
    • backup restore task error
    • Replies: 2
    • Forum: Proxmox VE: Installation and configuration

    ext4 signature error

    • lilbiba400
    • Thread
    • Mar 1, 2022
    • ext4 signature detected lxc contaier error lxc container task error
    • Replies: 4
    • Forum: Proxmox VE (Deutsch/German)

    Proxmox CT startet nicht

    • Nic_
    • Thread
    • Jan 5, 2022
    • cannot start ct lxc ct not start task error
    • Replies: 2
    • Forum: Proxmox VE (Deutsch/German)

    TASK ERROR: cannot continue garbage-collection safely, permission denied on: «/sys/kernel/tracing»

    • da123
    • Thread
    • Dec 8, 2021
    • garbage collecion installation permission denied task error
    • Replies: 1
    • Forum: Proxmox Backup: Installation and configuration

    TASK ERROR: MAX 6 vcpus allowed per VM on this node

    • mammutserver
    • Thread
    • Jun 5, 2021
    • error maxcpu task error vcpu
    • Replies: 7
    • Forum: Proxmox VE: Installation and configuration

    KVM VM (64GB) won’t start with memory hotplug enabled

    • hanoon
    • Thread
    • May 30, 2021
    • aligned baloon error hotplug kvm latest memory memory size start up task error
    • Replies: 1
    • Forum: Proxmox VE: Installation and configuration

    Proxmox backup

    • ioanv
    • Thread
    • Nov 12, 2019
    • backup exclude-path task error
    • Replies: 4
    • Forum: Proxmox VE: Installation and configuration

    «Can’t use an undefined value as an ARRAY reference» at VM START

    • IgorK
    • Thread
    • Sep 7, 2018
    • can’t use an undefined value as an array reference error qemuserver.pm task error windows server 2008 r2
    • Replies: 4
    • Forum: Proxmox VE: Installation and configuration

    [SOLVED] TASK ERROR: migration aborted

    • kubo6472
    • Thread
    • Sep 7, 2018
    • aborting error failed ha failover iso migration share task error
    • Replies: 3
    • Forum: Proxmox VE: Installation and configuration

    VMS does not turn off

    • Filipe
    • Thread
    • Jul 17, 2018
    • shutdown node task error
    • Replies: 1
    • Forum: Proxmox VE: Installation and configuration

    Problem Start VM after Migrate

    • PveUuser
    • Thread
    • Feb 27, 2017
    • fail failed migrate move vm node start stopped task error
    • Replies: 0
    • Forum: Proxmox VE: Installation and configuration

    TASK ERROR: command ‘vzctl start 100’ failed: exit code 60

    • Pulvertum
    • Thread
    • Oct 6, 2016
    • exit code exit code 60 proxmox task error vzctl vzquota
    • Replies: 2
    • Forum: Proxmox VE: Installation and configuration

    About

    The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
    We think our community is one of the best thanks to people like you!

    Quick Navigation

    Get your subscription!

    The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

    Источник

    Home / Questions / How to choose the correct cpu parameter when installing proxmox virtual machine?


    Tyler Butler's avatar

    I figured out all the parameters except the CPU.
    I have 2 processors with 8 cores, but when I create a VM I can select a maximum of 8 cores.
    rP2eibg.png
    Either it is 2 sockets with 4 cores, or 1 socket with 8 cores.
    In other cases, the error is:

    TASK ERROR: MAX 8 vcpus allowed per VM on this node

    How to properly configure the CPU parameters as efficiently as possible?

    2 Answers


    1. James's avatar

      For yourself, you only have two processors with 4 cores, just hyper-threading, such questions without specifying the processor model are just a spit in the face of the respondents

      • 0
      • Reply


      • Tyler Butler's avatar

        proxmox is installed from the installation file on a physical server, on it 2x Xeon E5620
        they are 4 cores 8 threads
        61aad2f1b177d018163872.png
        I do not quite understand how it works, so I asked if I have 2 processors, 4 cores, 8 threads
        can I use your fingers please? Or where you can read for a beginner is an article?

        • 0
        • Reply


      • James's avatar

        Tyler Butler , so you have eight cores and lets you select eight cores, the question is settled
        Hypertrading is not new kernels

        • 0
        • Reply


      • Tyler Butler's avatar

        But how is it better than 2 sockets 4 cores or 1 socket 8 cores or is there no difference?

        • 0
        • Reply


      • James's avatar

        Tyler Butler , do this and that and check with any test, in general, if you allocate all resources to one virtual machine, why do you need an extra layer in the form of a proxmox, then

        • 0
        • Reply


      • Tyler Butler's avatar

        James , but who said there is only one virtual machine? There are 10 of them

        • 0
        • Reply


      • Tyler Butler's avatar

        James , all 10 virtual machines besides two should work at maximum performance, but they do not always work simultaneously, almost always loaded only 2-3 times, proxmox distributes the load itself, so you just need to set the maximum available value so that at peak load you can not worry about friezes. Otherwise, if I give each virtual machine 2 cores, they will simply always work slowly, but each independently

        • 0
        • Reply


    2. Steven's avatar

      How many processors to specify for a VPS depends on the load of each VPS and how much they will consume from the total processor, this will be visible when they are launched. The rest is for emulating multithreading in OS.
      On average, it is possible for 8 cores (if they are scattered, for example, like AMD Ryzen 7 1700X 8 cores, then there are 16 threads), you can create 32vCPU.

      But if each VPS will constantly take 100 % CPU time allocated to it, then 1k1 should be done, and at least a couple of cores should be left for proxmox itself.

      As for the error, at what point does it occur? What version of Proxmox and how is it installed, as an OS, or just pumped as a package?

      It gives me no problem to create as many vCPUs as I want

      • 0
      • Reply


      • Tyler Butler's avatar

        proxmox is installed from the installation file on a physical server, on it 2x Xeon E5620
        they are 4 cores 8 threads
        noXmoJh.png
        I do not quite understand how it works, so I asked if I have 2 processors, 4 cores, 8 threads
        can I use your fingers please? Or where you can read for a beginner is an article?

        • 0
        • Reply


      • Steven's avatar

        I did not find any articles that I once saved. But google about how virtual processors work in virtual machines.

        In a nutshell, proxmox or another virtualization system itself monitors which virtual machine how much resources should be allocated at the moment. Those. you can make at least 100 virtual processors, but they cannot do more than your real 8 cores. But they can easily work all together if you have each VPS requiring 1 % from the total power of all 8 cores. If suddenly some machine needs 10 % from 8 cores, proxmox will take the real power from other virtual machines and give it to the one that is needed now. These priorities are also configurable as needed.

        • 0
        • Reply

    При создании виртуальных машин на различных гипервизорах (VMWare, KVM, Hyper-V и т.д.) вы можете обратить внимание, что иногда виртуальная машина может не видеть все выделенные ей виртуальные ядра (vCPU). В нашем случае виртуальной машине на KVM были выделены 8 vCPU, на нее установлена Windows 10. Однако Windows определяла эти ядра как отдельные процессоры, из которых можно использовать только 2 vCPU.

    Содержание:

    • Виртуальная машина Windows 10 не видит все ядра
    • Количество поддерживаемых процессоров в Windows 10
    • Управление виртуальными ядрами и vCPU в KVM
    • Настройка виртуальных процессоров и количества ядер в VMWare
    • Архитектура NUMA и виртуальные vCPU

    Виртуальная машина Windows 10 не видит все ядра

    Если открыть диспетчер устройств Windows, можно убедится, что все выделенные ядра видны в качестве 8 отдельных виртуальных процессоров типа QEMU Virtual CPU version 2,5.

    Виртуальные процессоры QEMU Virtual CPU version 2 в оборудовании виртуальной машины.

    При этом в свойствах Windows 10 (Computer -> Properties) и в Task Manage видно, что на компьютере доступны только 2 процессора QEMU Virtual CPU.

    Windows не видит все выделенные виртуальные процессоры

    То есть сколько бы вы не добавили виртуальных ядер, Windows 10 все равно сможет использовать только два. При этом соседний виртуальный сервер с Window Server 2016 на этом же гипервизоре видит все 16 выделенных ему vCPU.

    Количество поддерживаемых процессоров в Windows 10

    Проблема заключается в том, что в десктопных редакциях Windows (Windows 10/8.1/7) есть ограничение на максимальное количество физических процессоров (сокетов), которое компьютер может использовать:

    • Windows 10 Home – 1 CPU
    • Windows 10 Professional – 2 CPU
    • Windows 10 Workstation – до 4 CPU
    • Windows Server 2016 – до 64 CPU

    Однако это ограничение не распространяется на ядра. Т.е. для повышения производительности вы можете использовать процессор с большим количеством ядер. Большинство гипервизоров умеют предоставлять vCPU в виде процессоров, процессорных ядер или даже потоков. Т.е. вместо 8 виртуальных CPU вы можете предоставить vCPU в виде 2 сокетов по 4 ядра в каждом. Рассмотрим, как в различных системах виртуализации выделить виртуальные процессоры в виде ядер и как это связать с архитектурой NUMA, использующейся в современных процессорах.

    Управление виртуальными ядрами и vCPU в KVM

    В моей виртуальной машине KVM c Windows 10, все назначенные виртуальные ядра считаются отдельными процессорами.

    Чтобы использовать все ресурсы CPU, выделенные виртуальной машине нужно, чтобы виртуальная машина видела не 8 процессоров, а один 8-ядерный процессор, 2 процессора по 4 ядра или 1 процессор с 4 ядрами по 2 потока. Попробуем изменить способ назначения виртуальных ядер для ВМ на KVM.

    Выключите виртуальную машину:

    # virsh shutdown server.vpn.ru
    – где server.vpn.ru это имя виртуальной машины.

    Особенности управления ВМ в KVM из консоли сервера с помощью virsh.

    Выведите текущую XML конфигурацию виртуальной машины KVM:

    # virsh dumpxml server.vpn.ru

    Нам интересен блок с описанием процессоров:

    <vcpu placement='static'>8</vcpu>
    
    <cputune>
    
    <shares>1000</shares>
    
    </cputune>
    
    <resource>
    
    <partition>/machine</partition>
    
    </resource>
    
    <os>
    
    <type arch='x86_64' machine='pc-i440fx-rhel7.6.0'>hvm</type>
    
    <bootmenu enable='yes'/>
    
    </os>
    
    <features>
    
    <acpi/>
    
    <apic/>
    
    <pae/>
    
     </features>
    

    Как видим, у нас указано просто 8 vCPU. Изменим конфигурацию:

    # virsh edit server.vpn.ru

    И после </features> добавим:

    <cpu mode='host-passthrough' check='none'>
    
    <topology sockets='1' cores='4' threads='2'/>
    
    </cpu>
    

    Где:

    • host-passthrough
      — режим эмуляции при котором на виртуальной машине будет показан физический процессор узла кластера (ноды).
    • sockets='1'
      — указываем что процессор 1
    • cores='4'
      — указываем, что процессор имеет 4 ядра
    • threads='2'
      — указываем, что ядра у нас по 2 потока

    Сохраните конфигурационный файл и запустите ВМ. Авторизуйтесь в гостевой ВМ с Windows 10 и в Task Manager или Resource Monitor проверьте, что ОС видит все выделенные виртуальные ядра.

    несколько виртуальных ядер в Windows 10

    Также в свойства системы теперь стал отображаться физический процессор хоста Intel(R) Xeon(R) Silver 4114 CPU, а не виртуальный.

    виртуальная машина KVM с гостевой Windows 10 видит два физических процессор с несколькими ядрами

    Так нам удалось решить проблему с нагрузкой на ВМ, так как двух ядер не хватало для полноценной работы приложений.

    Настройка виртуальных процессоров и количества ядер в VMWare

    Вы можете изменить способ презентации vCPU для виртуальной машины VMWare из интерфейса vSphere Client.

    1. Выключите ВМ и откройте ее настройки;
    2. Разверните секцию CPU;
    3. Изменим конфигурацию ВМ так, чтобы гостевая ОС видела 2 процессора по 4 ядра. Измените значение Cores per Socket на 4. Это означает, что гостевая ОС будет видеть два четырех –ядерных процессора (2 сокета по 4 ядра); vmware - количесвто ядер на процессор в виртуальной машине
    4. Сохраните изменения и запустите ВМ.

    Архитектура NUMA и виртуальные vCPU

    Есть еще несколько аспектов назначения vCPU и ядер виртуальным машинам, которые нужно понимать.

    При назначении ядер на сокете учитывайте наличие NUMA архитектуры (используется в большинстве современных CPU). Не рекомендуется назначать вашей ВМ количество ядер на сокет (и общее количество vCPU) больше, чем доступно ядер на вашем физическом сокете/процессоре (ноде NUMA). При размещении на одной физической ноде NUMA, виртуальная машина сможет использовать быструю локальную RAM, доступную на конкретной ноде NUMA. Иначе для выполнения операции процессам придется ждать ответа от другой ноды NUMA (что несколько более долго).

    Если вы назначаете для ВМ два отдельных виртуальных сокета, то гипервизор может их запускать на разных нодах NUMA. Что не лучшим образом скажется на производительности ВМ.

    Если количество требуемых vCPU превышает количество ядер на 1 физическом сокете (ноде NUMA), нужно создать несколько виртуальных сокетов (процессоров) с необходимым количество ядер. Также не желательно использовать нечетное количество процессоров (лучше добавить 1 vCPU)

    Это позволит сохранить производительность виртуальной машины.

    vCPU и процессорная архитектура NUMA

    Например, для 2 процессорного хоста с 10 ядрами (суммарно доступно 40 vCPU с учетом HyperThreading), при настройке vCPU для ВМ оптимально использовать такие конфигурации:

    Требуемое количество vCPU Количество виртуальных сокетов в настройках ВМ Количество ядер на виртуальном процессоре в настройках ВМ
    1 1 1
    ……
    10 1 10
    11 Не оптимально
    12 2 6
    ……
    20 2 10

    Например, ВМ с Microsoft SQL Server 2016 Enterprise Edition 16 vCPU в конфигурации 8 сокетов по 2 ядра будет работать хуже, чем в конфигурации 2 сокета по 8 ядер.

    Также не забывайте, что некоторые приложения лицензируются по физическим сокетам (так было в старых версиях SQL Server). Иногда вам просто выгоднее лицензировать один многоядерный процессор, чем несколько процессоров с меньшим количеством ядер.

    AdminOne

    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    The above is one of the limitation with ESXI 6.

    What does this actually mean?

    If I have a 4 physical CPU server with 16 cores each, can I assign all processors and cores to a single machine

    or am I limited to a multiplier of xCPU with yCores that equals 8?

    Thanks!


    • All forum topics


    • Previous Topic

    • Next Topic

    1 Solution

    brunofernandez1

    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    a vCPU is a logical CPU

    for example

    1phyisical cpu with one core: 1vcpu possible

    1physical cpu with two cores: 2vcpus possible

    1physical cpu with two cores and hyperthreading: 4vcpus possible…

    ——————————————————————————-
    If you found this or any other answer helpful, please consider to award points. (use Correct or Helpful buttons)

    Regards from Switzerland,
    B. Fernandez

    http://vpxa.info/

    6 Replies

    npadmani

    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    I think you are using ESXi 6 free license

    in that limitation is per VM maximum 8 vCPUs.

    let’s say if you have vSphere standard, Enterprise or Enterprise plus license, you will not face that limitation.

    In that case, config. max for a single VM is upto 128 vCPUs.

    Narendra Padmani
    VCIX6-DCV | VCIX7-CMA | VCI | TOGAF 9 Certified

    brunofernandez1

    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    brunofernandez1

    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    a vCPU is a logical CPU

    for example

    1phyisical cpu with one core: 1vcpu possible

    1physical cpu with two cores: 2vcpus possible

    1physical cpu with two cores and hyperthreading: 4vcpus possible…

    ——————————————————————————-
    If you found this or any other answer helpful, please consider to award points. (use Correct or Helpful buttons)

    Regards from Switzerland,
    B. Fernandez

    http://vpxa.info/

    brunofernandez1

    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    this information is from the link i’ve posted…sorry for the wrong information…

    ——————————————————————————-
    If you found this or any other answer helpful, please consider to award points. (use Correct or Helpful buttons)

    Regards from Switzerland,
    B. Fernandez

    http://vpxa.info/

    При запуски появляется ошибка:

    kvm: -drive file=/var/lib/vz/images/100/vm-100-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,aio=native,cache=none,detect-zeroes=on: file system may not support O_DIRECT

    kvm: -drive file=/var/lib/vz/images/100/vm-100-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,aio=native,cache=none,detect-zeroes=on: could not open disk image /var/lib/vz/images/100/vm-100-disk-1.qcow2: Could not open ‘/var/lib/vz/images/100/vm-100-disk-1.qcow2’: Invalid argument

    TASK ERROR: start failed: command ‘/usr/bin/kvm -id 100 -chardev ‘socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait’ -mon ‘chardev=qmp,mode=control’ -vnc unix:/var/run/qemu-server/100.vnc,x509,password -pidfile /var/run/qemu-server/100.pid -daemonize -smbios ‘type=1,uuid=23f1d264-91c8-408e-bb84-9ac94cf529fc’ -name TServer -smp ‘4,sockets=1,cores=4,maxcpus=4’ -nodefaults -boot ‘menu=on,strict=on,reboot-timeout=1000’ -vga cirrus -cpu kvm64,+lahf_lm,+x2apic,+sep -m 10240 -k en-us -cpuunits 1000 -device ‘piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2’ -device ‘usb-tablet,id=tablet,bus=uhci.0,port=1’ -device ‘virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3’ -iscsi ‘initiator-name=iqn.1993-08.org.debian:01:5ed3e1eb441e’ -drive ‘file=/var/lib/vz/template/iso/debian-8.0.0-amd64-DVD-1.iso,if=none,id=drive-ide2,media=cdrom,aio=native’ -device ‘ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200’ -drive ‘file=/var/lib/vz/images/100/vm-100-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,aio=native,cache=none,detect-zeroes=on’ -device ‘ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100’ -netdev ‘type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown’ -device ‘e1000,mac=E6:03:E9:F0:74:81,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300» failed: exit code 1

    В консоле показывает:

    root@pve:~# kvm

    Could not initialize SDL(No available video device) — exiting

    root@pve:~# lspci | grep VGA

    07:0b.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 10)

    Сервер DELL PowerEdge 1100, никто с такой проблемой не сталкивался?

    Понравилась статья? Поделить с друзьями:
  • Task error failed to run vncproxy proxmox
  • Task error command ha manager set vm 100 state started failed exit code 255
  • Task error check if node may join a cluster failed
  • Task error cannot prepare pci pass through iommu not present
  • Tarkov ошибка авторизации после рейда