← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1471187] [NEW] CPU topology does not honour cpu_max_threads when NUMA topology is used

 

Public bug reported:

Consider a flavour with 4 vcpus, and image property   hw:cpu_threads==2.
Now the NUMA topology may prefer a thread count of 4, but best of the
thread preference set, the guest will end up with 2 sockets, 1 core and
2 threads.

Now consider a flavour with 4 vcpus, and image property
hw:cpu_max_threads==2. Now the NUMA topology may prefer a thread count
of 4, but best of the thread limit is set, so the guest should again end
up with 2 sockets, 1 core and 2 threads.

The current code in nova.virt.hardware._get_possible_cpu_topologies()
is not honouring the cpu_max_threads setting in this scenario though, so
the guest ends up with 1 socket, 1 core and 4 threads. This violates the
cpu_max_threads setting.


Meanwhile if the vCPU count is 6 and the NUMA topology prefers a thread count of 4, then the code is actually incapable of coming up with a valid topology because it only considers topologies with an exact thread count of 4 and 4 does not divide into 6. 

nova.exception.ImageVCPULimitsRangeImpossible: Requested vCPU limits
6:6:6 are impossible to satisfy for vcpus count 6

which is clearly a bogus error as you can easily satisfy that with
6:1:1, 1:6:1, 1:1:6, 2:1:3, 2:3:1, 3:2:1, 3:1:2, 1:2:3, 1:3:2, so it
should have picked 2:1:3, as that has thread count closest matching the
NUMA topology and the maximum socket count.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1471187

Title:
  CPU topology does not honour cpu_max_threads when NUMA topology is
  used

Status in OpenStack Compute (Nova):
  New

Bug description:
  Consider a flavour with 4 vcpus, and image property
  hw:cpu_threads==2. Now the NUMA topology may prefer a thread count of
  4, but best of the thread preference set, the guest will end up with 2
  sockets, 1 core and 2 threads.

  Now consider a flavour with 4 vcpus, and image property
  hw:cpu_max_threads==2. Now the NUMA topology may prefer a thread count
  of 4, but best of the thread limit is set, so the guest should again
  end up with 2 sockets, 1 core and 2 threads.

  The current code in nova.virt.hardware._get_possible_cpu_topologies()
  is not honouring the cpu_max_threads setting in this scenario though,
  so the guest ends up with 1 socket, 1 core and 4 threads. This
  violates the cpu_max_threads setting.

  
  Meanwhile if the vCPU count is 6 and the NUMA topology prefers a thread count of 4, then the code is actually incapable of coming up with a valid topology because it only considers topologies with an exact thread count of 4 and 4 does not divide into 6. 

  nova.exception.ImageVCPULimitsRangeImpossible: Requested vCPU limits
  6:6:6 are impossible to satisfy for vcpus count 6

  which is clearly a bogus error as you can easily satisfy that with
  6:1:1, 1:6:1, 1:1:6, 2:1:3, 2:3:1, 3:2:1, 3:1:2, 1:2:3, 1:3:2, so it
  should have picked 2:1:3, as that has thread count closest matching
  the NUMA topology and the maximum socket count.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1471187/+subscriptions


Follow ups

References