XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Setting Dom0 VCPU weight

    Scheduled Pinned Locked Moved Solved Compute
    5 Posts 2 Posters 1.1k Views 1 Watching
    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.
    • Y Offline
      yeesoon
      last edited by

      Hi,
      I am having issue setting the VCPU weight for Dom0, I want to assign it a higher weight than other VMs, but the configuration does not seem to take effect. And when I re-check the weight on Dom0, it changes! Please see below:

      [06:45 xcp-ng-gqcbymae ~]# xl sched-credit
      Cpupool Pool-0: tslice=30ms ratelimit=1000us migration-delay=0us
      Name                                ID Weight  Cap
      Domain-0                             0     85    0
      XOA                                  1    256    0
      HP-VM-2                              6    256    0
      HP-VM-3                             12    256    0
      HP-VM-1                             18    256    0
      [06:45 xcp-ng-gqcbymae ~]# xl sched-credit -d 0 -w 512
      [06:46 xcp-ng-gqcbymae ~]# xl sched-credit
      Cpupool Pool-0: tslice=30ms ratelimit=1000us migration-delay=0us
      Name                                ID Weight  Cap
      Domain-0                             0     85    0
      XOA                                  1    256    0
      HP-VM-2                              6    256    0
      HP-VM-3                             12    256    0
      HP-VM-1                             18    256    0
      [06:46 xcp-ng-gqcbymae ~]# xl sched-credit
      Cpupool Pool-0: tslice=30ms ratelimit=1000us migration-delay=0us
      Name                                ID Weight  Cap
      Domain-0                             0     85    0
      XOA                                  1    256    0
      HP-VM-2                              6    256    0
      HP-VM-3                             12    256    0
      HP-VM-1                             18    256    0
      [06:46 xcp-ng-gqcbymae ~]# xl sched-credit
      Cpupool Pool-0: tslice=30ms ratelimit=1000us migration-delay=0us
      Name                                ID Weight  Cap
      Domain-0                             0    170    0
      XOA                                  1    256    0
      HP-VM-2                              6    256    0
      HP-VM-3                             12    256    0
      HP-VM-1                             18    256    0
      

      Can someone advise what else needs to be done? Thank you!

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Why do you want to do this in the first place? Also with XCP-ng, you shouldn't use xl in general. It's xe that you need.

        1 Reply Last reply Reply Quote 0
        • Y Offline
          yeesoon
          last edited by

          Thank you Olivier.
          I am running some tests to verify the CPU weight actually takes priority under high load conditions. In our setup, there are some VMs that run mission critical high volume I/O services, I am able to set their CPU weight to 512. However, I need to make sure the Dom0 CPU weight stays at a higher priority than the guest VM's weight. In essence setting 3 priority tiers (1) Dom0 @1024, (2) High Priority service VMs @512, (3) low priority service VMs @256.
          The xe command does not work on my setup:

          [13:41 xcp-ng-gqcbymae ~]# sudo xe sched-credit -d 0 -w 512
          Syntax error:
          For usage run: 'xe help'
          

          The xl command works, but cannot change the priority for Dom0:

          [13:42 xcp-ng-gqcbymae ~]# sudo xl sched-credit -d 0 -w 512
          [13:45 xcp-ng-gqcbymae ~]# xl sched-credit
          Cpupool Pool-0: tslice=30ms ratelimit=1000us migration-delay=0us
          Name                                ID Weight  Cap
          Domain-0                             0    128    0
          XOA                                  1    256    0
          HP-VM-2                              6    256    0
          HP-VM-3                             12    256    0
          HP-VM-1                             18    256    0
          

          The same command works well on guest VM #6 as follows:

          [13:45 xcp-ng-gqcbymae ~]# sudo xl sched-credit -d 6 -w 512
          [13:46 xcp-ng-gqcbymae ~]# xl sched-credit
          Cpupool Pool-0: tslice=30ms ratelimit=1000us migration-delay=0us
          Name                                ID Weight  Cap
          Domain-0                             0    64    0
          XOA                                  1    256    0
          HP-VM-2                              6    512    0
          HP-VM-3                             12    256    0
          HP-VM-1                             18    256    0
          

          Does the VM with 512 weight have a higher priority than Dom0 under load conditions in this case? Or does Dom0 always get higher regardless of what is shown here? It seems the weight metric keeps changing for Dom0 by itself.

          Thanks!

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            Okay so sorry if I wasn't clear: xe isn't a 1:1 replacement for xl. It's a complete/dedicated API that you have on XenServer and XCP-ng (it's called XAPI).

            The design is simple: XAPI first. You must find how to do that with XAPI if possible, because if you do with xe, it might not be saved because xl config aren't saved in a database, unlike XAPI with xe

            1 Reply Last reply Reply Quote 0
            • Y Offline
              yeesoon
              last edited by

              Thanks Olivier. Yes I am able to set the parameter now using xe commands. Thanks for your help!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post