# US 2022/0283924 A1 · Methods and systems for intelligent sampling of application traces

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

- Number: US 2022/0283924 A1
- Document ID: US20220283924A1
- Status: Published application
- Kind: A1
- Application number: 17/367,490
- Filed: 2021-07-05
- Published: 2022-09-08
- Earliest claimed: 2021-03-02
- Assignees: VMware, Inc.
- Applicants: VMware, Inc.
- Inventors: Arnak Poghosyan; Ashot Nshan Harutyunyan; Naira Movses Grigoryan; Clement Pang; George Oganesyan; Karen Avagyan
- Web page: https://patentgrep.com/patent/US20220283924A1

## CPC

- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- G06F 11/0709: {in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems}
- G06F 11/076: {by exceeding a count or rate limit, e.g. word- or bit count limit}
- G06F 11/0781: {Error filtering or prioritizing based on a policy defined by the user or on a policy defined by a hardware/software module, e.g. according to a severity level}
- G06F 11/0787: {Storage of error reports, e.g. persistent data storage, storage using memory protection}
- G06F 11/079: {Root cause analysis, i.e. error or fault diagnosis (in a hardware test environment G06F11/22; in a software test environment G06F11/36)}
- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 2201/815: Virtual
- G06F 2201/865: Monitoring of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Computer-implemented methods and systems described herein perform intelligent sampling of application traces generated by an application. Computer-implemented methods and systems determine different sampling rates based on frequency of occurrence of trace types and/or frequency of occurrence of durations of the traces. Each sampling rate corresponds to a different trace type and/or different duration. The sampling rates for low frequency trace types and durations are larger than the sampling rates for high frequency trace types and durations. The relatively larger sampling rates for low frequency trace types and low frequency durations ensures that low frequency trace types and low frequency durations are sampled in sufficient numbers and are not passed over during sampling of the application traces. The set of sampled traces are stored in a data storage device.

## Claims

### Claim 1

A method stored in one or more data storage devices and executed using one or more processors of a computer system for sampling traces of an application executed in a distributed computing system, the method comprising:
determining different sampling rates for the traces based on frequency of occurrence of trace types and/or durations of the traces, wherein the different sampling rates are inversely proportional to the frequency of occurrence of the trace types and/or durations;
sampling the traces using the different sampling rates to obtain sampled traces such that less frequently occurring trace types and/or durations are sampled at lower sampling rates than more frequently occurring trace types and/or durations; and storing the sampled traces in a data storage device.

### Claim 2 (depends on 1)

The method of claim 1 wherein determining the different sampling rates comprises:
sorting the traces according to trace type to obtain one or more groups of traces, each group of traces having a different associated trace type;
receiving a sampling level via a graphical user interface;
determining a trace-type sampling parameter and a duration-sampling parameter based on the user-selected sampling level; and
for each group of traces,
determining a frequency of occurrence of a trace type associated with the group of traces,
constructing a histogram of the durations, each bin of the histogram corresponding to a time interval and containing traces with durations in the time interval,
determining a frequency of occurrence of traces in each bin of the histogram, and
determining a hybrid sampling rate for each bin of the histogram based on the frequency of occurrence of traces in each bin, the frequency of occurrence of the trace type, the trace-type sampling parameter, and the duration-sampling parameter.

### Claim 3 (depends on 1)

The method of claim 1 wherein determining the different sampling rates comprises:
sorting the traces according to trace type to obtain one or more groups of traces, each group of traces having a different associated trace type;
receiving a sampling level via a graphical user interface;
determining a trace-type sampling parameter based on the user-selected sampling level; and
for each group of traces,
determining a frequency of occurrence of a trace type associated with the group of traces, and
determining a trace-type sampling rate based on the frequency of occurrence of the trace type and the trace-type sampling parameter.

### Claim 4 (depends on 1)

The method of claim 1 wherein determining the different sampling rates comprises:
receiving a sampling level via a graphical user interface;
determining a duration-sampling parameter based on the user-selected sampling level;
constructing a histogram of traces based on the durations, each bin of the histogram corresponding to a time interval and containing traces with durations in the time interval;
determining a frequency of occurrence of traces in each bin of the histogram; and
for each bin of the histogram, determining a duration-sampling rate based on the frequency of occurrence of traces in the bin and the duration-sampling parameter.

### Claim 5 (depends on 1)

The method of claim 1 wherein determining the different sampling rates comprises:
computing a modified Gini index based on frequency of occurrences based on the at least one of trace types of the traces and durations of the traces;
computing a compression rate based on the modified Gini index;
computing a user-selected compression rate based on the sampling level;
computing a metric based the compression rate and the user-selected compression rate;
computing an adjusted sampling parameter based on the metric when the metric is less than an optimization threshold; and
adjusting the sampling rates based on the adjusted sampling parameter.

