Sampling Computing Threads by CPU Service and Wait State Time

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional methods for determining CPU hot spots in computer programs are inaccurate due to the failure to account for CPU wait states, leading to unnecessary examination of efficient code portions.

Innovation Solution

A method for sampling computing threads where the probability of sampling is proportional to the activity's time period, allowing for accurate recording of CPU time based on the CPU state, whether actively servicing or in a wait state, and distributing CPU time accurately across activities in the call stack.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If total CPU time is retrieved from the operating system for each sample, then the data retrieval process is simple, but the determination of hot spots becomes inaccurate due to CPU wait states not being accounted for

Engineering Contradiction:
Improveease of data retrievalVSAvoidaccuracy of hot spot determination
Core Design Contradiction:
Ease of manufactureVSMeasurement precision

Solution Approach 1:

The patent segments the total time period into two distinct components: CPU service time and CPU wait state time. By separating these time elements and tracking them independently, the system achieves accurate hot spot determination while maintaining simple data retrieval through the operating system's total time information.

Inventive Principle:
Principle #1Segmentation

2Ease of operation

If conventional sampling methods are used to obtain thread data at various times, then the sampling process is straightforward, but the CPU time recording becomes inaccurate when CPUs enter wait states

Engineering Contradiction:
Improvesimplicity of sampling processVSAvoidreliability of CPU time recording
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent introduces an intermediary mechanism that monitors CPU state transitions between service and wait states. This intermediary tracks when the CPU enters and exits wait states, allowing the system to accurately attribute time periods to either CPU service or wait state, thereby maintaining reliable CPU time recording alongside straightforward sampling operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If total CPU time is used to determine hot spots, then the analysis process is efficient, but developers examine code portions that are already efficient, wasting time

Engineering Contradiction:
Improveefficiency of analysis processVSAvoidtime wasted examining efficient code
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent replaces the conventional mechanical approach of using total CPU time with a refined measurement system that subtracts CPU wait state time from total time. This substitution provides accurate CPU service time that truly reflects code execution demands, enabling developers to efficiently identify actual hot spots without wasting time on already-efficient code portions.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS10108524B2Recording CPU time for sample of computing thread based on CPU use state of activity associated with the sample
Publication Date: 2018.10.23 SAP SE
  • US10108524B2 patent drawing
  • US10108524B2 patent drawing
  • US10108524B2 patent drawing

AI summary

Computing threads can be sampled such that the samples hit each activity with a probability proportional to a time period of that activity. Therefore, the sampling can advantageously account for all activities, including activities that are smaller than the applicable sampling interval.