SmartNIC Latency Measurement via Packet Snooping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing techniques for measuring latency in cloud data centers, such as Pingmesh, rely on host-generated ping requests and responses, which consume CPU resources and introduce inaccuracies due to kernel network stack latencies, DMA transfers, and other non-deterministic timing factors.

Innovation Solution

A processing unit on a SmartNIC executes an agent that determines latency by snooping on existing data traffic, generating timestamps for forward and reverse packets, and computing round trip times without relying on host CPU resources, thereby improving accuracy and reliability.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If host-generated ping requests and responses are used for latency measurement, then latency can be determined, but CPU resources are consumed and inaccuracies are introduced due to kernel network stack latencies and DMA transfers

Engineering Contradiction:
Improvelatency measurement accuracyVSAvoidtiming determinism
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The patent extracts the latency measurement function from the host CPU and kernel network stack, relocating it to the NIC's processing unit. This separation removes the measurement process from the sources of non-deterministic timing (kernel stack processing, DMA transfers, context switching), thereby improving both measurement accuracy and timing reliability.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The NIC processing unit acts as an intermediary between the network interface and the host CPU. It captures packets at the hardware level, generates timestamps independently of the host OS, and processes latency measurements without involving the kernel network stack, thus eliminating the timing uncertainties introduced by the intermediary host system.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If host CPU resources are used for generating ping requests and processing responses, then latency measurement is achieved, but network resources are consumed

Engineering Contradiction:
Improvelatency measurement capabilityVSAvoidCPU resource consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The NIC processing unit performs latency measurement autonomously without requiring host CPU intervention. It independently captures packets, generates timestamps, calculates round-trip times, and determines latency, thereby eliminating the need for host CPU resources while maintaining measurement capability.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The latency measurement functionality is extracted from the host CPU's responsibility and assigned to the NIC's processing unit. This redistribution of functionality allows the measurement to occur at the network interface level, freeing host CPU resources for other tasks while maintaining precise latency measurement capability.

Inventive Principle:
Principle #2Taking out (Extraction)

3Measurement precision

If ping requests are sent through the kernel network stack, then latency measurement is performed, but non-deterministic timing factors are introduced

Engineering Contradiction:
Improveround trip time measurementVSAvoidtiming consistency
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The timestamp generation and latency calculation processes are extracted from the kernel network stack and implemented at the NIC hardware level. This extraction eliminates the variable delays introduced by kernel processing, DMA operations, and context switching, resulting in consistent and reliable timing measurements.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The software-based latency measurement in the kernel network stack is replaced with a hardware-based implementation in the NIC processing unit. This substitution transitions from a software mechanism subject to OS scheduling and processing variability to a hardware mechanism that provides deterministic and consistent timing.

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

Data Source

PatentUS20230006904A1Using network interface cards having processing units to determine latency
Publication Date: 2023.01.05 JUNIPER NETWORKS INC
  • US20230006904A1 patent drawing
  • US20230006904A1 patent drawing
  • US20230006904A1 patent drawing

AI summary

A system is configured to compute a latency between a first computing device and a second computing device. The system includes a network interface card (NIC) of a first computing device. The NIC includes a set of interfaces configured to receive one or more packets and send one or more packets. The processing unit is configured to identify information indicative of a forward packet, compute, based on a first time corresponding to the forward packet and a second time corresponding to a reverse packet associated with the forward packet, a latency between the first computing device and a second computing device, wherein the second computing device includes a destination of the forward packet and a source of the reverse packet, and output information indicative of the latency between the first computing device and the second computing device.