NUMA Node Assignment for Virtual Networking Threads

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Virtual machines (VMs) that span multiple non-uniform memory access (NUMA) nodes face inefficiencies due to increased latency and cache thrashing from cross-node data sharing, as existing scheduling methods do not effectively minimize cross-node memory access.

Innovation Solution

Scheduling all networking threads associated with a data compute node (DCN) on the same particular NUMA node, with the virtualization software assigning transmit and receive threads to the same NUMA node as the virtual networking device (VNIC), and providing information to the DCN to schedule its own threads accordingly, thereby minimizing cross-node memory access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If a VM spans multiple NUMA nodes to accommodate large memory requirements, then the VM can access more memory capacity, but memory access latency increases and cache thrashing occurs due to cross-node data sharing

Engineering Contradiction:
Improvememory capacityVSAvoidmemory access latency
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent segments the VM's memory access patterns by identifying which NUMA node each memory page belongs to, and segments the networking thread execution by pinning specific threads to specific NUMA nodes based on their memory access patterns. This segmentation allows the VM to utilize multiple NUMA nodes for capacity while minimizing cross-node access for each thread.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by assigning different NUMA node affiliations to different networking threads based on their specific memory access characteristics. Each thread is optimized for its local NUMA node, ensuring that frequently accessed memory resides in the local node's memory hierarchy, thereby reducing latency for that thread's operations.

Inventive Principle:
Principle #3Local quality

2Productivity

If networking threads are scheduled on different NUMA nodes for load balancing, then processor utilization improves, but cross-node memory access increases causing latency and cache inefficiency

Engineering Contradiction:
Improveprocessor utilizationVSAvoidmemory access latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent introduces dynamic NUMA affinity assignment for networking threads. The system monitors memory access patterns and dynamically adjusts which NUMA node each networking thread is pinned to, rather than using a static assignment. This allows the system to optimize for both processor utilization and memory access efficiency based on changing workload conditions.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent implements feedback mechanisms that monitor the performance of networking threads, including memory access patterns and latency metrics. Based on this feedback, the system adjusts the NUMA node assignment of networking threads to optimize performance, creating a closed-loop control system that adapts to changing conditions.

Inventive Principle:
Principle #23Feedback

3Loss of time

If all networking threads are pinned to a single NUMA node, then memory access latency is reduced, but thread scheduling flexibility and load balancing capability are limited

Engineering Contradiction:
Improvememory access latencyVSAvoidthread scheduling flexibility
Core Design Contradiction:
Loss of timeVSAdaptability or versatility

Solution Approach 1:

The patent makes the NUMA node assignment mechanism universal by applying the same affinity pinning approach to multiple types of threads (networking threads, I/O threads, application threads) and multiple NUMA nodes. The system can selectively apply affinity pinning to different thread groups based on their specific requirements, providing a flexible framework that works across diverse workload types.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent performs preliminary analysis of memory access patterns during VM initialization and thread creation, establishing NUMA node assignments before the threads begin execution. This preliminary action allows the system to pre-optimize thread-to-NUMA node mappings based on anticipated workload patterns, reducing the need for runtime migrations while maintaining scheduling flexibility.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11928502B2Optimized networking thread assignment
Publication Date: 2024.03.12 VMWARE INC
  • US11928502B2 patent drawing
  • US11928502B2 patent drawing
  • US11928502B2 patent drawing

AI summary

Some embodiments provide a method for scheduling networking threads associated with a data compute node (DCN) executing at a host computer. When a virtual networking device is instantiated for the DCN, the method assigns the virtual networking device to a particular non-uniform memory access (NUMA) node of multiple NUMA nodes associated with the DCN. Based on the assignment of the virtual networking device to the particular NUMA node, the method assigns networking threads associated with the DCN to the same particular NUMA node and provides information to the DCN regarding the particular NUMA node in order for the DCN to assign a thread associated with an application executing on the DCN to the same particular NUMA node.