Virtual Machine CPU Topology Detection via Shared Resource Metrics

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems struggle to accurately determine the CPU topology, especially in virtualized environments where the physical CPU core and thread topology is obscured, leading to inefficient workload distribution and potential performance degradation.

Innovation Solution

A method and system where a virtual machine (VM) executes a machine-readable process on a host device with a multi-core processing system, determining benchmark metrics, and iteratively executing the process across different CPU pairs to identify hyperthreading arrangements by comparing execution metrics to benchmark metrics.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If virtualization is used to abstract hardware resources, then system flexibility and resource utilization improve, but CPU topology information becomes obscured and difficult to detect

Engineering Contradiction:
Improvesystem flexibilityVSAvoidCPU topology information
Core Design Contradiction:
Adaptability or versatilityVSLoss of information

Solution Approach 1:

The system executes benchmark processes and measures execution metrics, then uses this feedback to iteratively refine topology detection. By comparing execution times of processes run on different CPU pairs with benchmark metrics, the system infers hyperthreading relationships and builds an accurate topology map despite virtualization obscuration.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The virtual machine performs self-detection of CPU topology by autonomously executing benchmark processes and analyzing execution metrics. The system uses its own computational resources to gather topology information without requiring external assistance or exposed hardware interfaces, enabling self-service detection within the virtualized environment.

Inventive Principle:
Principle #25Self-service

2Productivity

If hyperthreading is enabled to increase processing capability, then CPU performance improves, but shared resource contention increases and topology detection becomes more complex

Engineering Contradiction:
ImproveCPU processing capabilityVSAvoidtopology detection complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system converts the harmful effect of shared resource contention into a beneficial detection mechanism. By deliberately inducing resource contention through concurrent process execution on CPU pairs, the system measures execution metric degradation that reveals hyperthreading relationships. The contention that normally degrades performance is instead used as a signal to identify sibling threads.

Inventive Principle:
Principle #22Blessing in disguise (Convert harm into benefit)

3Measurement precision

If benchmark processes are executed on all CPU pairs to detect hyperthreading, then topology detection accuracy improves, but execution time and computational overhead increase

Engineering Contradiction:
Improvetopology detection accuracyVSAvoiddetection execution time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs more detection iterations than strictly necessary by comparing each CPU pair against benchmark metrics multiple times and evaluating execution metrics under different workload conditions. This excessive action ensures high detection accuracy by ruling out false positives, even though it increases the total detection time beyond the theoretical minimum.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS20250077260A1Method and system for detecting CPU SMT topology by exploiting shared resource utilization
Publication Date: 2025.03.06 CITRIX SYSTEMS INC
  • US20250077260A1 patent drawing
  • US20250077260A1 patent drawing
  • US20250077260A1 patent drawing

AI summary

Systems and methods for detecting CPU topology may include executing, by a virtual machine on a host device having a multi-core processing system, a machine-readable process on a core of the host device. The systems and methods may include determining, by the virtual machine, a benchmark metric according to execution of the machine-readable process. The systems and methods may include iteratively executing, by the virtual machine, for different combinations of sockets of the virtual machine, the machine-readable process, to determine execution metrics for each combination of cores in which the machine-readable process is executed. The systems and methods may include determining, by the virtual machine, a hyperthreading arrangement of the host device according to a comparison of the execution metrics to the benchmark metric.