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

    Determine if an Host has Hypertreading enabled

    Scheduled Pinned Locked Moved REST API
    18 Posts 3 Posters 966 Views 3 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.
    • R Offline
      rtjdamen
      last edited by

      We are working on an integration between Octopus Cloud, a Microsoft-certified licensing tool that measures the required Microsoft SPLA licenses in your network. For the integration, we are currently working with the REST API. We have a basic prototype in place but are encountering the following issue.

      To determine how many licenses you need to purchase for Windows, it is important to ascertain the number of physical processors a machine has and the number of cores present. A machine with 16 cores per socket and 2 sockets has 32 cores that need to be counted for the license. However, when Hyperthreading is enabled, XOA indicates that there are 64 cores/CPUs present. It's not a problem if you know that Hyperthreading is enabled because you can deduce this, but it seems that it's not visible through the API whether this is turned on or not, while it is visible in the interface. How can this be resolved? Are we missing something, or is this information lacking in the API?

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

        Hi,

        The REST API do not have exactly all the features yet. But let me ask @julien-f if it's exposed in the host info.

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          rtjdamen @olivierlambert
          last edited by

          @olivierlambert Thank you, we have noticed that. Additionally, what seems to be missing at the moment is the VM host affinity, which would be beneficial to include in the output. The reason is that these metrics are essential for determining licensing needs. For Microsoft hosting partners, having a management system like Octopus is crucial to remain compliant in their SPLA reporting every month. We have recently undergone a Licensing audit, and I can confirm that it is challenging without this information.

          I believe the adoption of XCP-NG by a product like Octopus Cloud is broadening the customer base for XCP-NG. Therefore, it would be a valuable addition!

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

            You can always use the JSON-RPC API that is feature complete (ie everything you see in the web UI comes from it), but it's less fun to use. Let us know if there's other missing features so @julien-f can check to integrate them in the REST API for a next release 🙂

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              rtjdamen @olivierlambert
              last edited by

              @olivierlambert Thank you, i will sumarize them and add the requirements into a feature request.

              Sorry for my dumb questions ;-), but i am wondering how to use the JSON-RPC API, is there some documentation on that? i can then share that with the developers so we can integrate that as well.

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

                https://xen-orchestra.com/docs/architecture.html#api

                R 1 Reply Last reply Reply Quote 0
                • R Offline
                  rtjdamen @olivierlambert
                  last edited by

                  @olivierlambert thank you.

                  i asked the dev about the info they would like to pull from the api. i added a feature request over the support portal as well.

                  "As per feedback from the OC Dev team, we would need the following additional XenOrchestra RESTful API calls:

                  1. info about affinity hosts,
                  2. info about host OS,
                  3. used space (in bytes) for virtual drives, endpoint: "rest/v0/vdis"
                  4. info about drives type (DVD, Removable disks, USB, local storage, ...) for endpoint: "/rest/v0/srs"

                  Number 3, and 4 would be interesting if you would like to see disk space info for the hypervisors, like VMware has
                  "

                  julien-fJ 1 Reply Last reply Reply Quote 0
                  • julien-fJ Offline
                    julien-f Vates 🪐 Co-Founder XO Team @rtjdamen
                    last edited by

                    Hyperthreading status is not part of the REST API because it's not part of the XAPI itself, it requires a call to a plugin on the host.

                    Which is why it's not part of the XO host object, it requires a calls to host.isHyperThreadingEnabled on the JSON-RPC API.

                    For the other questions:

                    1. VMs have a affinityHost field containing the host's UUID
                    2. See productBrand and version fields in hosts
                    3. Checkout the usage field in VDIs
                    4. See SR_type and content_type in SRs
                    R 1 Reply Last reply Reply Quote 0
                    • R Offline
                      rtjdamen @julien-f
                      last edited by

                      @julien-f i have discussed with our developer and i would like to ask you the following

                      As per their feedback, the XCP-NG API itself gives the double amount of cores per CPU in its output.

                      For a 2 CPU x 16 core configuration, the system gives 32 cores per CPU, instead of 16.

                      Please consult with Vates, if they can modify the current API/CPU core count enumeration, to show the actual physical CPU core counts, instead of logical ones in the API output.

                      julien-fJ 2 Replies Last reply Reply Quote 0
                      • julien-fJ Offline
                        julien-f Vates 🪐 Co-Founder XO Team @rtjdamen
                        last edited by

                        @rtjdamen Please give me the name of the class field and its value in the XAPI and the same in XO REST API so we can compare.

                        1 Reply Last reply Reply Quote 0
                        • julien-fJ Offline
                          julien-f Vates 🪐 Co-Founder XO Team @rtjdamen
                          last edited by

                          @rtjdamen You'll likely just need to take a look at cpus field and multiply cores and sockets.

                          R 1 Reply Last reply Reply Quote 0
                          • R Offline
                            rtjdamen @julien-f
                            last edited by

                            @julien-f Hi julien, the cpu field gives a incorrect view of the real world. because of the hypertreading enabled it gives you double the number of cpu cores there actually is. We are looking for a good way to determine REAL PHYSICAL cores. Reason for that is Microsoft is licensing datacenter licenses on a physical core basis. can u help us with the correct way to find this out?
                            in Xoa there is a field shown for hypertreading enabled. if that value is shown into the rest api we are there, but if it is not we need a different way to find out if this is enabled or not.

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

                              @julien-f the HT detection we created (via a plugin) is already detecting "threads_per_core" or something like that. IIRC, in XO, if it's >1, we can tell hyperthreading is enabled. So we might need to expose thread per core or something equivalent we did in XO directly in the REST API

                              1 Reply Last reply Reply Quote 0
                              • julien-fJ Offline
                                julien-f Vates 🪐 Co-Founder XO Team @rtjdamen
                                last edited by

                                @rtjdamen REST API now expose the SMT status: https://github.com/vatesfr/xen-orchestra/commit/7fc5d62ca95ba91666f5d5a2268a7871c484ac6a

                                0 julien-f committed to vatesfr/xen-orchestra
                                feat(xo-server/rest-api): export hosts' SMT status
                                
                                Fixes https://xcp-ng.org/forum/post/71374
                                R 1 Reply Last reply Reply Quote 0
                                • olivierlambertO Offline
                                  olivierlambert Vates 🪐 Co-Founder CEO
                                  last edited by

                                  Also, we are working to get the info directly in XAPI: https://github.com/xapi-project/xen-api/issues/5462

                                  olivierlambert created this issue in xapi-project/xen-api

                                  closed SMT discoverability: add thread_per_core info in host.cpu_info #5462

                                  1 Reply Last reply Reply Quote 1
                                  • R Offline
                                    rtjdamen @julien-f
                                    last edited by

                                    @julien-f do i need to update anything on my end to get this visible? or is this centrally managed?

                                    julien-fJ 1 Reply Last reply Reply Quote 0
                                    • julien-fJ Offline
                                      julien-f Vates 🪐 Co-Founder XO Team @rtjdamen
                                      last edited by

                                      @rtjdamen You need to rebuild your xo-server if you are using it from the sources. I you are using an official XOA, you will need to wait for the next release (last day of the month) and upgrade using the latest channel.

                                      R 1 Reply Last reply Reply Quote 0
                                      • R Offline
                                        rtjdamen @julien-f
                                        last edited by

                                        @olivierlambert is it possible to apply this changes allready to our XOA? it would help with the development.

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