# US 11,310,163 B1 · Network flow sampling fairness

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,310,163 B1
- Document ID: US11310163B1
- Status: Granted
- Kind: B1
- Application number: 17/172,166
- Filed: 2021-02-10
- Granted: 2022-04-19
- Earliest claimed: 2021-02-10
- Assignees: Mellanox Technologies, Ltd.
- Applicants: Mellanox Technologies, Ltd.
- Inventors: Alan Lo; Matty Kadosh; Marian Pritsak; Yonatan Piasetsky
- Web page: https://patentgrep.com/patent/US11310163B1

## CPC

- H04L 47/2483: involving identification of individual flows
- H04L 41/0894: Policy-based network configuration management
- H04L 43/024: by adaptive sampling
- H04L 43/026: using flow identification
- H04L 43/0811: by checking connectivity
- H04L 43/16: Threshold monitoring
- H04L 47/20: Traffic policing
- H04L 47/2441: relying on flow classification, e.g. using integrated services [IntServ]
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

In one embodiment, a network flow sampling system includes data communication apparatus, which includes packet processing circuitry configured to process data packets of multiple network flows, and an adaptive policer configured to sample respective ones of the data packets of respective ones of the network flows yielding sampled data, while applying sampling fairness among the respective network flows, wherein at least one of the data packets from each of the respective network flows is sampled.

## Claims

### Claim 1

A network flow sampling system comprising data communication apparatus, which includes:
packet processing circuitry configured to process data packets of multiple network flows; and
an adaptive policer configured to;
compute a respective quantity of flow-specific sampling credits to be assigned to each network flow of respective ones of the network flows responsively to a quantity of the respective network flows currently being processed by the packet processing circuitry;
assign the flow-specific sampling credits to each of the respective network flows;
sample respective ones of the data packets of the respective network flows responsively to availability of respective ones of the flow-specific sampling credits of the respective network flows yielding sampled data, while applying sampling fairness among the respective network flows, wherein at least one of the data packets from each of the respective network flows is sampled; and
remove the respective ones of the flow-specific sampling credits from availability responsively to sampling the respective ones of the data packets of the respective network flows.

### Claim 2 (depends on 1)

The system according to claim 1, wherein the adaptive policer is configured to sample respective ones of the data packets of each of the network flows being processed by the packet processing circuitry while applying sampling fairness among the network flows.

### Claim 3 (depends on 1)

The system according to claim 1, wherein the adaptive policer is configured to assign additional flow-specific sampling credits to each of the respective network flows intermittently.

### Claim 4 (depends on 3)

The system according to claim 3, wherein the adaptive policer is configured to assign additional flow-specific sampling credits to each of the respective network flows responsively to a minimum flow-specific sampling credit threshold.

### Claim 5 (depends on 3)

The system according to claim 3, wherein the adaptive policer is configured to compute a respective quantity of the additional flow-specific sampling credits to be assigned to each of the respective network flows responsively to a quantity of the respective network flows currently being processed by the packet processing circuitry.

### Claim 6 (depends on 5)

The system according to claim 5, wherein the adaptive policer is configured to compute the respective quantity of the additional flow-specific sampling credits to be assigned to each of the respective network flows responsively to a function which has an output which is inversely proportional to the quantity of the respective network flows currently being processed by the packet processing circuitry.

### Claim 7 (depends on 6)

The system according to claim 6, wherein the adaptive policer is configured to compute the respective quantity of the additional flow-specific sampling credits to be assigned to each of the respective network flows responsively to a reserved sampling capacity, which avoids oversubscribing of the adaptive policer.

### Claim 8 (depends on 7)

The system according to claim 7, wherein the adaptive policer is configured to compute the reserved sampling capacity of the adaptive policer responsively to the quantity of the respective network flows currently being processed by the packet processing circuitry.

### Claim 9 (depends on 1)

The system according to claim 1, wherein the adaptive policer is configured to forward the sampled data to a data analyzer.

### Claim 10 (depends on 9)

The system according to claim 9, further comprising the data analyzer, which is configured to perform any one or more of the following responsively to the sampled data:
provide information about network performance;
identify network bottlenecks;
identify lost packets;
identify lost flows;
perform general debugging;
perform end-to-end debugging; or
provide information for the purposes of network optimization and future planning.

### Claim 11

A network flow sampling method, comprising:
processing data packets of multiple network flows;
computing a respective quantity of flow-specific sampling credits to be assigned to each network flow of respective ones of the network flows responsively to a quantity of the respective network flows currently being processed by packet processing circuitry;
assigning the flow-specific sampling credits to each of the respective network flows;
sampling respective ones of the data packets of the respective network flows responsively to availability of respective ones of the flow-specific sampling credits of the respective network flows yielding sampled data, while applying sampling fairness among the respective network flows, wherein at least one of the data packets from each of the respective network flows is sampled; and
removing the respective ones of the flow-specific sampling credits from availability responsively to sampling the respective ones of the data packets of the respective network flows.

### Claim 12 (depends on 11)

The method according to claim 11, further comprising assigning additional flow-specific sampling credits to each of the respective network flows intermittently.

### Claim 13 (depends on 12)

The method according to claim 12, wherein the assigning the additional flow-specific sampling credits to each of the respective network flows is performed responsively to a minimum flow-specific sampling credit threshold.

### Claim 14 (depends on 12)

The method according to claim 12, further comprising computing a respective quantity of the additional flow-specific sampling credits to be assigned to each of the respective network flows responsively to a quantity of the respective network flows currently being processed by the packet processing circuitry.

### Claim 15 (depends on 14)

The method according to claim 14, wherein the computing the respective quantity of the additional flow-specific sampling credits includes computing the respective quantity of the additional flow-specific sampling credits to be assigned to each of the respective network flows responsively to a function which has an output which is inversely proportional to the quantity of the respective network flows currently being processed by the packet processing circuitry.

### Claim 16 (depends on 15)

The method according to claim 15, wherein the computing the respective quantity of the additional flow-specific sampling credits includes computing the respective quantity of the additional flow-specific sampling credits to be assigned to each of the respective network flows responsively to a reserved sampling capacity, which avoids oversubscribing.

### Claim 17 (depends on 16)

The method according to claim 16, wherein the computing the respective quantity of the additional flow-specific sampling credits includes computing the reserved sampling capacity responsively to the quantity of the respective network flows currently being processed by the packet processing circuitry.

### Claim 18 (depends on 11)

The method according to claim 11, further comprising forwarding the sampled data to a data analyzer.

### Claim 19 (depends on 18)

The method according to claim 18, further comprising performing any one or more of the following responsively to the sampled data:
providing information about network performance;
identifying network bottlenecks;
identifying lost packets;
identifying lost flows;
performing general debugging;
performing end-to-end debugging; or
providing information for the purposes of network optimization and future planning.

### Claim 20

A software product, comprising a non-transient computer-readable medium in which program instructions are stored, which instructions, when read by a central processing unit (CPU), cause the CPU to:
compute a respective quantity of flow-specific sampling credits to be assigned to each network flow of respective network flows responsively to a quantity of the respective network flows currently being processed by packet processing circuitry;
assign the flow-specific sampling credits to each of the respective network flows;
sample respective data packets of the respective network flows responsively to availability of respective ones of the flow-specific sampling credits of the respective network flows yielding sampled data, while applying sampling fairness among the respective network flows, wherein at least one of the data packets from each of the respective network flows is sampled; and
remove the respective ones of the flow-specific sampling credits from availability responsively to sampling the respective ones of the data packets of the respective network flows.
