ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    How many vCPUs can I have?

    IT Discussion
    hyper-v hyper-v 2016 vcpu virtualization hypervisor
    13
    46
    3.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dafyreD
      dafyre
      last edited by

      When setting up a VM, I actually start with 1 vCPU... If the system performs well in testing, then move it to production with 1vCPU... If it doesn't, then I'll move on up to 2 vCPUs and repeat the testing...

      The reason is that when you have a VM with more than 1 vCPU, the system has to wait for that same number of cores to be ready to process instructions...

      IE: With your SQL Server, you have 4 vCPUs... The Hypervisor/host has to wait until it has 4 Cores waiting on instructions before it gives any time to your SQL server.

      Generally speaking that's not going to hurt things until your host gets busy with other VMs too.

      scottalanmillerS 2 Replies Last reply Reply Quote 1
      • scottalanmillerS
        scottalanmiller @Joel
        last edited by

        @Joel said in How many VCPU’s can I have?:

        Intel Xeon Silver 4114

        This is a 20 thread processor. You've only allocated half of it. Half of the CPU will be completely idle as it is inaccessible in the current configuration.

        1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller @dafyre
          last edited by

          @dafyre said in How many VCPU’s can I have?:

          When setting up a VM, I actually start with 1 vCPU... If the system performs well in testing, then move it to production with 1vCPU... If it doesn't, then I'll move on up to 2 vCPUs and repeat the testing...

          This is important. This is how performance testing has to be done.

          1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @dafyre
            last edited by

            @dafyre said in How many VCPU’s can I have?:

            The reason is that when you have a VM with more than 1 vCPU, the system has to wait for that same number of cores to be ready to process instructions...

            This is why using something like 18 out of the 20 threads would make sense. Hold two back for the system, and the rest just let go idle.

            1 Reply Last reply Reply Quote 0
            • PhlipElderP
              PhlipElder
              last edited by PhlipElder

              I suggest always setting a minimum of 2 vCPUs to allow access in case of a runaway thread within the guest.

              When it comes to performance there are two boundaries to keep in mind:
              1: Processor Physical Core Count
              2: Memory per memory controller (NUMA Node)

              Our rule of thumb for #1 is # physical cores (pCores) -1

              Our rule of thumb for #2 is a bit more flexible as a VM may not start if too much vRAM is assigned and it is bound by a NUMA boundary.

              A performance hit can be had by too many vCPUs and vRAM assigned that crosses NUMA boundaries (can be set in the VM's properties). In both cases, bits are bounced around either between physical CPUs or between memory banks within each NUMA node. That bouncing around is lost CPU cycles right there.

              scottalanmillerS 2 Replies Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @PhlipElder
                last edited by

                @PhlipElder said in How many VCPU’s can I have?:

                When it comes to performance there are two boundaries to keep in mind:
                1: Processor Physical Core Count

                Our rule of thumb for #1 is # physical cores (pCores) -1

                This should be by thread, not core count. In the AMD world, they are one and the same. In the Intel world, they are not, but are close. In the Power, ARM, and Sparc worlds, they can be wildly divergent.

                1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @PhlipElder
                  last edited by

                  @PhlipElder said in How many VCPU’s can I have?:

                  Our rule of thumb for #2 is a bit more flexible as a VM may not start if too much vRAM is assigned and it is bound by a NUMA boundary.

                  A performance hit can be had by too many vCPUs and vRAM assigned that crosses NUMA boundaries (can be set in the VM's properties). In both cases, bits are bounced around either between physical CPUs or between memory banks within each NUMA node. That bouncing around is lost CPU cycles right there.

                  With good awareness you can manage this pretty well by mapping out possible RAM bank overruns, or just using NUMA affinity. But that becomes more complex.

                  1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller
                    last edited by

                    NUMA issues is a key reason why we often recommend a single proc with more cores than two procs with fewer cores each. No NUMA.

                    PhlipElderP travisdh1T 2 Replies Last reply Reply Quote 0
                    • PhlipElderP
                      PhlipElder @scottalanmiller
                      last edited by

                      @scottalanmiller said in How many VCPU’s can I have?:

                      NUMA issues is a key reason why we often recommend a single proc with more cores than two procs with fewer cores each. No NUMA.

                      Don't some of the modern CPUs have multiple memory controllers per CPU thus multiple NUMA Nodes per CPU? I've seen drawings for such but not encountered in servers as of yet.

                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @PhlipElder
                        last edited by

                        @PhlipElder said in How many VCPU’s can I have?:

                        @scottalanmiller said in How many VCPU’s can I have?:

                        NUMA issues is a key reason why we often recommend a single proc with more cores than two procs with fewer cores each. No NUMA.

                        Don't some of the modern CPUs have multiple memory controllers per CPU thus multiple NUMA Nodes per CPU? I've seen drawings for such but not encountered in servers as of yet.

                        They might, I've not seen it yet either.

                        1 Reply Last reply Reply Quote 0
                        • MattSpellerM
                          MattSpeller
                          last edited by

                          TL;DR 20

                          scottalanmillerS 1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller @MattSpeller
                            last edited by

                            @MattSpeller said in How many VCPU’s can I have?:

                            TL;DR 20

                            You CAN have way more than that.

                            1 Reply Last reply Reply Quote 0
                            • ObsolesceO
                              Obsolesce
                              last edited by Obsolesce

                              The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.

                              ObsolesceO scottalanmillerS 2 Replies Last reply Reply Quote 1
                              • ObsolesceO
                                Obsolesce @Obsolesce
                                last edited by

                                @Obsolesce said in How many VCPU’s can I have?:

                                The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.

                                That said, Hyper-V will tell you that the percent of total system CPU resources given to a VM will be 100% if you allocate the same number of total threads you have to a VM.

                                1 Reply Last reply Reply Quote 0
                                • scottalanmillerS
                                  scottalanmiller @Obsolesce
                                  last edited by

                                  @Obsolesce said in How many VCPU’s can I have?:

                                  The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.

                                  How did you determine that Hyper-V is involved?

                                  ObsolesceO 1 Reply Last reply Reply Quote 0
                                  • scottalanmillerS
                                    scottalanmiller
                                    last edited by

                                    In ESXi 5 the limitation would have been 20 vCPUs.

                                    1 Reply Last reply Reply Quote 0
                                    • ObsolesceO
                                      Obsolesce @scottalanmiller
                                      last edited by Obsolesce

                                      @scottalanmiller said in How many VCPU’s can I have?:

                                      @Obsolesce said in How many VCPU’s can I have?:

                                      The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.

                                      How did you determine that Hyper-V is involved?

                                      be176c35-5bb2-4163-8f09-3f1b622f8540-image.png

                                      https://docs.microsoft.com/en-us/windows-server/administration/performance-tuning/role/hyper-v-server/processor-performance

                                      Lots of good stuff there.

                                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                                      • scottalanmillerS
                                        scottalanmiller @Obsolesce
                                        last edited by

                                        @Obsolesce said in How many VCPU’s can I have?:

                                        @scottalanmiller said in How many VCPU’s can I have?:

                                        @Obsolesce said in How many VCPU’s can I have?:

                                        The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.

                                        How did you determine that Hyper-V is involved?

                                        be176c35-5bb2-4163-8f09-3f1b622f8540-image.png

                                        https://docs.microsoft.com/en-us/windows-server/administration/performance-tuning/role/hyper-v-server/processor-performance

                                        Yes, we know Hyper-V's limits, but how did you know that he has Hyper-V in the first place? I've done a text search and until you said it, it was never mentioned in the thread.

                                        ObsolesceO 1 Reply Last reply Reply Quote 1
                                        • ObsolesceO
                                          Obsolesce @scottalanmiller
                                          last edited by

                                          @scottalanmiller said in How many VCPU’s can I have?:

                                          @Obsolesce said in How many VCPU’s can I have?:

                                          @scottalanmiller said in How many VCPU’s can I have?:

                                          @Obsolesce said in How many VCPU’s can I have?:

                                          The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.

                                          How did you determine that Hyper-V is involved?

                                          be176c35-5bb2-4163-8f09-3f1b622f8540-image.png

                                          https://docs.microsoft.com/en-us/windows-server/administration/performance-tuning/role/hyper-v-server/processor-performance

                                          Yes, we know Hyper-V's limits, but how did you know that he has Hyper-V in the first place? I've done a text search and until you said it, it was never mentioned in the thread.

                                          It's like Apple or Arch Linux... if someone is using it, they WILL tell you. That he didn't say he was, tells me he's using Hyper-V.

                                          scottalanmillerS 1 Reply Last reply Reply Quote 0
                                          • scottalanmillerS
                                            scottalanmiller @Obsolesce
                                            last edited by

                                            @Obsolesce said in How many VCPU’s can I have?:

                                            @scottalanmiller said in How many VCPU’s can I have?:

                                            @Obsolesce said in How many VCPU’s can I have?:

                                            @scottalanmiller said in How many VCPU’s can I have?:

                                            @Obsolesce said in How many VCPU’s can I have?:

                                            The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.

                                            How did you determine that Hyper-V is involved?

                                            be176c35-5bb2-4163-8f09-3f1b622f8540-image.png

                                            https://docs.microsoft.com/en-us/windows-server/administration/performance-tuning/role/hyper-v-server/processor-performance

                                            Yes, we know Hyper-V's limits, but how did you know that he has Hyper-V in the first place? I've done a text search and until you said it, it was never mentioned in the thread.

                                            It's like Apple or Arch Linux... if someone is using it, they WILL tell you. That he didn't say he was, tells me he's using Hyper-V.

                                            So your hypothesis is that a lack of pertinent information means it is a Microsoft user?

                                            ObsolesceO 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              Last post