### Claim 6 (depends on 1)

The method of claim 1 wherein determining the different sampling rates comprises:
computing modified Gini indices over a range of sampling parameter values, each modified Gini index corresponding to a different sampling parameter value;
identifying a modified Gini index of the modified Gini indices that corresponds to the sampling level;
using the modified Gini indices to determine a sampling parameter that corresponds to the modified Gini index; and
computing the sampling rates based on the sampling parameter.

### Claim 7 (depends on 1)

The method of claim 1 wherein sampling the traces using the different sampling rates comprises:
sorting traces into groups of traces, wherein each group of traces includes traces with the same trace type; and
sampling each group of traces with one of the sampling rates, wherein for each group of traces the sampling rate is inversely proportional to a frequency of occurrence of the trace type in the trace.

### Claim 8 (depends on 1)

The method of claim 1 wherein sampling the traces using the different sampling rate comprises:
sorting traces into bins of a histogram of the durations, each bin of the histogram corresponding to a time interval that contains traces with durations in the time interval; and
sampling traces in each bin with one of the sampling rates, wherein for each bin of the histogram the sampling rate is inversely proportional to a frequency of occurrence of the traces in the bin.

### Claim 9

A computer system for sampling application traces of an application executed in a distributed computer system, the system comprising:
one or more processors;
one or more data storage devices; and
machine-readable instructions stored in the one or more data storage devices that when executed using the one or more processors controls the system to perform operations comprising:
determining different sampling rates for the traces based on frequency of occurrence of trace types and/or durations of the traces;
sampling the traces using the different sampling rates to obtain sampled traces, wherein less frequently occurring trace types and/or durations arc sampled with larger sampling rates than sampling rates used to sample more frequently occurring trace types and/or durations; and
storing the sampled traces in a data storage device.

### Claim 10 (depends on 9)

The computer system of claim 9 wherein determining the different sampling rates comprises:
sorting the traces according to trace type to obtain one or more groups of traces, each group of traces having a different associated trace type;
receiving a sampling level via a graphical user interface;
determining a trace-type sampling parameter and a duration-sampling parameter based on the user-selected sampling level; and
for each group of traces,
determining a frequency of occurrence of a trace type associated with the group of traces,
constructing a histogram of the durations, each bin of the histogram corresponding to a time interval and containing traces with durations in the time interval,
determining a frequency of occurrence of traces in each bin of the histogram, and
determining a hybrid sampling rate for each bin of the histogram based on the frequency of occurrence of traces in each bin, the frequency of occurrence of the trace type, the trace-type sampling parameter, and the duration-sampling parameter.

### Claim 11 (depends on 9)

The computer system of claim 9 wherein determining the different sampling rates comprises:
sorting the traces according to trace type to obtain one or more groups of traces, each group of traces having a different associated trace type;
receiving a sampling level via a graphical user interface;
determining a trace-type sampling parameter based on the user-selected sampling level; and
for each group of traces,
determining a frequency of occurrence of a trace type associated with the group of traces, and
determining a trace-type sampling rate based on the frequency of occurrence of the trace type and the trace-type sampling parameter.

### Claim 12 (depends on 9)

The computer system of claim 9 wherein determining the different sampling rates comprises:
receiving a sampling level via a graphical user interface;
determining a duration-sampling parameter based on the user-selected sampling level;
constructing a histogram of traces based on the durations, each bin of the histogram corresponding to a time interval and containing traces with durations in the time interval;
determining a frequency of occurrence of traces in each bin of the histogram; and
for each bin of the histogram, determining a duration-sampling rate based on the frequency of occurrence of traces in the bin and the duration-sampling parameter.

### Claim 13 (depends on 9)

The computer system of claim 9 wherein determining the different sampling rates comprises:
computing a modified Gini index based on frequency of occurrences based on the at least one of trace types of the traces and durations of the traces;
computing a compression rate based on the modified Gini index;
computing a user-selected compression rate based on the sampling level;
computing a metric based the compression rate and the user-selected compression rate;
computing an adjusted sampling parameter based on the metric when the metric is less than an optimization threshold; and
adjusting the sampling rates based on the adjusted sampling parameter.

### Claim 14 (depends on 9)

The computer system of claim 9 wherein determining the different sampling rates comprises:
computing modified Gini indices over a range of sampling parameter values, each modified Gini index corresponding to a different sampling parameter value;
identifying a modified Gini index of the modified Gini indices that corresponds to the sampling level;
using the modified Gini indices to determine a sampling parameter that corresponds to the modified Gini index; and
computing the sampling rates based on the sampling parameter.

### Claim 15 (depends on 9)

