Uploaded image for project: 'Qt Quality Assurance Infrastructure'
  1. Qt Quality Assurance Infrastructure
  2. QTQAINFRA-1845

NUMA architecture should be taken into an account in KVM

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • None
    • None
    • OpenNebula
    • None

    Description

      Summary

      Virtual machines have better performance if they are constrained to run on single NUMA node and currently they are not.

      Current situation (mature-bear, 12th of March 2018)

      ubuntu@mature-bear:~$ numactl --hardware
      available: 2 nodes (0-1)
      node 0 cpus: 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78
      node 0 size: 128843 MB
      node 0 free: 27940 MB
      node 1 cpus: 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79
      node 1 size: 129016 MB
      node 1 free: 30953 MB
      node distances:
      node   0   1
        0:  10  21
        1:  21  10
      • There are two NUMA nodes
      • You can extract the same information from <topoplogy> of "virsh capabilities"

      CPU affinity of virtual machines:

       

      ubuntu@mature-bear:~$ virsh vcpuinfo one-451747
      setlocale: No such file or directory
      VCPU:           0
      CPU:            74
      State:          running
      CPU time:       907.4s
      CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
      VCPU:           1
      CPU:            8
      State:          running
      CPU time:       839.2s
      CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
      • VM guest has 2 virtual CPUs which can run on any physical HW
      • Doing "virsh cpu-stats one-XXXXX" confirms that guest VMs are running on all CPUs

      Suggestion

      It should be benchmarked if we get better guest VM performance by constraining the physical CPU allocation to NUMA nodes.

       

      Links

      Information taken from here:

      https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/virtualization/ch33s08

      http://www.admin-magazine.com/Archive/2014/20/Best-practices-for-KVM-on-NUMA-servers

      Possible places how to configure NUMA for the guests:

      https://libvirt.org/formatdomain.html#elementsNUMATuning

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              tosaraja Tony Sarajärvi
              sanurmen Sami Nurmenniemi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes