Nova libvirt driver does not bind guest memory to NUMA nodes

Bug #1385308 reported by Daniel Berrange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Daniel Berrange

Bug Description

After testing the libvirt NUMA support I noticed that the guest XML is missing rules to explicitly bind guest NUMA nodes to host NUMA nodes.

The vCPUs are still all bound to host NUMA nodes, so the kernel will prefer allocation from those nodes, but it is a much better to be explicit about the binding to prevent the kernel from falling back to allocate memory from a non-local node, as that would confuse Nova's tracking of NUMA allocation.

Tags: libvirt
Changed in nova:
assignee: nobody → Daniel Berrange (berrange)
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/130820

Joe Gordon (jogo)
Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/131131

Matt Riedemann (mriedem)
tags: added: libvirt
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.openstack.org/130820
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=943f02f1a62f7eb131f62729d83d97ad431ee89f
Submitter: Jenkins
Branch: master

commit 943f02f1a62f7eb131f62729d83d97ad431ee89f
Author: Daniel P. Berrange <email address hidden>
Date: Fri Oct 24 16:12:58 2014 +0100

    libvirt: add classes for NUMA memory binding configuration

    To allow specification of strict memory binding for NUMA
    nodes, add support for libvirt's <numatune> XML element.

    Related-bug: #1385308
    Change-Id: I08f01a50b92ca648b803f94ef028bc2f10e6f6a8

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/131131
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d9276355d9468d62a4c3150bf0401ee0f3ccd031
Submitter: Jenkins
Branch: master

commit d9276355d9468d62a4c3150bf0401ee0f3ccd031
Author: Daniel P. Berrange <email address hidden>
Date: Mon Oct 27 11:30:24 2014 +0000

    libvirt: set NUMA memory allocation policy for instances

    When NUMA placement is in effect, Nova configures KVM guest vCPUs
    to be placed on certain host NUMA nodes. It also provides guest
    NUMA topology of vCPUs and RAM. The kernel will normally satisfy
    memory allocations from the host NUMA node that the guest vCPU
    is running on, but this is only a preference. Nova needs to set
    a strict policy to guarantee guest RAM is always allocated from
    the desired host NUMA node. This change ensures that by setting
    the XML

      <numatune>
        <memory mode='strict' nodeset='0-1'/>
        <memnode cellid='0' mode='strict' nodeset='0'/>
        <memnode cellid='1' mode='strict' nodeset='1'/>
      </numatune>

    Closes-bug: #1385308
    Change-Id: I02c301ae648235dc48527559a5d3c3d45de859ac

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.