The computer system of claim 9 wherein sampling the traces using the different sampling rates comprises:
sorting traces into groups of traces, wherein each group of traces includes traces with the same trace type; and
sampling each group of traces with one of the sampling rates, wherein for each group of traces the sampling rate is inversely proportional to a frequency of occurrence of the trace type in the trace.

### Claim 16 (depends on 9)

The computer system of claim 9 wherein sampling the traces using the different sampling rate comprises:
sorting traces into bins of a histogram of the durations, each bin of the histogram corresponding to a time interval that contains traces with durations in the time interval; and
sampling traces in each bin with one of the sampling rates, wherein for each bin of the histogram the sampling rate is inversely proportional to a frequency of occurrence of the traces in the bin.

### Claim 17

A non-transitory computer-readable medium encoded with machine-readable instructions that when executed by one or more processors of a computer system perform operations comprising:
determining different sampling rates for the traces based on frequency of occurrence of trace types and/or durations of the traces;
sampling the traces using the different sampling rates to obtain sampled traces, wherein less frequently occurring trace types and/or durations are sampled with larger sampling rates than sampling rates used to sample more frequently occurring trace types and/or durations; and
storing the sampled traces in a data storage device.

### Claim 18 (depends on 17)

The medium of claim 17 wherein determining the different sampling rates comprises:
sorting the traces according to trace type to obtain one or more groups of traces, each group of traces having a different associated trace type;
receiving a sampling level via a graphical user interface;
determining a trace-type sampling parameter and a duration-sampling parameter based on the user-selected sampling level; and
for each group of traces,
determining a frequency of occurrence of a trace type associated with the group of traces,
constructing a histogram of the durations, each bin of the histogram corresponding to a time interval and containing traces with durations in the time interval,
determining a frequency of occurrence of traces in each bin of the histogram, and
determining a hybrid sampling rate for each bin of the histogram based on the frequency of occurrence of traces in each bin, the frequency of occurrence of the trace type, the trace-type sampling parameter, and the duration-sampling parameter.

### Claim 19 (depends on 17)

The medium of claim 17 wherein determining the different sampling rates comprises:
sorting the traces according to trace type to obtain one or more groups of traces, each group of traces having a different associated trace type;
receiving a sampling level via a graphical user interface;
determining a trace-type sampling parameter based on the user-selected sampling level; and
for each group of traces,
determining a frequency of occurrence of a trace type associated with the group of traces, and
determining a trace-type sampling rate based on the frequency of occurrence of the trace type and the trace-type sampling parameter.

### Claim 20 (depends on 17)

The medium of claim 17 wherein determining the different sampling rates comprises:
receiving a sampling level via a graphical user interface;
determining a duration-sampling parameter based on the user-selected sampling level;
constructing a histogram of traces based on the durations, each bin of the histogram corresponding to a time interval and containing traces with durations in the time interval;
determining a frequency of occurrence of traces in each bin of the histogram; and
for each bin of the histogram, determining a duration-sampling rate based on the frequency of occurrence of traces in the bin and the duration-sampling parameter.

### Claim 21 (depends on 17)

The medium of claim 17 wherein determining the different sampling rates comprises:
computing a modified Gini index based on frequency of occurrences based on the at least one of trace types of the traces and durations of the traces;
computing a compression rate based on the modified Gini index;
computing a user-selected compression rate based on the sampling level;
computing a metric based the compression rate and the user-selected compression rate;
computing an adjusted sampling parameter based on the metric when the metric is less than an optimization threshold; and
adjusting the sampling rates based on the adjusted sampling parameter.

### Claim 22 (depends on 17)

The medium of claim 17 wherein determining the different sampling rates comprises:
computing modified Gini indices over a range of sampling parameter values, each modified Gini index corresponding to a different sampling parameter value;
identifying a modified Gini index of the modified Gini indices that corresponds to the sampling level;
using the modified Gini indices to determine a sampling parameter that corresponds to the modified Gini index; and
computing the sampling rates based on the sampling parameter.

### Claim 23 (depends on 17)

The medium of claim 17 wherein sampling the traces using the different sampling rates comprises:
sorting traces into groups of traces, wherein each group of traces includes traces with the same trace type; and
sampling each group of traces with one of the sampling rates, wherein for each group of traces the sampling rate is inversely proportional to a frequency of occurrence of the trace type in the trace.

### Claim 24 (depends on 17)

The medium of claim 17 wherein sampling the traces using the different sampling rate comprises:
sorting traces into bins of a histogram of the durations, each bin of the histogram corresponding to a time interval that contains traces with durations in the time interval; and sampling traces in each bin with one of the sampling rates, wherein for each bin of the histogram the sampling rate is inversely proportional to a frequency of occurrence of the traces in the bin.
