Correlation between workload characteristics and elapsed time
Aligning the I/O demand rate and service time histograms through the transformer model and self-attention technology solves the problem of difficult insight into the relationship between I/O request size and elapsed time contribution in the storage system, achieving more accurate performance optimization and resource optimization. manage.
Patent Information
- Application Number
- CN202210423770.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-12-17
- Filing Date
- 2022-04-21
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-04-21
AI Technical Summary
When existing storage systems perform benchmark tests, they cannot effectively align the I/O demand rate histogram and the elapsed time histogram, resulting in the inability to gain insight into which I/O request sizes contribute to which elapsed times, affecting storage. System resource allocation and performance optimization.
Using the transformer model, through self-attention logic and attention technology, the request size histogram and the service time histogram are converted into an aligned token set, the relationship between the I/O demand rate and the elapsed time is determined, and the service time is generated Tokens provide feedback and adjust the model to achieve alignment.
Through aligned token sets, the contribution relationship of I/O request size to service time can be more accurately understood, helping the storage system optimize resource allocation while meeting performance goals, discover potential anomalies, and take remedial measures.
Smart Images

Figure CN116266102B_ABST
Abstract
Description
Background Art
[0001] A storage system includes storage resources and other resources (including processing resources and communication resources) on which various different types of workloads may be executed. Different workloads may compete for the resources of the storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0002] Some embodiments of the present disclosure are described with reference to the following drawings.
[0003] Figure 1 is a block diagram of an arrangement according to some examples of the present disclosure that applies a transformer model to an input set of tokens related to a workload of a computing system to produce a second set of tokens related to an elapsed time of executing the workload.
[0004] Figure 2 is a block diagram illustrating a relationship between a first histogram associated with characteristics of requests generating a workload and a second histogram associated with elapsed time to execute the workload, according to some examples.
[0005] Figure 3 is a graph showing the distribution of request size characteristics and the distribution of service time characteristics according to some examples.
[0006] Figure 4 is a block diagram illustrating percentage binning of discrete values for deriving bins of a request size histogram according to some examples.
[0007] Figure 5 is a block diagram of an example attention function based on some examples.
[0008] Figure 6 is a block diagram of a storage medium storing machine-readable instructions according to some examples.
[0009] Figure 7 is a block diagram of a system according to some examples.
[0010] Figure 8 is a flow diagram of a process according to some examples.
[0011] In all drawings, the same reference numerals denote similar but not necessarily identical elements. These figures are not necessarily drawn to scale, and the sizes of some components may be exaggerated to more clearly illustrate the examples shown. In addition, the drawings provide examples and / or embodiments consistent with the description. However, the description is not limited to the examples and / or embodiments provided in the drawings. DETAILED DESCRIPTION
[0012] In the present disclosure, the use of the terms "a", "an" or "the" is also intended to include the plural forms, unless the context clearly indicates otherwise. In addition, when used in the present disclosure, the terms "includes, including", "comprises, comprising", "have, having" specify the presence of stated elements, but do not exclude the presence or addition of other elements.
[0013] During operation of the storage system, data access requests may be received (e.g., from a host system) to access data stored by the storage system. The data access requests may include read requests and write requests that cause workload performance in the storage system to achieve a target result (e.g., read data from the storage system or write data to the storage system).
[0014] Storage performance benchmarks can be performed to characterize the performance of a storage system given an expected workload. A "workload" can refer to any set of activities performed by entities (e.g., machine-readable instructions, virtual entities, hardware components, etc.) in a computing environment (e.g., a storage system, a computer system, a network system, etc.).
[0015] Although the ensuing discussion involves examples involving storage systems, it should be noted that techniques or mechanisms according to some examples of the present disclosure may be applied to other types of systems, including computer systems, network systems, and the like.
[0016] Estimating the performance of a storage system for a given workload can help an enterprise (e.g., a company, an educational organization, a government agency, an individual, etc.) appropriately size the storage system, where "sizing" of a storage system can refer to providing resources in the storage system to accommodate the expected workload. Examples of resources may include physical resources (e.g., storage devices), processing resources (e.g., processors, cores of processors, etc.), communication resources (e.g., network interface controllers, switches, etc.), etc. Examples of storage devices may include disk-based storage devices, solid-state storage devices, memory devices (e.g., dynamic random access memory (DRAM) devices, static random access memory (SRAM) devices, etc.), etc. The resources of the storage system may also include logical resources, such as virtual machines, virtual processors, virtual communication devices, etc.
[0017] Estimating the performance of a storage system also helps assess whether the storage system is meeting target performance levels and / or whether anomalies exist. Anomalies may be caused by the presence of malware or errors in hardware or machine-readable instructions. Estimating storage system performance may allow an enterprise to determine whether storage system performance has degraded or improved over time for a given workload. Benchmarking storage system performance may also allow comparisons to be made with the performance of storage systems in a given community (e.g., a global community, other enterprises, etc.).
[0018] In some cases, to perform benchmarking, a model may be created based on measured performance metrics, which are sometimes referred to as key performance indicators (KPIs). Examples of KPIs include input / output (I / O) demand rates (e.g., I / O request size, number of requests per size, etc.). Other KPIs include elapsed time (e.g., service time for a workload executing an I / O request, latency associated with a workload executing an I / O request, etc.). Accurate modeling relies on measuring KPIs at a high level of granularity (e.g., at relatively small time intervals or at many different locations in a storage system), which can place a relatively large burden on the resources of the storage system, thereby impairing the storage system's ability to serve actual workloads.
[0019] In some cases, in order to reduce the number of KPIs measured, the storage system may sample the KPIs, wherein the KPIs are measured during a specified sampling interval. In some examples, the sampled I / O demand rate metrics and the sampled elapsed time metrics may be collected into a histogram. The histogram includes multiple bins. For example, if the I / O demand rate is represented as an I / O request size, different bins of the I / O demand rate histogram may correspond to different I / O request sizes. For example, a read request may read data of different sizes (i.e., different amounts of data), such as 512 bytes (512B) of data, 1k bytes (1kB) of data, 2kB of data, and the like. These different I / O request sizes correspond to different bins of the I / O request size histogram. Each bin is assigned a "quantity value" that represents the amount of occurrence of the corresponding I / O request size. For example, the quantity value of the 512B bin of the I / O request size histogram may have a value representing the amount of occurrence of a 512B I / O request. The occurrence volume of I / O requests of a given size may be expressed as the number of I / O requests of a given size (a count), the frequency of occurrence of I / O requests of a given size (a count per unit time), a percentage representing the ratio of I / O requests of a given size to the total number of I / O requests, or any other indication of how many I / O requests of a given size are encountered in the storage system.
[0020] Similarly, the elapsed time histogram has bins corresponding to different elapsed times for a workload executing I / O requests, and each bin is assigned a value representing the amount of occurrence of the corresponding elapsed time for the workload executing I / O requests.
[0021] While such a histogram can help understand the distribution of I / O requests of different sizes and the distribution of elapsed times for a workload executing I / O requests over a duration (i.e., the same duration), the histogram cannot provide insight into which I / O request sizes contribute to which elapsed times.
[0022] The challenge associated with gaining insight into which I / O request sizes contribute to which elapsed times is that the I / O demand rate histogram and the elapsed time histogram have values taken from different domains. Furthermore, there is no positional alignment between the histograms (e.g., there is no alignment between the buckets of the I / O demand rate histogram and the buckets of the elapsed time histogram), and there is no monotonic relationship between the histograms. Instead, there may be complex relationships between the histograms.
[0023] According to some examples of the present disclosure, an alignment between an I / O demand rate histogram and an elapsed time histogram may be determined to allow correlation between a particular bin of the I / O demand rate histogram and a corresponding bin of the elapsed time histogram. The determined alignment, for example, provides information indicating a relationship between each I / O demand rate characteristic (e.g., I / O request size) and each corresponding elapsed time.
[0024] Although the examples involve the use of I / O demand rate histograms and elapsed time histograms, in other examples, alignment may be determined based on other sets of values obtained from different domains of the computing environment, such as storage systems, computer systems, network systems, etc.
[0025] 1. Transformer Model
[0026] Figure 1 An example arrangement including a transformer model 102 according to some embodiments of the present disclosure is shown. The transformer model 102 is used to determine alignment between characteristics of a workload (e.g., I / O demand rate characteristics such as I / O request size and number of requests per size) and the elapsed time of the workload executing the I / O requests.
[0027] The workload is executed in a storage system, which may include various resources on which the workload is executed. In some examples, the storage system may include a collection of storage volumes (a single storage volume or multiple storage volumes), where a storage volume refers to a logical partition of data storage.
[0028] More generally, transformer model 102 may be used for workloads executed in other types of computing environments.
[0029] Figure 1 An example request size histogram 104 and service time histogram 108 are shown. The bins of the request size histogram 104 are represented along the horizontal axis, each bin representing a corresponding different I / O request size. Similarly, the bins of the service time histogram 108 are represented by the horizontal axis, each bin representing a corresponding different service time. "Service time" can refer to the amount of time it takes to service an I / O request (or multiple I / O requests).
[0030] The vertical axis of request size histogram 104 represents the occurrence (count, frequency, percentage, etc.) of I / O request size in each of the plurality of bins, and the vertical axis of service time histogram 108 represents the occurrence of service time in each of the plurality of bins.
[0031] The magnitudes represented by the vertical axis of each of the request size histogram 104 and the service time histogram 108 are continuous values that may have a relatively large unbounded range. For use with the transformer model 102, each of the request size histogram 104 and the service time histogram 108 may first be transformed by the processing system 100 into a corresponding set of discrete values, represented as a set of request size tokens 110 and a set of service time tokens 112.
[0032] A "processing system" may refer to a collection of computers (a single computer or multiple computers) that can execute machine-readable instructions. In some examples, the transformer model 102 may be trained and executed by the processing system 100. In other examples, the transformer model 102 may be constructed and trained by the processing system 100, and the trained transformer model 102 may be deployed on other processing systems.
[0033] In accordance with Figure 1 In the example of , the horizontal axis of each of the request size token set 110 and the service size token set 112 is represented as a quantile. In addition, the vertical axis of each of the sets 110 and 112 is represented using bounded magnitudes. The bounded magnitudes include magnitudes between a lower limit and an upper limit. In this way, the transformer model 102 is applied to bounded sets of values to obtain better computational efficiency and accuracy.
[0034] Details regarding how to derive sets 110 and 112 having bounded values are discussed further below.
[0035] Request size token collection 110 (in Figure 1 are represented as x1, x2, ..., x r , where r ≥ 2) can be used as input to the transformer model 102. The set 112 of service size tokens (in Figure 1are represented as y1, y2, ..., y t , where t≥2, and where r and t may be the same or different) are output by the converter model 102.
[0036] Service time token (y1, y2, ..., y t ) is the output token calculated one at a time by the transformer model 102. Note that according to some examples of the present disclosure, since each service time token (y j , where j = 1, ... t) is generated by the transformer model 102, and the generated service time token (y j ) is used as feedback input ( Figure 1 150) is provided to the transformer model 102 to help generate the next service time token.
[0037] Transformer model 102 is designed to estimate a service time histogram (or more specifically, a set of service time tokens 112) only given a request size histogram for a particular storage system (or other I / O demand rate histogram or a different histogram related to the characteristics of the workload). In some examples, different transformer models 102 can be built for different storage systems (e.g., storage systems with different resources).
[0038] The following discussion relates to an example with a read workload. More generally, the transformer model 102 can be applied to a write workload, or a workload that includes both read and write operations.
[0039] In some examples, transformer model 102 is able to determine how service times in a service time histogram are distributed among read request sizes in an I / O demand rate histogram, and vice versa, given a storage system and its I / O demand rate and service time distributions represented by corresponding histograms. Figure 2 An example request size histogram 202 and service time histogram 204 are shown. Figure 2 In the specific example of , request size histogram 202 has M bins (M≥2) of corresponding different I / O request sizes (512B, 1kB, 2kB, ..., 16MB), and service time histogram 204 has N bins (N≥2, where M and N may be the same or different) of corresponding different service times (e.g., 0.062 milliseconds (ms), 0.025ms, ..., 16 seconds (s)). Each bin has a magnitude. The respective alignments between the bins of request size histogram 202 and the bins of service time histogram 204 and the measure of the strength of each respective alignment are derived based on the information generated by transformer model 102 and are determined by Figure 2204 (but may be represented by other types of indicators). The alignment may indicate whether a bin in request size histogram 202 has a relationship with a bin in service time histogram 204, and the corresponding strength may indicate the strength of the relationship (in the case where the line represents the alignment, the strength may be represented by the thickness, color, or any other attribute of the line). A relationship exists between a bin in request size histogram 202 and a bin in service time histogram 204 if the I / O request size represented by the bin in request size histogram 202 contributes to the service time represented by the bin in service time histogram 204.
[0040] According to some examples of the present disclosure, the transformer model 102 may employ natural language processing techniques (e.g., for machine translation between different languages), but is applied to a set of tokens (e.g., 110 and 112) to perform alignment of the set of tokens. The transformer model 102 is a form of a sequence-to-sequence model that takes a variable length sequence as input and generates an output sequence. In some examples, an "attention" technique is applied in the transformer model 102 that does not rely on the input sequence having some type of temporal or other order. The attention technique provides tokens (e.g., Figure 1 The location information of the token sets 110 and 112 in FIG.
[0041] The attention technique is applied using attention logic in the encoder 114 and decoder 116 of the transformer model 102. The encoder 114 includes a r ( Figure 1 The decoder 116 includes a self-attention logic 120 applied to y1, y2, ..., y t The decoder 116 also includes attention logic 128 applied to the output of the encoder 114 and the output of the self-attention logic 126 in the decoder 116.
[0042] Each of the encoder 114 and the decoder 116 may be implemented using one or more hardware processing circuits, which may include any or some combination of a microprocessor, a core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or other hardware processing circuits. Alternatively, each of the encoder 114 and the decoder 116 may be implemented using a combination of one or more hardware processing circuits and machine-readable instructions (software and / or firmware) executable on the one or more hardware processing circuits.
[0043] Self-attention relates different positions of a single sequence (e.g., different tokens of the token set 110 or 112) to compute a representation of the sequence. For example, the self-attention logic 120 in the encoder 114 applies self-attention to input tokens related to the workload in the storage system (e.g., the request size token of the set 110), encodes the input tokens to compute weights representing the relationship between the input tokens, and generates a representation of the input tokens based on the weights. The representation of the input tokens related to the workload can be in the form of output tokens.
[0044] The self-attention logic 124 in the decoder 116 applies self-attention to input tokens associated with service times (e.g., service time tokens of the set 112), encodes the input tokens associated with the service times to calculate weights representing relationships between the input tokens associated with the service times, and generates representations of the input tokens associated with the service times based on the weights calculated by the self-attention logic 124. The representations of the input tokens associated with the service times may be in the form of output tokens.
[0045] The attention logic 128 applies attention to the output tokens generated by the encoder 114 and the output tokens generated by the self-attention logic 126, thereby determining the relationship (in the form of weights) between the output tokens generated by the encoder 114 and the output tokens generated by the self-attention logic 126. These weights can be used to obtain alignment between workload characteristics (e.g., I / O request size) and service time (e.g., Figure 2 206 in FIG. 1 ).
[0046] The encoder 114 includes linear logic 118, and the decoder 116 includes linear logic 124. The linear logic 118 in the encoder 114 will request size tokens x1, x2, ..., x r The input set is transformed into a set of internal vectors (each token x i (i's values range from 1 to r) and are transformed into corresponding internal vectors. The vector contains multiple elements. The linear logic 118 transforms each request size token into a corresponding internal vector, which includes multiple elements (e.g., multiple numbers) that together represent the request size token.
[0047] Similarly, linear logic 124 in decoder 116 transforms service time tokens y1, etc. generated so far by decoder 116 into corresponding internal vectors. In some examples, each internal vector produced by linear logic 118 or 124 is a fixed-length internal vector.
[0048] Decoder 116 identifies a subset of the internal vectors generated in encoder 114 that may be relevant to the generation of any position value of the service time histogram. For example, Figure 2 The magnitude in the 2 ms service time bin of the service time histogram 204 in may be driven by the magnitude in the 2 kB, 1 kB, and 512B bins of the request size histogram 202. The above determines the alignment between sets of tokens from different domains.
[0049] Note that there may be complex non-monotonic relationships between token sets from different domains (eg, sets 110 and 112), where each token set is not sorted (in terms of time or other order). In some examples, encoder 114 and decoder 116 do not employ any recurrent model.
[0050] like Figure 1 As shown, the encoder 114 also includes a feed-forward neural network 122, and the decoder includes a feed-forward neural network 130. The output of the feed-forward neural network 130 is provided to generate an output from the decoder 116.
[0051] The various components (118, 120, and 122) of encoder 114 may be implemented using a portion of one or more hardware processing circuits of encoder 114, or alternatively, may be implemented using machine-readable instructions executable by one or more hardware processing circuits of encoder 114. Similarly, the various components (124, 126, 128, and 130) of decoder 116 may be implemented using a portion of one or more hardware processing circuits of decoder 116, or alternatively, may be implemented using machine-readable instructions executable by one or more hardware processing circuits of decoder 116.
[0052] In the encoder 114, the feedforward neural network 122 in the encoder 114 performs machine learning based on the training data. The machine learning of the feedforward neural network 122 can be performed when the transformer model 102 is initially created, or it can be performed iteratively when the transformer model 102 generates additional outputs. Similarly, the feedforward neural network 130 in the decoder 116 performs machine learning based on the training data. Initially, when the transformer model 102 is constructed, training data including a training set of tokens (e.g., a training set of request size tokens and a training set of service time tokens) can be created. The training set of tokens can be provided to the transformer model 102 for training the transformer model 102. The training set of tokens can be filled by users or other entities. In some examples, the training set of tokens can include random values or values from other sources (e.g., values from users or other entities). In some examples, the training set of tokens can include a training set of request size tokens and a training set of service time tokens, wherein the alignment between the training set of request size tokens and the training set of service time tokens is known, such as from manual analysis or other analysis. In other examples, a training set of request size tokens and a training set of service time tokens may be used when the alignment between them is unknown.
[0053] For example, the transformer model 102 may predict an output set of service time tokens based on a training set of request size tokens. The training process may compare the predicted output set of service time tokens with the training set of service time tokens and determine how much error exists in the predicted output set of service time tokens.
[0054] Multiple training iterations may be performed until the predicted output produced by the transformer model 102 has an error less than a specified error threshold. In each training iteration, each feedforward neural network 122 or 130 updates (learns) the parameters of the transformer model 102 used in the encoder 114 and the decoder 116 so that the transformer model 102 begins to converge toward the correct output (i.e., an output with an error within the specified error threshold).
[0055] The parameters updated (learned) by the feedforward neural network 122 or 130 will be discussed further below.
[0056] 2. Transform the input from continuous space to discrete space
[0057] In some examples, a histogram containing unbounded continuous values (e.g., Figure 1 The request size histogram 104 and service time histogram 108 containing continuous values in its bins are transformed into a set of tokens with bounded discrete values, such as Figure 1The request size token 110 is a set of request size tokens 110 and the service time token 112 is a set of request size tokens 110 and a set of service time tokens 112. "Continuous value" refers to a value that is not limited to a set of specific discrete values. For example, in the request size bin, the quantity value can have any one of a variety of possible values (e.g., any one of a variety of count values, frequency values, percentage values, etc.).
[0058] The examples discussed above involve how to convert ( Figure 1 ) The request size histogram 104 (having unbounded magnitude) is transformed into a set of request size tokens 110 (having bounded discrete magnitude).
[0059] The processing system 100 may sort the magnitudes in the bins of the request size histogram 104 in ascending order (or other order) and generate an array of magnitudes. For example, an array of magnitudes derived from the request size histogram 104 is provided as follows: [10, 421, 0, 0, 4352, 0, 0, ..., 987, 0, 5167, 2944]. Wherein each entry in the array corresponds to a request size represented by a bin of the histogram 104 (i.e., the array indicates 10 requests of size 512B, 421 requests of size 1kB, etc.).
[0060] After sorting, a sorted array of magnitude values is provided as follows: [0, 0, 0, 0, 0, 0, 10, 13, 30, ..., 4352, 5167, 17438].
[0061] Note that in the foregoing example, the magnitude values (obtained from request size histogram 104 ) have a large (unbounded) variation in value from a minimum of 0 to a maximum of 17438.
[0062] The processing system 100 can derive a quantile ratio for implementing quantile cutting on the sorted array of magnitudes. In statistics, quantiles can be understood as points that divide the range of a distribution into segmented continuous intervals. The quantile points that define an interval can be points that divide the range based on the quantile ratio. For example, a quantile ratio of 0.1 or 10% will be a point or value within the range of values that define the distribution, and 10% of the values within the distribution may be located below this point or value. In a similar manner, a quantile ratio of 0.9 or 90% will be a point or value within the range of values that define the distribution, and 90% of the values within the distribution may be located below this point or value.
[0063] In some examples, the quantile ratios may be evenly distributed, such as "deciles," where the quantile ratios are defined as 0.1, 0.2, 0.3, ..., 0.9, and 1.0, where each quantile ratio increases by a factor of 0.1. In other examples, the quantile ratios may be unequally defined, such as 0.1, ..., 0.9, 0.92, 0.94, 0.998, and 1.0.
[0064] The implementation of quantile cuts can be based on how the values within the sorted magnitude array are distributed. A large number of elements in a given range near the ends of the distribution may require coarser quantile cuts early in the distribution, and finer cuts near the ends of the distribution.
[0065] Figure 3 An example of a request size feature distribution 302 and a service time feature distribution 304 is shown, where the request size feature distribution 302 is divided into quantiles 0.1, 0.2, 0.3, ..., 0.9 and 1.0, and the service time feature distribution 304 is divided into quantiles 0.1, 0.2, 0.3, ..., 0.9 and 1.0. Note that a large number of non-zero elements in the service time feature distribution 304 fall in the second half of the quantiles, such as 0.5, 0.6, 0.7, 0.8, 0.9 and 1.0. As a result, the processing system 100 can define coarser quantile cuts (e.g., a cut from 0.0 to 0.5) early in the distribution and more refined cuts (e.g., a finer cut between 0.5 and 1.0) near the end of the distribution. In the above example, different quantile binning strategies are used for the request size feature distribution 302 and the service time feature distribution 304.
[0066] In some examples, request size feature distribution 302 can be used as Figure 1 A collection of request size tokens 110 and a service time characteristic distribution with a modified quantile cut may be used as Figure 1 A collection of service time tokens 112 .
[0067] The quantile ratio may be provided as input from an individual (e.g., an administrator) or may be based on an automated analysis performed by the processing system 100. For example, the processing system 100 may parse the sorted array of magnitudes to determine the maximum and minimum values. Based on the maximum and minimum values, the processing system 100 may determine a ratio for performing the quantile cut.
[0068] Further note that each of the request size feature distribution 302 and the service time feature distribution 304 uses bounded magnitudes, which is different from the unbounded magnitudes of the histograms 104 and 106. Therefore, each "request size feature" in the corresponding quantile of the request size feature distribution 302 is represented by a bounded magnitude, and each "service time feature" in the corresponding quantile of the service time feature distribution 304 is represented by a bounded magnitude.
[0069] In some examples, processing system 100 can apply percentile binning to derive bounded magnitudes for each distribution 302 or 304 . Figure 4 An example of applying percentile binning to obtain a bounded range of magnitudes for each bin of the request size histogram 104 is shown. Figure 4 In the example of , the magnitude 1134 of the 512B bin is mapped to the bounded magnitude 5, the magnitude 23000 of the 1kB bin is mapped to the bounded magnitude 7, the magnitude 910 of the 2kB bin is mapped to the bounded magnitude 6, and so on.
[0070] exist Figure 3 In the example of , the bounded magnitude of the request size feature distribution 302 ranges from 0 to 14, and the bounded magnitude of the time feature distribution 304 ranges from 0 to 14. In other examples, the request size feature distribution 302 and the time feature distribution 304 may use bounded magnitudes of different ranges. The bounded magnitudes derived from the percentile bins are used as bounded values for the token sets (sets 110 and 112) used by the transformer model 102.
[0071] Note that the binning strategy used is dynamic and depends on the specific value of the histogram. The binning strategy may be different for different storage systems.
[0072] Above, input (for example, Figure 1 The histograms 104 and 108 of FIG. 104 are transformed from a continuous space to a discrete space (eg, a set 110 of request size tokens and a set 112 of service time tokens).
[0073] 3. Transformer Model
[0074] The transformer model 102 computes a conditional probability distribution that estimates the probability of an output sequence conditioned on an input sequence. The conditional probability distribution includes a probability associated with each output token predicted by the decoder 116.
[0075] As mentioned above, Figure 1 The service time token (y1, y2, ..., y t ) is the output token calculated one at a time by the transformer model 102. For each position j (j ranges from 1 to t), the probability of each candidate service time token is calculated, and the candidate service time token with the highest probability is selected as the service time token y for position j. j The “candidate” service time tokens are all possible service time tokens from the service time token set 112 that can be assigned as service time token y at each position j. j .
[0076] Given the entire input sequence (e.g., a set of request size tokens 110) and previously generated output tokens, the transformer model 102 predicts the output tokens one at a time based on the use of the following learned conditional probabilities:
[0077]
[0078] where y is the output token currently being computed and p(y) is modeled as all output tokens y j The joint conditional probability of these output tokens y j Conditioned on all previous output tokens and a context vector c derived from the input token (the context vector c will be discussed further below).
[0079] In a further example, the learned conditional probability of Equation 1 can be applied to score the probability between a given pair of input and output sequences, which can be used to detect anomalies in the service time distribution given request size characteristics (or other workload characteristics).
[0080] Note that the values in the bins of a histogram (e.g., histogram 104 or 106) have positional importance but not temporal importance, e.g., the value in the 128kb bin of request size histogram 104 does not affect the relationship between the values in the 64k bin and the service time bin.
[0081] 4.4. Attention Function
[0082] Figure 5 is a block diagram of an attention function 500 and a linear logic 502. The attention function 500 can be used to implement Figure 1 Each of the self-attention logic 120, the self-attention logic 126, and the attention logic 128. The linear logic 502 may be used to implement Figure 1 Each of the linear logic 118 and 124 in.
[0083] Linear logic 502 receives input tokens f1, f2, f3, f4, f5. Although Figure 5 An example with five input tokens is shown, but in other examples, different numbers of input tokens are used.
[0084] for Figure 1 The linear logic 118 in the encoder 114 of FIG. 1 is a request size token x1, x2, ..., x r For the linear logic 124 in the decoder 116, the input tokens are the feedback service time tokens (y1, ...) generated so far. The linear logic 502 transforms the input tokens f1, f2, f3, f4, f5 into a set of internal vectors h1, h2, h3, h4, h5.
[0085] Notice, Figure 1 The attention function 128 is not associated with linear logic because the output of the encoder 114 and the self-attention logic 126 are already in vector form. The input of the attention logic 128 in the decoder 116 includes the vector output by the encoder 114 and the vector output by the self-attention logic 126.
[0086] The output of the attention function 500 is a set of output vectors z1, z2, z3, z4, z5.
[0087] In some examples, the linear logic 502 applies an embedding algorithm to the input tokens f1, f2, f3, f4, f5. The embedding algorithm transforms each input token into a real number vector. Each vector generated by the embedding algorithm has a fixed size.
[0088] The attention function 500 applies query, key, and value operations such that if the query aligns with the key, the corresponding value is returned.
[0089] From each internal vector h of the internal vectors h1,h2,h3,h4,h5 k (k=1 to 5), the attention function 500 creates a query vector q k , key vector k k Sum value vector v k , thereby creating query vectors (q1, q2, q3, q4, q5), key vectors (k1, k2, k3, k4, k5) and value vectors (v1, v2, v3, v4, v5). The attention function 500 can be implemented by multiplying the internal vectors h1, h2, h3, h4, h5 by the three parameter matrices W generated during the training of the transformer model 102. Q , W K and W V To create query vectors, key vectors, and value vectors. More specifically, h k Multiply by W Q Generate q k , h k Multiply by W K Generate k k , and h k Multiply by W V Generate v k .
[0090] During the training of the transformer model 102, the parameter matrix W Q , W K and W V By feed-forward neural networks (e.g., Figure 1 122 or 130) in the update.
[0091] The attention function 500 aligns the query (or more specifically, the query vector) and the key (or more specifically, the key vector) and outputs the corresponding value (or more specifically, the value vector). If the attention function 500 is applying self-attention, the alignment is between interval vectors from the same set of internal vectors.
[0092] However, for Figure 1The attention function 128 is aligned between the query vector corresponding to the output vector from the encoder 114 and the key vector corresponding to the output vector from the self-attention logic 126 of the decoder 116.
[0093] If the query is aligned to more than one key, a weighted average of the values weighted by the alignment scores is returned. For example, if h4 is strongly aligned to h1 and h5, the output of h4 generated by the attention function 500 is a weighted average of the results of h1 and h2 based on the alignment weights calculated by the attention function 500.
[0094] Once the query vector, key vector, and value vector have been obtained, the attention function 500 calculates for each internal vector h k For example, if the score of h2 is being calculated, each of the other inner vectors h1, h3, h4, and h5 is scored against h2. The score is calculated by taking the dot product of the query vector and the key vector of the corresponding inner vector being scored. The score of h1 is calculated by taking the dot product of q1 and k1, the score of h2 is calculated by taking the dot product of q2 and k2, and so on. Each inner vector h m The score of takes the form of a score vector including multiple scores (with respect to the scores of other internal vectors h m ).
[0095] Next, the attention function 500 divides the scores in the score vector by a scaling factor, such as the square root of the size of the key vector, or other scaling factor. Scaling provides scaled score vectors (ssv1, ssv2, ssv3, ssv4, and ssv5) for each internal vector h1, h2, h3, h4, and h5. The scaled score vector ssv1 contains the scaled scores for h1, the scaled score vector ssv2 contains the scaled scores for h2, and so on.
[0096] Next, a weighting function is applied to the scaled scores in the scaled score vector as follows to produce the corresponding weights α mk (where m=1 to 5, and k=1 to 5):
[0097]
[0098] where e mk It means h m and h k The similarity score between the similarities (generated by the similarity function applied to the scaled score vector discussed above), T x is the length of the input token (in Figure 5 In the example, it is 5). The function exp(e mk ) is the calculation of e mk The exponential function of the exponential of .
[0099] Each weight α mk Reflects the internal vector h m Relative to the internal vector h k After generating the appropriate encoding and finally generating the output token y j The importance of time.
[0100] Weight {α 11 , α 12 , α 13 , α 14 , α 15}, {α 21 , α 22 , α 23 , α 24 , α 25}, {α 31 , α 32 , α 33 , α 34 , α 35}, {α 41 , α 42 , α 43 , α 44 , α 45} and {α 51 , α 52 , α 53 , α 54 , α 55} is used to fill in Figure 5 Alignment model a shown.
[0101] The weights in the alignment model a are then multiplied with the value vectors v1, v2, v3, v4, v5 to generate Figure 5 Specifically, v1 is combined with {α 11 , α 12 , α 13 , α 14 , α 15 Each weight in} is multiplied to produce wv 11 , wv 12 , wv 13 , wv 14 and wv 15 ; Combine v2 with {α 21 , α 22 , α 23 , α 24 , α 25 Each weight in}} is multiplied to produce wv 21 , wv 22 , wv 23 , wv 24 and wv 25 ; Combine v3 with {α31 , α 32 , α 33 , α 34 , α 35 Each weight in} is multiplied to produce wv 31 , wv 32 , wv 33 , wv 34 and wv 35 ; Combine v4 with {α 41 , α 42 , α 43 , α 44 , α 45 Each weight in}} is multiplied to produce wv 41 , wv 42 , wv 43 , wv 44 and wv 45 ; and v5 and {α 51 , α 52 , α 53 , α 54 , α 55 Each weight in}} is multiplied to produce wv 51 , wv 52 , wv 53 , wv 54 and wv 55 .
[0102] Then, the sum of the entries of the context vector c is calculated to obtain the attention vectors z1, z2, z3, z4 and z5, which are the outputs of the attention function 500. Specifically, z1 is wv 11 , wv 12 , wv 13 , wv 14 and wv 15 The sum of 21 , wv 22 , wv 23 , wv 24 and wv 25 The sum of 31 , wv 32 , wv 33 , wv 34 and wv 35 The sum of 41 , wv 42 , wv 43 , wv 44 and wv 45 The sum of z5 and wv 51 , wv 52 , wv 53 , wv54 and wv 55 The sum of .
[0103] Although in Figure 1 The attention function 500 applied in each of the self-attention logic 120 and 126 in the embodiment computes the attention function 500 for a given set of input tokens (x1, x2, ..., x r or y1, y2, ..., y t ) is the weight α of the relationship between the corresponding internal vectors mk , but the attention function 500 applied in the attention logic 128 calculates a weight α that specifies the relationship between vectors corresponding to two different outputs (the output of the encoder 114 and the output of the self-attention logic 126 in the decoder 116) mk .
[0104] Therefore, the weight α generated by the attention function 500 is mk Indicates the relationship between input tokens and output tokens, for example, requesting size tokens (x1, x2, ..., x r ) and service time tokens (y1, y2, ..., y t ). The weights can indicate the relationship between an input token (e.g., x i ) and the output token (y j ) and the strength of the relationship. For example, if x i and j If the weight of the relationship between exceeds the threshold, it means that x i and j There is a relationship between , and the strength of the relationship is indicated by the value of the weight (e.g., a higher weight value indicates a stronger relationship). i and j If the relationship between is less than the threshold, it means that x i and j There is no relationship between them.
[0105] The relationship between input tokens and output tokens can be presented in an output representation (e.g., a heat map or other graphical representation) to allow a user to visualize any relationship between input tokens and output tokens (e.g., represented by different colors or different brightness or different numerical values).
[0106] In this manner, the output of the transformer model 102 can be used to predict how service times will be distributed for a given distribution of request sizes. Furthermore, specifying weights for the relationship between request size and service time can allow a user or other entity (program or machine) to determine the expected service time for a workload given a particular request size. In this manner, a user or other entity can allocate appropriate resources in the storage system for a given workload of a particular request size so that the storage system can execute the workload while meeting performance goals.
[0107] The output of the transformer model 102 can also be used to troubleshoot problems in the storage system. A user or other entity can compare the actual service time of the storage system with the expected service time generated by the transformer model 102 for a particular request size to determine if there is an anomaly in the storage system (e.g., the storage system is overburdened and performing poorly, there is a bug in a program or hardware component, etc.). Alerts or other remedial actions can be taken to resolve the anomaly.
[0108] 5. Examples
[0109] Figure 6 is a block diagram of a non-transitory machine-readable or computer-readable storage medium 600 storing machine-readable instructions that, when executed, cause the system to perform various tasks. The system may include a computer or a collection of computers.
[0110] The machine-readable instructions include first token set receiving instructions 602 for receiving a first token set associated with a workload characteristic (eg, size of I / O requests) of a computing system (eg, storage system, computer system, network system, etc.).
[0111] The machine-readable instructions include first token set encoding instructions 604 for encoding the first token set, the encoding including calculating weights representing relationships between tokens of the first token set (e.g., by Figure 1 ), and generating a representation of the first set of tokens based on the weights (e.g., the representation of the first set of tokens may be Figure 1 output of encoder 114).
[0112] The machine-readable instructions include token correlation instructions 606 for determining, based on the representation, a correlation between a first set of tokens and a second set of tokens associated with an elapsed time to execute the workload. The correlation may be determined, for example, by Figure 1 The decoder 116 executes.
[0113] In some examples, the transformer model is used to recursively generate tokens of the second set of tokens and the generated tokens of the second set of tokens are fed back as input to the transformer model.
[0114] In some examples, the transformer model outputs a probability of each token of the second set of tokens given any previously generated tokens of the first set of tokens and the second set of tokens.
[0115] In some examples, the weights are calculated based on applying a self-attention function to the first set of tokens, where the self-attention function calculates the weights based on aligning pairs of tokens of the first set of tokens.
[0116] In some examples, the self-attention function is based on a parameter matrix (e.g., W Q , W K , and W V ) is used to align token pairs.
[0117] In some examples, the self-attention function computes weights and values resulting from aligning each token pair (e.g., the value vector v k )
[0118] In some examples, the machine-readable instructions indicate a strength of a relationship between an elapsed time represented by the second set of tokens and a characteristic of a workload represented by the first set of tokens based on a weight representing a relationship between tokens of the first set of tokens and tokens of the second set of tokens.
[0119] In some examples, different values of the weight represent different strengths of the relationship between the elapsed time represented by the second set of tokens and the characteristics of the workload represented by the first set of tokens.
[0120] Figure 7 is a block diagram of a system 700 (eg, a computer or collection of computers).
[0121] System 700 includes a hardware processor 702 (or multiple hardware processors). A hardware processor may include a microprocessor, a core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or other hardware processing circuit.
[0122] System 700 includes a non-transitory storage medium 704 storing machine-readable instructions executable on hardware processor 702 to perform various tasks. Machine-readable instructions executable on a hardware processor may refer to instructions executable on a single hardware processor or instructions executable on multiple hardware processors.
[0123] The machine-readable instructions in the storage medium 704 include first token set receiving instructions 706 for receiving, at an encoder, a first token set associated with characteristics of a request to generate a workload of the computing system.
[0124] The machine-readable instructions in the storage medium 704 include first token set weight calculation instructions 708 for calculating weights representing relationships between tokens of the first token set using an encoder.
[0125] The machine-readable instructions in the storage medium 704 include first token set representation generating instructions 710 for generating a representation of a first token set using an encoder based on the weights.
[0126] The machine-readable instructions in the storage medium 704 include first token set representation receiving instructions 712 for receiving, at a decoder, a representation of a first token set from an encoder.
[0127] The machine-readable instructions in the storage medium 704 include correlation determining instructions 714 for determining, at the decoder, a correlation between the first set of tokens and a second set of tokens related to an elapsed time of executing the workload based on the representation.
[0128] In some examples, each of the encoder and the decoder includes a neural network trained using training data.
[0129] Figure 8 is a flow diagram of process 800 according to some examples.
[0130] Process 800 includes training (at 802) a transformer model operable to determine a relationship between a set of input tokens and a set of output tokens, the set of input tokens being related to characteristics of a workload in a computing system, and the set of output tokens being related to an elapsed time executing the workload.
[0131] Process 800 includes determining (at 804 ), by a trained transformer model, first weights representing relationships between tokens of a set of input tokens.
[0132] Process 800 includes generating (at 806 ), by the trained transformer model, a representation of the input token set based on the weights.
[0133] Process 800 includes determining (at 808), by the trained transformer model, second weights representing relationships between tokens of the set of output tokens.
[0134] Process 800 includes generating (at 810 ) a representation of a set of output tokens based on the weights by a trained transformer model.
[0135] Process 800 includes determining (at 812) a relationship between the set of input tokens and the set of output tokens based on a representation of the set of input tokens and a representation of the set of output tokens.
[0136] Storage media (e.g. Figure 6 600 or Figure 7 704) may include any or some combination of the following: semiconductor memory devices, such as DRAM or SRAM, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), and flash memory, etc.; disks, such as fixed disks, floppy disks, and removable disks; other magnetic media including tapes; optical media such as compact disks (CDs) or digital video disks (DVDs); or other types of storage devices. Note that the instructions discussed above may be provided on one computer-readable or machine-readable storage medium, or alternatively, may be provided on multiple computer-readable or machine-readable storage media distributed in a large system that may have multiple nodes. Such computer-readable or machine-readable storage media are considered to be part of an article (or article of manufacture). An article or article of manufacture may refer to any single component or multiple components that are manufactured. One or more storage media may be located in a machine that runs machine-readable instructions, or at a remote site from which machine-readable instructions may be downloaded over a network for execution.
[0137] In the foregoing description, many details are set forth to provide an understanding of the subject matter disclosed herein. However, embodiments may be implemented without some of these details. Other embodiments may include modifications and variations to the above details. The appended claims are intended to cover such modifications and variations.
Claims
1. A non-transitory machine-readable storage medium comprising instructions that, when executed, cause a system to perform the following operations: receiving a first set of tokens associated with characteristics of a workload of a computing system; encoding the first set of tokens to calculate first weights representing relationships between tokens of the first set of tokens based on applying a first self-attention function to the first set of tokens, the first self-attention function being used to calculate the first weights based on aligning respective pairs of tokens of the first set of tokens; generating a representation of the first set of tokens based on the first weights; applying a second self-attention function to a second set of tokens to calculate a second weight representing a relationship between tokens of the second set of tokens, the second set of tokens being related to an elapsed time of executing the workload; generating a representation of the second set of tokens based on the second weights; applying an attention function based on the representation of the first set of tokens and the representation of the second set of tokens to produce third weights representing relationships between tokens of the first set of tokens and tokens of the second set of tokens; as well as Based on the third weight, a correlation between the first set of tokens and the second set of tokens is determined, the correlation comprising a strength of a relationship between the elapsed time represented by the second set of tokens and the characteristic of the workload represented by the first set of tokens.
2. The non-transitory machine-readable storage medium according to claim 1, wherein: The instructions for determining the correlation between the first set of tokens and the second set of tokens include instructions for determining that requests having a first characteristic represented in the first set of tokens contribute to a first elapsed time represented in the second set of tokens.
3. The non-transitory machine-readable storage medium of claim 1, wherein: The first token set represents requests of different characteristics, and the workload responds to the requests of different characteristics.
4. The non-transitory machine-readable storage medium of claim 1, wherein: The second token set represents different service times or operation delays in the workload.
5. The non-transitory machine-readable storage medium of claim 1, wherein: The instructions for applying the second self-attention function include instructions for feeding back a previously generated token of the second set of tokens as an input to the second self-attention function.
6. The non-transitory machine-readable storage medium of claim 5, wherein: The first self-attention function, the second self-attention function, and the attention function are part of a transformer model that outputs a probability of each token of the second token set given the first token set and any previously generated tokens of the second token set.
7. The non-transitory machine-readable storage medium of claim 1, wherein: The first self-attention function aligns the respective token pairs of the first token set based on the use of a parameter matrix trained using a training dataset.
8. The non-transitory machine-readable storage medium of claim 1, wherein: The first self-attention function is part of an encoder, and the second self-attention function and the attention function are part of a decoder.
9. The non-transitory machine-readable storage medium of claim 8, wherein: The first self-attention function calculates the product of the first weight and the value produced by the respective token pairs of the first set of tokens being aligned.
10. The non-transitory machine-readable storage medium of claim 9, wherein: The output of the attention function is provided to a feed-forward neural network.
11. The non-transitory machine-readable storage medium of claim 1, wherein: The characteristics of the workload include a size of input / output (I / O) requests associated with the workload.
12. The non-transitory machine-readable storage medium of claim 1, wherein: Different values of the third weight represent different strengths of the relationship between the elapsed time represented by the second set of tokens and the characteristic of the workload represented by the first set of tokens.
13. A system comprising: processor; and A non-transitory storage medium storing instructions executable on the processor, the instructions being used to: receiving, at an encoder, a first set of tokens associated with characteristics of a request to generate a workload of a computing system; calculating, using the encoder, a first weight representing a relationship between tokens of the first set of tokens based on applying a first self-attention function to the first set of tokens, the first self-attention function being used to calculate the first weight based on aligning pairs of tokens of the first set of tokens; generating, using the encoder, a representation of the first set of tokens based on the first weights; receiving, at a decoder, the representation of the first set of tokens from the encoder; applying a second self-attention function to a second set of tokens at the decoder to compute a second weight representing a relationship between tokens of the second set of tokens, the second set of tokens being related to an elapsed time of executing the workload; generating, at the decoder, a representation of the second set of tokens based on the second weights; applying an attention function based on the representation of the first set of tokens and the representation of the second set of tokens to produce third weights representing relationships between tokens of the first set of tokens and tokens of the second set of tokens; as well as Based on the third weight, a correlation between the first set of tokens and the second set of tokens is determined at the decoder, the correlation comprising a strength of a relationship between the elapsed time represented by the second set of tokens and the characteristic of the workload represented by the first set of tokens.
14. The system according to claim 13, wherein: Each of the encoder and the decoder includes a neural network trained using training data.
15. A method comprising: Receiving, at a system including a hardware processor, a first set of tokens associated with characteristics of a workload of a computing system; encoding, by the system, the first set of tokens to calculate first weights representing relationships between tokens of the first set of tokens based on applying a first self-attention function to the first set of tokens, the first self-attention function being used to calculate the first weights based on aligning respective pairs of tokens of the first set of tokens; generating, by the system, a representation of the first set of tokens based on the first weights; applying, by the system, a second self-attention function to a second set of tokens to calculate a second weight representing a relationship between tokens of the second set of tokens, the second set of tokens being related to an elapsed time of executing the workload; generating, by the system, a representation of the second set of tokens based on the second weights; applying, by the system, an attention function based on the representations of the first set of tokens and the representations of the second set of tokens to produce third weights representing relationships between tokens of the first set of tokens and tokens of the second set of tokens; as well as The system determines, based on the third weight, a correlation between the first set of tokens and the second set of tokens, the correlation comprising a strength of a relationship between the elapsed time represented by the second set of tokens and the characteristic of the workload represented by the first set of tokens.
16. The method according to claim 15, wherein: The determining the correlation between the first set of tokens and the second set of tokens includes determining that a request having a first characteristic represented in the first set of tokens contributes to a first elapsed time represented in the second set of tokens.
17. The method according to claim 15, wherein: The first token set represents requests of different characteristics, and the workload responds to the requests of different characteristics.
18. The method according to claim 15, wherein: Applying the second self-attention function includes feeding back previously generated tokens of the second token set as input to the second self-attention function.
19. The method according to claim 15, wherein: Different values of the third weight represent different strengths of the relationship between the elapsed time represented by the second set of tokens and the characteristic of the workload represented by the first set of tokens.
Citation Information
Patent Citations
Attention-based decoder-only sequence transduction neural networks
CN111386537A
Dynamic discovery of dependencies among time series data using neural networks
US20190354836A1
Application of natural language processing techniques for predicting resource consumption in a computing system
US20200104174A1
Automated provisioning for database performance
US20200125568A1
Operational metric computation for workload type
US20200393981A1
