← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1515536] [NEW] create vm with share cpu_policy breaks exist vm with dedicated cpu_policy when use cpu_allocation

 

Public bug reported:

1. version
kilo 2015.1.0


3. Reproduce steps:

3.1  environment described

I have one compute node  with 32 cpus,

It’s numa_topology is as follows:
2 sockets * 8 cores * 2 thread = 32 

set cpu_allocation_ratio=2 in nova.conf

3.2 create a flavor  with 32 cpus:

[root@nail-SBCJ-5-3-13 nova(keystone_admin)]# nova flavor-show 30cpu
+----------------------------+-------+
| Property                   | Value |
+----------------------------+-------+
| OS-FLV-DISABLED:disabled   | False |
| OS-FLV-EXT-DATA:ephemeral  | 0     |
| disk                       | 1     |
| extra_specs                | {}    |
| id                         | 7     |
| name                       | 32cpu |
| os-flavor-access:is_public | True  |
| ram                        | 512   |
| rxtx_factor                | 1.0   |
| swap                       |       |
| vcpus                      | 32    |
+----------------------------+-------+

3.2 Set the numa properties as follows,then,create vm use the flavor
nova flavor-key 32cpu  set hw:numa_nodes=2 hw:numa_cpus.0="0-15" hw:numa_mem.0=256 hw:numa_cpus.1="16-31" hw:numa_mem.1=256 hw:cpu_policy=dedicated

3.3 create another flavor with 20 cpus ,Set the numa properties as follows,then,create vm use the flavor
nova flavor-key 20cpu  set hw:numa_nodes=2 hw:numa_cpus.0="0-9" hw:numa_mem.0=256 hw:numa_cpus.1="10-19" hw:numa_mem.1=256 hw:cpu_policy=share
Expected result: create failed
Actual result : create success
 
4 
4.1
if cpu_policy=dedicated  mean the vm has exclusive rights to the specified CPU,
Then the above phenomenon is not reasonable. 
because Even with cpu_allocation, the vm create with share cpu policy is sure to use the compute node's CPU.
so, the vm should create failed when exist vm with dedicated take up all cpu on compute node

4.2
if cpu_policy=dedicated  mean the vm Can only use he specified CPU。
then, The following phenomenon is not reasonable:
In the same environment
create flavor with 20 cpus ,Set the numa properties as follows,then,create 2 vm use the flavor
nova flavor-key 20cpu hw:numa_nodes=2 hw:numa_cpus.0="0-9" hw:numa_mem.0=256 hw:numa_cpus.1="10-19" hw:numa_mem.1=256 hw:cpu_policy=dedicated
Result : one create success, one create failed

In a word, no matter how to explain ,the 4.1 and 4.2 must have one is
not reasonable

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: numa

** Summary changed:

- create vm with share cpu_policy  breaks exist vm with dedicated cpu_policy when use cpu ratio
+ create vm with share cpu_policy  breaks exist vm with dedicated cpu_policy when use cpu_allocation

-- 
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/1515536

Title:
  create vm with share cpu_policy  breaks exist vm with dedicated
  cpu_policy when use cpu_allocation

Status in OpenStack Compute (nova):
  New

Bug description:
  1. version
  kilo 2015.1.0

  
  3. Reproduce steps:

  3.1  environment described

  I have one compute node  with 32 cpus,

  It’s numa_topology is as follows:
  2 sockets * 8 cores * 2 thread = 32 

  set cpu_allocation_ratio=2 in nova.conf

  3.2 create a flavor  with 32 cpus:

  [root@nail-SBCJ-5-3-13 nova(keystone_admin)]# nova flavor-show 30cpu
  +----------------------------+-------+
  | Property                   | Value |
  +----------------------------+-------+
  | OS-FLV-DISABLED:disabled   | False |
  | OS-FLV-EXT-DATA:ephemeral  | 0     |
  | disk                       | 1     |
  | extra_specs                | {}    |
  | id                         | 7     |
  | name                       | 32cpu |
  | os-flavor-access:is_public | True  |
  | ram                        | 512   |
  | rxtx_factor                | 1.0   |
  | swap                       |       |
  | vcpus                      | 32    |
  +----------------------------+-------+

  3.2 Set the numa properties as follows,then,create vm use the flavor
  nova flavor-key 32cpu  set hw:numa_nodes=2 hw:numa_cpus.0="0-15" hw:numa_mem.0=256 hw:numa_cpus.1="16-31" hw:numa_mem.1=256 hw:cpu_policy=dedicated

  3.3 create another flavor with 20 cpus ,Set the numa properties as follows,then,create vm use the flavor
  nova flavor-key 20cpu  set hw:numa_nodes=2 hw:numa_cpus.0="0-9" hw:numa_mem.0=256 hw:numa_cpus.1="10-19" hw:numa_mem.1=256 hw:cpu_policy=share
  Expected result: create failed
  Actual result : create success
   
  4 
  4.1
  if cpu_policy=dedicated  mean the vm has exclusive rights to the specified CPU,
  Then the above phenomenon is not reasonable. 
  because Even with cpu_allocation, the vm create with share cpu policy is sure to use the compute node's CPU.
  so, the vm should create failed when exist vm with dedicated take up all cpu on compute node

  4.2
  if cpu_policy=dedicated  mean the vm Can only use he specified CPU。
  then, The following phenomenon is not reasonable:
  In the same environment
  create flavor with 20 cpus ,Set the numa properties as follows,then,create 2 vm use the flavor
  nova flavor-key 20cpu hw:numa_nodes=2 hw:numa_cpus.0="0-9" hw:numa_mem.0=256 hw:numa_cpus.1="10-19" hw:numa_mem.1=256 hw:cpu_policy=dedicated
  Result : one create success, one create failed

  In a word, no matter how to explain ,the 4.1 and 4.2 must have one is
  not reasonable

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


Follow ups