Collect samples in layers across data centers

By hierarchically collecting and analyzing measurement data, using histograms and variable-size bin structures, the problems of measurement data processing delay and poor scalability in the existing technology are solved, and real-time performance monitoring and system-level statistical description are achieved.

CN112703487BActive Publication Date: 2024-08-27VMWARE INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980058045.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-10-26
Filing Date
2019-10-25
Publication Date
2024-08-27
Estimated Expiration
2039-10-25

AI Technical Summary

Technical Problem

Existing performance monitoring tools do not scale well when processing and storing large amounts of metric data, and do not support real-time analysis, especially in large-scale distributed computer systems, resulting in increased latency and processing overhead.

Method used

Use hierarchical collection and analysis of metric data, separate sample collection and aggregation through the data plane and control plane, use histograms to count and represent metric data, generate individual value histograms (IV) and sample value range histograms (SVR), and Optimizes data storage and analysis with variable-size bin structures, supporting real-time performance monitoring.

Benefits of technology

It improves the scalability and real-time analysis capabilities of the system, reduces storage and processing overhead, can quickly obtain system-level performance statistical descriptions, and supports real-time adjustments to system operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112703487B_ABST
    Figure CN112703487B_ABST
Patent Text Reader

Abstract

Some embodiments of the present invention provide a method for collecting metrics associated with operations of a set of one or more resources executed on a host computer in a data center. In some embodiments, the method collects and analyzes samples hierarchically, wherein a first set of samples are collected and analyzed in a data plane, and a second set of samples are collected and analyzed in a control plane by aggregating samples collected in the data plane. In some embodiments, the data plane includes a host computer on which a sample collection engine (e.g., a service engine) is executed, and the control plane includes a set of one or more servers that obtain sample data collected by the host computer and aggregate and analyze the data.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] Metrics (also called performance metrics) are measurements used by computer systems to quantify system performance. Metrics are critical for analyzing the operation of a system and providing feedback for improvement. In modern computer systems, the number of metrics can be large. For example, assuming a single cloud application collects 1000 metrics every 5 seconds for analysis, this means 720,000 metrics are collected every hour. In a typical large-scale environment, such as in an enterprise data center supporting thousands of applications, each executing on multiple servers, the rate can be on the order of billions of metrics per hour.

[0002] Currently, most performance monitoring tools save the collected metrics to a database and then perform analysis offline. Since storing and processing a large number of metrics requires a large number of input / output (I / O) operations (such as database reads and writes), these tools tend to scale poorly. In addition, due to the latency and processing overhead of storing and processing metric data in a database, these tools usually do not support real-time analysis. Summary of the invention

[0003] Some embodiments of the present invention provide a method for collecting metric values ​​related to the operation of one or more resource sets executed on a host computer in a data center. In some embodiments, the resource set includes a set of one or more applications for which a middlebox service is executed on the host computer (e.g., a cluster of web servers, application servers, or database servers), and the metric is the latency experienced by packets processed by the application set.

[0004] In some embodiments, the method collects and analyzes samples hierarchically, wherein a first set of samples are collected and analyzed in a data plane, and a second set of samples are collected and analyzed in a control plane by aggregating samples collected in the data plane. In some embodiments, the data plane includes a host computer on which a sample collection engine (e.g., a service engine) is executed, and the control plane includes one or more sets of servers that obtain sample data collected by the host computer and aggregate and analyze the data.

[0005] At a particular host computer, in some embodiments, the method repeatedly identifies different sample values ​​for a particular operational metric. For example, in some embodiments, the method is performed by a service engine that executes on a particular host computer and identifies different delays experienced by different packets forwarded by the service engine to an application cluster. In some embodiments, the service engine (e.g., a service virtual machine or container) is a load balancer, while in other embodiments, it is another type of middlebox service engine, such as a firewall engine, an intrusion detection engine, an intrusion prevention engine, and a network address translation engine, etc.

[0006] During a first time period, the method identifies a first set of sample metric values ​​and generates an individual value (IV) first histogram that specifies the number of samples that the method has processed for each of several metric values. Based on the IV first histogram, the method specifies several metric value ranges (i.e., several bins) for a sample value range (SVR) second histogram. During a second time period, the method identifies a second set of sample values ​​and generates an SVR second histogram to specify the number of samples that the method has processed for each of a set of specified ranges in the second histogram.

[0007] The method then provides the SVR second histogram to the server for analysis in order to evaluate the operation of the resource set in the data center. For example, in some embodiments, the method provides the SVR second histogram to a collection of one or more servers to aggregate with the SVR second histograms generated by several other host computers for specific operational metrics. The server collection then stores the aggregated histogram in a data storage device (e.g., a database) that a network administrator can access to obtain information about the collected operational metrics. For example, in some embodiments, the server collection provides the data in the form of a graphical display of an aggregated histogram, or provides the information in a table or text form, for example, providing delay values ​​for 50%, 90%, and 99% of processed packets.

[0008] In some embodiments, the method generates another SVR histogram before generating the SVR second histogram. For example, in some embodiments, the SVR second histogram has variable-sized bins (i.e., variable-sized ranges, also referred to as variable-sized buckets) in some embodiments. Before generating the SVR second histogram with variable-sized bins and providing it to the server, in some embodiments, the method generates an SVR third histogram with fixed-sized bins (i.e., with fixed-sized ranges / buckets) from the IV first histogram, and uses this fixed-sized bin SVR histogram to identify (1) the metric values ​​around which the bin sizes of the variable SVR histogram should be defined, and (2) the sizes of these variable bins.

[0009] Specifically, for a fixed-size bin SVR histogram, in some embodiments, the method generates a fixed-size bin about the metric values ​​identified along the first histogram. In many cases, the IV first histogram does not have sample values ​​for the entire possible value range that the method may handle. In order to take this into account when generating the SVR third histogram bin, in some embodiments, the method selects a fixed-size third histogram bin to evenly cover the expected range of sample values.

[0010] In other embodiments, the method defines an SVR second histogram from the IV first histogram, rather than generating a fixed-size box histogram from the IV first histogram. In some of these embodiments, the method defines a box for the SVR second histogram (1) based on the bottom W% (e.g., 25%) of the samples of the IV first histogram, (2) defines several boxes (e.g., 4 or 5 boxes) for the next X% (e.g., the next 25%) of the samples of the IV first histogram, (3) defines many boxes (e.g., 5 to 10 boxes) for the next Y% (e.g., the next 40%) of the samples of the IV first histogram, and (4) defines another plurality of boxes (e.g., 5 boxes) for the last Z% (e.g., the last 10%) of the samples of the IV first histogram. Based on the next set of samples it processes, the method then generates an SVR second histogram, and then uses the histogram to define the boxes of the SVR third histogram. The advantage of this approach is that it prevents the method from creating too many bins for its second histogram based on outlier sample values ​​identified in the first histogram.

[0011] After specifying the locations and sizes of the bins for the SVR third histogram, the method then (1) identifies a third set of sample values ​​in a third time period between the first time period and the second time period during which the method identified the first and second histograms, and (2) generates the SVR third histogram to specify the number of samples that the method has processed for each fixed-size bin of the third histogram. After generating the SVR third histogram, the method then specifies the locations and sizes of the bins of the SVR second histogram from the SVR third histogram.

[0012] For example, when the SVR third histogram has ten buckets with 500 samples corresponding to delays below 0 to 40 milliseconds (ms), and another ten buckets with 500 samples corresponding to delays from 40 to 80 ms, in some embodiments, the method (1) defines 9 buckets for the SVR second histogram, (2) assigns the first bucket to be centered at 20 ms and have a width of 20 ms, (3) assigns the next three buckets of the SVR second histogram to be centered at 45, 55 and 65 ms, respectively, with a width of 10 ms each, and (4) assigns the last five buckets of the SVR second histogram to be centered at 71, 73, 75, 77 and 79 ms, respectively, with a width of 2 ms each.

[0013] This approach is optimized to identify the maximum delay values ​​experienced by 50%, 90%, and 99% of the samples because it creates a first bucket to cover the bottom 50% of the sample value range it identifies in the SVR third histogram, creates three buckets for the next 40% of the expected sample value range, and then creates five buckets for the last 10% of the expected sample value range. The location and size of these boxes in the SVR second histogram are determined by the contents of the SVR third histogram, and the boxes of the SVR third histogram are determined by the contents of the IV first histogram, as described above.

[0014] In addition to generating the SVR second histogram, the method of some embodiments also iteratively performs a range modification process to modify the position and / or size of the bins of the SVR second histogram. For example, after providing the SVR second histogram to the server set, the method of some embodiments modifies at least two ranges (bins) specified for the SVR second histogram based on the number of sample values ​​specified for its bins by the generated SVR second histogram, and generates a new SVR second histogram for the next batch of samples to be processed by it based on the modified bins.

[0015] The foregoing summary is intended to serve as a brief introduction to some embodiments of the present invention. This is not meant to be an introduction or overview of all inventive themes disclosed in this document. The following detailed description and the drawings cited in the detailed description will further describe the embodiments described in the content as well as other embodiments. Therefore, in order to understand all the embodiments described in this document, a comprehensive review of the summary, detailed description, drawings, and claims is required. In addition, the claimed subject matter is not limited by the illustrative details in the summary, detailed description, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The novel features of the invention are set forth in the appended claims. However, for purposes of illustration, several embodiments of the invention are set forth in the following figures.

[0017] Figure 1 is a functional diagram illustrating a programmed computer system for managing metrics according to some embodiments.

[0018] Figure 2 is a block diagram illustrating an embodiment of a data center including a scalable distributed metric manager.

[0019] Figure 3 is a flow chart illustrating an embodiment of a process for statistically characterizing the performance of a distributed network.

[0020] Figure 4 is a flow chart illustrating an embodiment of a process for statistically characterizing transaction latency in a distributed network.

[0021] Figure 5 is a block diagram depicting the merging of buckets in an exemplary embodiment of a distributed network.

[0022] Figure 6 is a block diagram depicting the merging of buckets in an exemplary embodiment of a distributed network.

[0023] Figure 7 A process for implementing the metric collection method of some embodiments is illustrated.

[0024] Figure 8 Several load balancing engines executing as service virtual machines (SVMs) on several host computers are presented that distribute packet processing load among several server applications in a server application cluster executing on host computers in a data center.

[0025] Fig. 9 The load balancing process of some embodiments is illustrated.

[0026] Fig.10 An example of a histogram of individual values ​​generated for a sample of latency values ​​processed by a load balancer in some embodiments is illustrated.

[0027] Fig.11 An example of fixed-size bins generated for a fixed-bin histogram is illustrated.

[0028] Fig.12 An example of a fixed-size box histogram is shown.

[0029] Fig.13 illustrates examples of variable sized bins generated for a variable bin histogram.

[0030] Fig.14 illustrates an example of a variable-sized bin histogram.

[0031] Fig.15 An example of how a load balancer may report its variable-sized bin histograms in some embodiments is illustrated.

[0032] Fig.16 An example of modifying the variable sized bins of a variable bin histogram is illustrated.

[0033] Fig.17 Another example of variable sized bins generated for a variable bin histogram is illustrated.

[0034] Fig.18 Another example of a variable-sized box histogram is illustrated.

[0035] Fig.19Illustrated is the processing performed by another servicing engine that generates variable-sized bin histograms based on the bin size / position attributes it receives from the main servicing engine.

[0036] Fig. 20 Illustrated is processing performed by a controller in some embodiments on a variable-sized set of bin histograms reported by a set of service engines for a particular operational metric.

[0037] Fig.21 The controller is illustrated summing the data of the three reported histograms to obtain an aggregated histogram. DETAILED DESCRIPTION

[0038] The present invention may be implemented in a variety of ways, including as a process; an apparatus; a system; a composition of matter; a computer program product implemented on a computer-readable storage medium; and / or a processor, such as a processor configured to execute instructions stored on and / or provided by a memory, the memory being coupled to the processor. In this specification, these embodiments or any other form in which the present invention may take may be referred to as techniques. In general, the order of steps of the disclosed processes may be changed within the scope of the present invention. Unless otherwise stated, a component such as a processor or memory described as being configured to perform a task may be implemented as a general component that is temporarily configured to perform a task at a given time or as a specific component manufactured to perform a task. As used herein, the term "processor" refers to one or more devices, circuits, and / or processing cores configured to process data such as computer program instructions.

[0039] A detailed description of one or more embodiments of the present invention and drawings illustrating the principles of the present invention are provided below. The present invention is described in conjunction with such embodiments, but the present invention is not limited to any embodiment. The scope of the present invention is limited only by the claims, and the present invention encompasses many alternatives, modifications, and equivalents. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. These details are provided for illustrative purposes, and the present invention can be practiced according to the claims without some or all of these specific details. For the sake of clarity, technical materials known in the technical field related to the present invention are not described in detail so as not to unnecessarily obscure the present invention.

[0040] Metrics (also called performance metrics) are measurements used by computer systems to quantify system performance. Metrics are critical for analyzing the operation of a system and providing feedback for improvement. In modern computer systems, the number of metrics can be large. For example, assume that a single cloud application collects 1000 metrics for analysis every 5 seconds, which means 720,000 metrics are collected every hour. In a typical large-scale environment, such as in an enterprise data center supporting thousands of applications, each executing on multiple servers, the rate may be on the order of billions of metrics per hour. The analysis of metrics is further complicated by the distributed nature of some systems. In a distributed network, each subsystem may only handle a small portion of the tasks in the network. Therefore, each subsystem may only provide metric data for a limited portion of the network activity.

[0041] Currently, most performance monitoring tools save the collected metrics to a database and then perform analysis offline. Since storing and processing a large number of metrics requires a large number of input / output (I / O) operations (such as database reads and writes), these tools tend to scale poorly. In addition, due to the latency and processing overhead of storing and processing metric data in a database, these tools usually do not support real-time analysis.

[0042] A method and system for characterizing the performance of a distributed system is described. The method includes obtaining a plurality of performance metric sets from a plurality of sources in a distributed network. A statistical summary is generated for the performance metric sets. The statistical summary is used to provide a system-level statistical description of the performance of the distributed network.

[0043] Figure 1 is a functional diagram illustrating a programmed computer system for managing metrics according to some embodiments. It will be apparent that other computer system architectures and configurations may be used to manage and process metrics. The computer system 100, including the various subsystems described below, includes at least one microprocessor subsystem (also referred to as a processor or central processing unit (CPU)) 102. For example, the processor 102 may be implemented by a single-chip processor or by multiple processors. In some embodiments, the processor 102 is a general-purpose digital processor that controls the operation of the computer system 100. Using instructions retrieved from the memory 110, the processor 102 controls the receipt and manipulation of input data, and the output and display of data on an output device (e.g., a display 118). In some embodiments, the processor 102 includes and / or is used to provide the following with respect to Figure 2 The server functions described by server 202, etc.

[0044] The processor 102 is bidirectionally coupled to a memory 110, which may include a first main storage device, typically a random access memory (RAM), and a second main storage device, typically a read-only memory (ROM). As is well known in the art, the main storage device can be used as a general storage area and a scratch-pad memory, and can also be used to store input data and processed data. In addition to other data and instructions for processes operating on the processor 102, the main storage device can also store programming instructions and data in the form of data objects and text objects. As is also well known in the art, the main storage device typically includes basic operating instructions, program code, data, and objects (e.g., programming instructions) used by the processor 102 to perform its functions. For example, depending on whether data access needs to be bidirectional or unidirectional, the memory 110 may include any suitable computer-readable storage medium described below. For example, the processor 102 can also directly and very quickly retrieve frequently needed data and store it in a cache memory (not shown).

[0045] The removable mass storage device 112 provides additional data storage capacity for the computer system 100 and is coupled to the processor 102 bidirectionally (read / write) or unidirectionally (read-only). For example, the memory 112 may also include computer readable media such as magnetic tape, flash memory, PC-CARDS, portable mass storage devices, holographic storage devices, and other storage devices. The fixed mass storage device 120 may also provide additional data storage capacity, for example. The most common example of a mass storage device 120 is a hard drive. The mass storage devices 112, 120 typically store additional programming instructions, data, etc. that are not normally actively used by the processor 102. It will be appreciated that if desired, the information retained in the mass storage devices 112 and 120 may be incorporated in a standard manner as part of the memory 110 (e.g., RAM) as virtual memory.

[0046] In addition to providing access to the storage subsystem to the processor 102, the bus 114 can also be used to provide access to other subsystems and devices. As shown, these can include a display monitor 118, a network interface 116, a keyboard 104, and a pointing device 106, as well as auxiliary input / output device interfaces, sound cards, speakers, and other subsystems as needed. For example, the pointing device 106 can be a mouse, a stylus, a trackball, or a tablet computer, and is useful for interacting with a graphical user interface.

[0047] The network interface 116 allows the processor 102 to be coupled to another computer, computer network, or telecommunication network using the network connection shown. For example, through the network interface 116, the processor 102 can receive information (e.g., data objects or program instructions) from another network or output information to another network during the execution of the method / processing steps. Information, which is usually represented as a sequence of instructions to be executed on the processor, can be received from another network and output to another network. An interface card or similar device and appropriate software implemented by the processor 102 (e.g., executed thereon) can be used to connect the computer system 100 to an external network and transmit data according to a standard protocol. For example, the various processing embodiments disclosed herein can be executed on the processor 102, or can be executed on a network such as the Internet, an intranet network, or a local area network together with a remote processor that shares a portion of the processing. An additional mass storage device (not shown) can also be connected to the processor 102 through the network interface 116.

[0048] An auxiliary I / O device interface (not shown) may be used in conjunction with the computer system 100. The auxiliary I / O device interfaces may include general and custom interfaces that allow the processor 102 to send data from, and more generally receive data from, other devices such as microphones, touch-sensitive displays, transducer card readers, tape readers, voice or handwriting recognizers, biometric readers, cameras, portable mass storage devices, and other computers.

[0049] In addition, various embodiments disclosed herein also relate to a computer storage product having a computer-readable medium, which includes program code for performing various computer-implemented operations. A computer-readable medium is any data storage device that can store data that can be read by a computer system thereafter. Examples of computer-readable media include, but are not limited to, all of the above: magnetic media, such as hard disks, floppy disks, and tapes; optical media, such as CD-ROM disks; magneto-optical media, such as optical disks; and specially configured hardware devices, such as application-specific integrated circuits (ASICs), programmable logic devices (PLDs), and ROM and RAM devices. Examples of program code include machine code such as produced by, for example, a compiler, or files containing higher-level code (e.g., scripts) that can be executed using an interpreter.

[0050] Figure 1 The computer system shown is merely an example of a computer system suitable for use with the various embodiments disclosed herein. Other computer systems suitable for such use may include more or fewer subsystems. In addition, bus 114 illustrates any interconnection scheme for linking subsystems. Other computer architectures with different configurations of subsystems may also be utilized.

[0051] Figure 2 250 is a block diagram illustrating an embodiment of a data center that includes a scalable distributed metric manager and can provide distributed network services. In this example, client devices such as 252 are connected to data center 250 via network 254. The client device can be a laptop, desktop computer, tablet computer, mobile device, smart phone, wearable networked device, or any other suitable computing device. In some embodiments, a web browser and / or independent client application is installed at each client, so that users can use client devices to access certain applications hosted by data center 250. Network 254 can be the Internet, a private network, a hybrid network, or any other communication network.

[0052] In the example shown, the networking layer 255 including networking devices such as routers, switches, etc. forwards requests from client devices 252 to the distributed network service platform 203. In this example, the distributed network service platform 203 includes multiple servers configured to provide distributed network services. Physical servers (e.g., 202, 204, 206, etc.) have hardware components and software components and can be implemented using devices such as 100. In this example, the hardware of the server (e.g., 208) supports operating system software, in which multiple virtual machines (VMs) (e.g., 218, 219, 220, etc.) are configured for execution. VM is a software implementation of a machine (e.g., a computer) that simulates the way a physical machine executes a program. The part of the server operating system that manages VMs is called a hypervisor. The hypervisor interfaces between physical hardware and VMs, providing an abstraction layer for VMs. By managing the physical hardware resources shared by VMs, the hypervisor makes each VM appear to be running on its own dedicated hardware. Examples of hypervisors include VMware Workstation. and OracleVM VirtualBox Although physical servers supporting a VM architecture are extensively shown and discussed for example purposes, servers supporting other architectures, such as container-based architectures (e.g., Kubernetes) may also be used. Docker Mesos ), standard operating systems, etc.), and the techniques described in this article are also applicable. For example, in a container-based architecture, applications are executed in special containers instead of virtual machines.

[0053] In some embodiments, an instance of an application is configured to execute within a VM. Examples of such applications include web applications such as shopping carts, user authentication, credit card authentication, email, file sharing, virtual desktops, voice / video streaming, online collaboration, and the like.

[0054] One or more service engines (e.g., 214, 224, etc.) are instantiated on a physical device. In some embodiments, the service engine is implemented as software executed in a virtual machine. The service engine is executed to provide distributed network services for applications executed on the same physical server as the service engine and / or for applications executed on different physical servers. In some embodiments, the service engine is configured to enable appropriate service components that implement service logic. For example, a load balancer component is executed to provide load balancing logic to distribute business loads between application instances executed on local physical devices and other physical devices; a firewall component is executed to provide firewall logic to application instances on various devices; a measurement agent component is executed to collect metrics associated with business, performance, etc. associated with instances of applications, etc. Many other service components can be appropriately implemented and enabled. When a specific service is required, the service engine configures and calls the corresponding service component to execute in the VM.

[0055] In the example shown, traffic received on a physical port of a server (e.g., a communications interface, such as Ethernet port 215) is sent to a virtual switch (e.g., 212). In some embodiments, the virtual switch is configured to intercept incoming traffic specified for (one or more) applications in an inline mode using an API provided by the hypervisor, and send the traffic to an appropriate service engine. In inline mode, packets are forwarded without duplication. As shown, the virtual switch passes traffic to a service engine in a distributed network service layer (e.g., a service engine on the same physical device), which transforms the packets when necessary and redirects the packets to the appropriate application. The service engine redirects traffic to the appropriate application executed in the VM on the server based on factors such as configured rules and operating conditions. Details of the virtual switch and its operation are not within the scope of this application.

[0056] Controller 290 is configured to control, monitor, program and / or supply distributed network services and virtual machines. In particular, the controller includes a metric manager 292 configured to collect performance metrics and perform analysis operations. The controller can be implemented as software, hardware, firmware or any combination thereof. In some embodiments, the controller is implemented on a system such as 100. In some cases, the controller is logically implemented as a single entity, but multiple instances of the controller are installed and executed on multiple physical devices to provide high availability and increased capacity. In an embodiment implementing multiple controllers, known techniques such as those used in distributed databases are applied to synchronize and maintain data consistency between controller instances.

[0057] In the data center 250, one or more controllers 290 collect metric data from various nodes operating in the data center. As used herein, a node refers to a computing element that is a source of metric information. Examples of nodes include virtual machines, networking devices, service engines, or any other suitable elements in a data center.

[0058] The controller can collect many different types of metrics. For example, since the traffic to and from the application (e.g., connection requests and responses, etc.) will pass through the corresponding service engine, metrics related to the performance of the application and / or the VM executing the application can be collected directly by the corresponding service engine. As another example, in order to collect metrics related to client responses, the service engine sends a script to the client browser or client application. The script measures the client response and returns one or more collected metrics to the service engine. In both cases, the service engine sends the collected metrics to the controller 290. In addition, infrastructure metrics related to the performance of other components of the service platform (e.g., metrics related to networked devices, metrics related to the performance of the service engine itself, metrics related to host devices, such as data storage and operating system performance, etc.) can be collected by the controller. Specific examples of metrics include round-trip time, latency, bandwidth, number of connections, etc.

[0059] The components and arrangement of the distributed network service platform 203 described above are for illustration purposes only. The technology described herein is applicable to network service platforms with different components and / or arrangements.

[0060] Figure 3 3 is a flow chart illustrating an embodiment of a process for statistically characterizing the performance of a distributed network, such as a network employing system 200. In some embodiments, process 300 may be implemented using service engines 214, 224 and / or controller 290. Thus, process 300 is described in the context of system 200. In other embodiments, other and / or additional components may be used to analyze the performance of a distributed network.

[0061] In step 302, performance metrics for sources in distributed network 200 are obtained. Step 302 may include performance data of clients, service engines or other components in collection system 200. Data may be collected by the service engine itself, a metric agent, a script sent to another component by the service engine, or otherwise. For example, each service engine (214, 224, etc.) may determine the latency of each transaction completed by the service engine within a specific time interval. Other metrics, such as client response, connection, available storage device or bandwidth, may also be monitored via scripts sent to clients or other components. Components such as one or more VMs (218, 219, 220...) may be configured to report selected performance metrics periodically or in response to specific event reports. Therefore, the metric data obtained in step 302 may come from components such as applications, VMs and / or clients, which are dispersed across multiple physical machines. Data related to such performance metrics are provided to the corresponding service engine.

[0062] Using the information obtained in step 302, a statistical summary is generated via step 304. The generation of the statistical summary includes calculating multiple statistical values ​​that describe the performance metrics. A single statistical summary can be provided for all performance metrics associated with the source. In other embodiments, a separate statistical summary can be provided for each performance metric of each source. For example, in step 304, a statistical summary may be provided only for the transaction latency of each service engine. Alternatively, the single statistical summary provided in step 304 may incorporate not only the transaction latency, but also other performance characteristics of the service engine or other components. (One or more) service engines may generate a statistical summary in step 304.

[0063] The statistical summary provided in step 304 statistically describes the performance of the service engine or (one or more) other components. Therefore, it is not necessary to store the raw data of the performance metric in a central storage device. Instead, the statistical summary uses the quantities calculated and stored in step 304 to provide a sufficient description of the performance metric. The statistical summary may include one or more of the number of data points, mean, standard of deviation, variance, confidence interval, minimum, maximum, and / or other statistics of interest for the performance metric. For example, a statistical summary of transaction delays managed by the service engine may include one or more of the number of transactions completed within a time interval, the average delay, the standard of deviation of the delay, the variance of the delay, the confidence interval of the delay, the minimum delay of the interval, and the maximum delay of the interval. A confidence indicator is a measurement of the value of a certain percentage of the sample space. For example, a confidence indicator may be the delay range of 90% of the transactions occurring during the interval. The confidence interval may therefore be represented by a range of values ​​up to the ninetieth percentile of the sample space and the number of values ​​within the percentile. For a service engine that completed 200 transactions within the interval, where 90% of the transactions were completed within one second, the confidence interval may be one second (the 90th percentile latency range) and one hundred and eighty seconds (90% of the transactions). In alternative embodiments, other and / or additional quantities may be included in the statistical summary.

[0064] At step 306, the statistical summaries are aggregated to provide a system-level statistical description for the distributed network. Step 306 may be performed by the controller 290. Thus, the service engines may provide their statistical summaries to the controller 290, which combines the summaries in a manner that preserves the statistical information in the summaries and generalizes the information to the entire network (or a predefined portion thereof). In some embodiments, the metric manager 292 performs this function. In other embodiments, step 306 may be performed by other / additional (one or more) components. The system-level statistical description statistically characterizes the performance of the entire distributed network (or a subset of the distributed network including multiple service engines) in a probabilistic manner. The system-level statistical description may include the total number of data points for the performance metric, the system-level mean, the system-level deviation standard, the system-level variance, the system-level confidence interval, the system-level minimum value, and the system-level maximum value. In the example of transaction latency described above, the system-level statistical description may include the total number of transactions in the distributed network completed within the interval, the system-level average latency, the deviation standard of the system-level latency, the variance of the system-level latency, the confidence interval of the system-level latency, the system-level minimum latency, and the system-level maximum latency.

[0065] The aggregation in step 306 can be performed in a variety of ways consistent with statistical / probabilistic rules. In some embodiments, a weighted sum of each statistic in the statistical summary is calculated for each metric. For latency, the mean, standard deviation, variance, confidence interval, minimum, and maximum values ​​can be weighted by measurements of the number of transactions for the service engine over the corresponding time interval. For example, the above quantities can be weighted by the number of transactions for the service engine or a portion of the total number of transactions completed for the service engine. Other statistically valid mechanisms for weighting and / or integrating the values ​​in each summary can be used. Thus, system-level values ​​are based on the values ​​in each statistical summary, but take into account a portion of the sample space represented by the summary.

[0066] Using method 300, statistical summaries of individual service engines are used to determine system-level performance of a distributed network. Thus, a system-level statistical description can be quickly obtained without transferring raw data of performance metrics to a mass storage device or other component, batch storage, and / or analysis. Instead, a system-level statistical description can be used. In addition, other quantities of interest can be calculated using the system-level statistical description. Real-time or near-real-time performance can be determined, and adjustments can be made to system operations.

[0067] Figure 4 4 is a flow chart illustrating an embodiment of a method 400 for statistically characterizing transaction latency of a distributed network, such as a distributed network utilizing system 200. In some embodiments, process 400 may be implemented using a service engine and a controller, such as service engines 214, 224 and controller 290. Thus, method 400 is described in the context of system 200. In other embodiments, other and / or additional components may be used to analyze the performance of a distributed network. As with analyzing performance metrics, method 400 is also described in the context of transaction latency. However, method 400 may be applied to other performance metrics.

[0068] In step 402, transaction latency of service engines in the distributed network is obtained. Step 402 may include each service engine determining the latency of transactions completed for the service engine within a specific time period. As discussed above, a metric agent, script, or other data collection mechanism may also be used.

[0069] At step 404, latency is organized into buckets based on latency values. Each bucket corresponds to a certain percentage of latency. For example, if ten buckets are used, each bucket can correspond to ten percentiles. For example, bucket 1 can be used for transactions with the lowest latency from zero to the tenth percentile, bucket 2 can be used for transactions with the second smallest latency greater than the tenth percentile and not greater than the twentieth percentile, and so on. In another embodiment, another number of buckets can be used. For example, each service engine may organize latency into twenty buckets, each corresponding to five percentiles. All service engines can use the same number of buckets. In an alternative embodiment, different service engines can use different numbers of buckets. Since the latency is stored in the bucket based on the value of each latency, the buckets typically contain data for different numbers of transactions.

[0070] At step 406, the desired statistics are calculated for each bucket in each service engine. For example, the statistics calculated for each bucket may include the number of transactions in the bucket, the mean of the latency in the bucket, the standard of deviation of the latency of the bucket, the variance of the latency of the bucket during the interval, the confidence interval of the latency of the bucket, the minimum latency of the bucket within the interval, and the maximum latency of the bucket during the interval. The statistics calculated for all buckets of the service engine can be considered as a statistical summary of the service engine. Therefore, steps 404 and 406 can correspond to step 304 of method 300 (determining the statistical summary of the service engine).

[0071] The statistical summary of each service engine is provided to the controller via step 408. Thus, the statistics of the buckets of the service engines are transmitted to the controller. Since the statistical analysis has been performed on the data collected in step 402 for each service engine, there is no need to transmit the raw data from the service engine to the controller.

[0072] The controller 290 combines the buckets for the service engines in a manner that complies with statistical criteria, thereby providing a system-level bucket via step 410. The controller 290 thus generates a system-level statistical description for the distributed network. The controller can hierarchically combine buckets by merging two buckets into the bucket at each level until the number of buckets for all service engines has been merged into the desired number of system-level buckets. Merging buckets can include providing a weighted sum of the values ​​in each bucket. Other statistically acceptable methods can also be used. In some embodiments, the number of system-level buckets is the same as the number of buckets for each service engine. The merging in step 410 is performed so that each system-level bucket includes statistics for system-wide transactions at the appropriate percentile. For example, system-level bucket 1 can be used for all transactions in the network with the lowest latency from zero to the tenth percentile, system-level bucket 2 can be used for all transactions in the network with the second smallest latency greater than the tenth percentile and not greater than the twentieth percentile, and so on. Because the buckets are merged in step 410, each system-level bucket may include the total number of transactions for the percentile range of the bucket, the system-level average latency for the percentile range, the system-level latency deviation standard for the percentile range, the system-level latency variance for the percentile range, the system-level confidence interval for the percentile range, the system-level minimum latency for the percentile range, and the system-level maximum latency for the percentile range. It may be considered to combine the statistics in the system-level buckets to form a system-level statistical description of latency.

[0073] The merging of buckets in step 410 can be performed in a variety of ways. In some embodiments, a weighted sum of each statistic is calculated for each bucket that is combined. For example, the merged mean can be determined by multiplying the mean of the first bucket by the number of transactions in the first bucket, multiplying the mean of the second bucket by the number of transactions in the second bucket, and then dividing the number by the sum of the transactions in the first and second buckets. Therefore, the transactions served by each service engine and the total number of transactions for the system can be used in step 410. In addition, merging buckets in step 410 can take into account the range of values ​​in each bucket. In some cases, the ranges of values ​​in different service engines do not overlap. In such an embodiment, the merging in step 410 can be simplified. For example, Figure 5Depicted is a merge of buckets for four service engines whose scopes do not overlap and whose transaction counts are similar. Service Engine 1 (first SE) has buckets 502A and 504A. Service Engine 2 (second SE) has two buckets 512A and 514A. The third SE has buckets 522A and 524A. The fourth SE has buckets 532A and 534A. Thus, each bucket (502A, 504A, 512A, ...) describes fifty percent of the transactions served by the corresponding service engine. The first SE has the lowest latency, the second SE has the second lowest latency, the fourth SE has the second highest latency, and the third SE has the highest latency. Thus, the buckets of each service engine are combined only, for example, via a weighted sum. Buckets 502A and 504A are combined into 542A. Buckets 512A and 514A are combined into bucket 544A. Buckets 522A and 524A and buckets 532 and 534A are combined into buckets 548A and 546A, respectively. In this example, the service engines process approximately the same number of transactions. However, if the number of transactions varies substantially between service engines, buckets 502A to 534A may be combined in another manner. Buckets 542A, 544A, 546A, and 548A are merged into system-level buckets 552A and 554A.

[0074] Figure 6 An exemplary embodiment is depicted for a situation in which service engines have latencies within overlapping ranges and have similar numbers of transactions. In this case, the first SE has buckets 502B and 504B; the second SE has buckets 512B and 514B; the third SE has buckets 522B and 524B; and the fourth SE has buckets 532B and 534B. Because the latency ranges of the service engines overlap, the buckets are combined differently. Thus, for example, buckets 402B and 522B are combined into bucket 542B using a weighted sum. Buckets 504B and 512B are combined into bucket 544B. Buckets 514B and 532B are merged into bucket 546B. Buckets 524B and 534B are merged into bucket 548B. Similarly, buckets 542B and 546B are merged into system-level bucket 552B. Similarly, buckets 544B and 548B are merged into system-level bucket 554B. Although representing data for a large portion of the system, buckets 542B, 544B, 546B, 548B, 552B, and 554B do not need to contain a large amount of data. This is because the data contained in each bucket is a statistical summary of the transactions they describe. In addition, in this combination, the service engines process approximately the same number of transactions. However, if the number of transactions varies significantly between service engines, then buckets 502B to 534B may be combined in another way.

[0075] Using method 400, the system-level performance of the distributed network is determined using statistical summaries of the individual service engines. Thus, a system-level statistical description can be quickly obtained without requiring the storage and analysis of large amounts of raw data for performance metrics. Using the statistical description, other quantities of interest can be calculated. In addition, real-time or near-real-time performance can be determined, and adjustments can be made to system operations.

[0076] Some embodiments of the present invention provide a method for collecting metric values ​​related to the operation of a set of one or more resources executed on a host computer in a data center. In some embodiments, the set of resources includes a set of one or more applications for which a middlebox service is executed on the host computer (e.g., a cluster of web servers, application servers, or database servers), and the metric is the latency experienced by packets processed by the set of applications.

[0077] In some embodiments, the method collects and analyzes samples hierarchically, wherein a first set of samples are collected and analyzed in a data plane, and a second set of samples are collected and analyzed in a control plane by aggregating samples collected in the data plane. In some embodiments, the data plane includes a host computer on which a sample collection engine (e.g., a service engine) is executed, and the control plane includes a set of one or more servers that obtain sample data collected by the host computer and aggregate and analyze the data.

[0078] At a particular host computer, in some embodiments, the method repeatedly identifies different sample values ​​for a particular operational metric. During a first time period, the method identifies a first set of sample metric values ​​and generates an individual value (IV) first histogram that specifies the number of samples that the method has processed for each of several metric values. Based on the IV first histogram, the method specifies several bins (i.e., metric value ranges) for a sample value range (SVR) second histogram.

[0079] During the second time period, the method identifies a second set of sample values ​​and generates an SVR second histogram to specify the number of samples that the method has processed for each range in a set of specified ranges in the second histogram. The method then provides the SVR second histogram to the server for analysis in order to evaluate the operation of the resource set in the data center. For example, in some embodiments, the method provides the SVR second histogram to one or more server sets to aggregate with SVR second histograms generated by several other host computers for a particular operational metric.

[0080] Figure 7A process 700 is illustrated that implements the metric collection method of some embodiments. As further described below, the process 700 generates two SVR histograms, namely, a first SVR histogram that processes bins with fixed sizes identified based on an initial IV histogram, and a second SVR histogram that processes bins with variable sizes identified based on the first SVR histogram. The process 700 iteratively reports the variable-sized bin histograms to a set of servers, then generates and reports new variable-sized bin histograms, and for each generation of the histogram, it may modify the location and / or size of the bins to match the metric samples collected for its last generated histogram.

[0081] In some embodiments, process 700 is performed by a service engine that executes on a particular host computer and identifies different metric values ​​for different packets on which the service engine executes middlebox services. Figure 8 The process 700 is described by the example shown in , which presents several load balancing engines 805 executing as service virtual machines (SVMs) on several host computers 810, which distribute packet processing load among several server applications 815 in a server application cluster 820 executing on host computers in a data center.

[0082] In this example, the packets distributed by the load balancer between the server applications 815 of the application cluster 820 come from other client applications running in the same data center. In addition, in this example, the client and server applications 815 operate as guest virtual machines (GVMs) executed on the host computer 810. In other embodiments, the load balancer 805 and the applications are implemented differently, for example, as containers, hypervisor service engines, etc. The host computers 810 communicate with each other and with the controller 875 set through the network 860 of the data center.

[0083] exist Figure 8 In the example shown in , a load balancer 805a executing on a host computer 810a acts as the master load balancer for an application cluster 820. In this role, the load balancer 805a not only summarizes the latency experienced by packets forwarded by the load balancer 805a from different clients 850 to different applications 815 of the application cluster 820 by generating variable-sized bin histograms, but also performs process 700 for the application cluster 820 by defining and updating bin structures for these variable-sized bin histograms.

[0084] In this example, other load balancers also perform a portion of process 700 to define variable-sized bin histograms of packets that they forward to the application cluster, but these load balancers use the bin attributes (e.g., bin location and size) provided by load balancer 805a for the histograms they generate. In some embodiments, these other load balancers executing on other host computers 810 perform process 700 in its entirety for other application clusters 820.

[0085] An approach having one service engine (e.g., on a load balancer) that acts as a master service engine for defining the bin structure for all service engines for a particular operational metric is beneficial because it allows the variable-sized bin histograms that the service engine provides to a collection of servers for aggregation to have the same bin structure (i.e., the same bins, in the same location, and of the same size) to simplify aggregation of the provided histograms. However, other embodiments use other techniques to define the bin structure, including having the collection of servers define the bin structure for the variable-sized bin histogram based on samples / histograms provided by the service engine or based on sample values ​​collected by the collection of servers in a previous setup or a previous sample collection cycle.

[0086] Will also refer to Fig. 9 The process 700 is described with reference to an example of a load balancing process 900 of FIG. While the load balancer 805 a is performing the process 700, all load balancers 805 (including the load balancer 805 a) are continuously performing the process 900 to distribute different packet flows between different server applications 815 in the server application cluster 820 and to identify and record the delays experienced by the packets in these flows.

[0087] As shown, process 900 begins when a load balancer receives (at 905) a packet to forward to an application cluster. Process 900 then identifies (at 910) an application 815 in cluster 820 that should process packets of the received packet flow. When the received packet is the first packet received for the flow, process 900 performs a load balancing operation (e.g., by using a weight value indicating a round-robin selection operation) to select an application in cluster 820 that should process the flow of received packets and stores the identity of the application selected for the flow of packets in a connection tracking storage device.

[0088] On the other hand, when the received packet is not the first packet received for its flow, process 900 uses records in the connection tracking storage device to identify the application selected for the packet flow (e.g., by matching the received packet flow identifier with the flow identifier of the record in the connection tracker that specifies the application in the cluster specified by the flow identifier).

[0089] Next, at 915, the process forwards the packet to the identified application. At 920, the process 900 identifies and stores the latency value of the packet if the process 900 needs to track such values ​​for received packets. In some embodiments, the load balancers store latency values ​​for all packets they process (i.e., store latency sample values), while in other embodiments, the load balancers only store latency values ​​for a subset of the packets they process because collecting such samples of all processed packets is computationally and resource intensive.

[0090] In addition, in some embodiments, the load balancer calculates the latency value of the processed packet by interacting with the client 850 (i.e., the client application) as the source of the processed packet to identify the round trip time of the packet from when it leaves the client to when the client receives a response packet returned from the application 815 that received the processed packet. In other embodiments, the load balancer calculates the latency value in a different manner, for example, calculating the time interval from when it receives the packet to when it receives the response packet from the application 815. After 920, the process ends.

[0091] As described above, in some embodiments, Figure 7 The process 700 is performed by a service engine. The process 700 initially generates (at 705) an individual value (IV) histogram for a first set of sample metric values ​​(e.g., latency values) processed by the service engine during a first time period. The generated IV histogram specifies the number of samples that the service engine has processed for each of several metric values.

[0092] To generate such a histogram, process 700 maintains a list of metric values ​​stored by value, and for each metric value on the list, maintains a number representing the number of times the service engine identified the metric value for the processed packet within the first time interval. In different embodiments, process 700 implements the list in different ways. For example, in some embodiments, the process implements the list as a sorted linked list, where each entry in the list stores a metric value and a sample count value, while in other embodiments, it implements the list as a sorted array. In other embodiments, process 700 has a different implementation of the list.

[0093] Fig.10 An example of an IV histogram 1000 generated for a sample of 100 latency values ​​processed by a load balancer in some embodiments is illustrated. In this example, the histogram is defined along an x-axis representing individual latency values ​​and a y-axis representing the number of samples. Thus, for each latency value represented in the histogram, the histogram specifies the number of times the load balancer has recorded a latency value for a packet. In the histogram, 50 samples have a latency of 0 to less than 50 milliseconds (ms), while another 50 samples have a latency between 51 and 100 ms.

[0094] In some embodiments, process 700 allocates a first amount of memory of its host computer for the generated IV histogram. When the process detects that the generated IV histogram has consumed a second amount of memory within a threshold size of the first amount, process 700 switches to 710 to define bins of a fixed-size box histogram for the next batch of sample values ​​it should analyze. In some embodiments, a subprocess of process 700 continues to generate an IV histogram while defining bins for the fixed-size box histogram, while in other embodiments, process 700 stops generating an IV histogram when process 700 begins defining bins for the fixed-size box histogram.

[0095] In some embodiments, the fixed-size box histogram includes fixed-size boxes about the metric values ​​identified along the IV histogram. In many cases, the IV histogram does not have sample values ​​for the entire possible range of values ​​that the method may handle. To account for this problem, in some embodiments, the process 700 selects a fixed size for the box histogram at 710 to evenly cover the expected range of sample values.

[0096] for Fig.10 The example shown in Fig.11 An example of fixed-size bins generated at 710 for a fixed bin histogram in some embodiments is illustrated. In this example, 54 bins are defined with respect to sample values ​​identified by the IV histogram, each with a bin size of 2. In this example, the last four bins are defined for delays exceeding 100 ms, even though the histogram 1000 does not identify any such delays, in order to provide a buffer for identifying potentially larger delays. However, other embodiments do not generate such additional bins, or do not use them as a larger sample value buffer.

[0097] After specifying the bin locations and sizes for the fixed-size bin histogram, the process 700 generates (at 715) a fixed-size bin histogram by processing another set of sample values ​​in a second time period. The histogram specifies the number of samples that the process has analyzed for each of its fixed-size bins. In some embodiments, the process 700 generates a fixed-size bin histogram by stepping through the sample values ​​and, for each sample value, identifying the histogram bin corresponding to the sample value (i.e., specifying a bin that contains a range of values ​​for the processed sample value) and incrementing the sample count of the identified bin by one.

[0098] for Fig.11 The example shown in Fig.12An example of a fixed-size bin histogram 1200 generated by process 700 at 715 in some embodiments is illustrated. The histogram corresponds to 1000 samples analyzed by process 700. In the histogram, the sample counts for buckets corresponding to latencies of 40 ms or less total 500, while the sample counts for buckets corresponding to latencies greater than 40 ms total 500. Thus, in this example, the median of histogram 1200 is 40 ms.

[0099] Process 700 generates (at 715) a fixed-size box histogram until it determines that it should be converted to a variable-size box histogram. The process makes this determination based on different criteria in different embodiments. For example, in some embodiments, the process generates a fixed-size box histogram only for a certain number of samples, while in other embodiments, it generates the histogram only for a certain period of time.

[0100] Once the process determines (at 715) that it should switch to a variable-sized bin histogram, the process uses (at 720) the fixed-sized bin histogram to identify the locations and sizes of the bins of the variable-sized bin histogram. In different embodiments, the process 700 performs this operation 720 differently. For example, for a variable-sized bin histogram, in some embodiments, the process 700 assigns an x-width bin to the bottom 50% of sample values ​​identified by the fixed-sized bin histogram, assigns N y-width bins to the next 40% of sample values ​​identified by the fixed-sized bin histogram, and assigns M z-width bins to the last 10% of sample values ​​identified by the fixed-sized bin histogram, where N and M are integers, and x is greater than y, and y is greater than z.

[0101] For example, from Fig.12 In the fixed bin histogram example, in some embodiments, process 700 generates Fig.13 The variable-sized bins are shown in . These bins are used for the variable-sized bin histogram that process 700 should generate next. Based on the fixed bin histogram 1200, process 700 (1) defines ten buckets for the variable-sized bin histogram, (2) assigns the first bucket to be centered at 20 ms and have a width of 20 ms, (3) assigns the next four buckets of the variable-sized bin histogram to be centered at 45, 55, 65, and 75 ms, respectively, with a width of 10 ms each, and (4) assigns the last five buckets of the variable-sized bin histogram to be centered at 82, 86, 90, 94, and 98 ms, respectively, with a width of 4 ms each. Fig.13 In , the buckets are identified by their leftmost and rightmost values ​​to simplify their description.

[0102] The approach is optimized to identify the maximum latency values ​​experienced by 50%, 90%, and 99% of the samples because it (1) creates a first bucket to capture the bottom 50% of the expected sample value range based on what it previously processed for the fixed value histogram, (2) creates four buckets for the next 40% of the expected sample value range based on what it previously processed for the fixed value histogram, and then (3) creates five buckets for the last 10% of the expected sample value range based on what it previously processed for the fixed value histogram.

[0103] After specifying (at 720) the bin locations and sizes for the variable-sized bin histogram, the process 700 provides (at 725) the bin locations and sizes of the histogram to other service engines on other host computers 810 so that they can begin generating their variable-sized bin histograms based on those bins. Figure 8 A load balancer 805a is depicted that provides data about boxes of variable size to other load balancers 805 executing on other host computers 810. Fig.19 Describe the operation of these other load balancers to generate their variable-sized bin histograms.

[0104] Next, the process generates (at 730) a variable-sized histogram by processing another set of sample values ​​in a third time period. The histogram specifies the number of samples that the process has analyzed for each bin. In some embodiments, the process 700 generates a variable-sized bin histogram by stepping through the sample values ​​and, for each sample value, identifying the histogram bin corresponding to the sample value (i.e., the bin specifying the value range that contains the processed sample value) and incrementing the sample count of the identified bin by one.

[0105] for Fig.13 The example shown in Fig.14 An example of a variable-sized bin histogram 1400 generated by the process 700 at 730 in some embodiments is illustrated. The histogram corresponds to 1000 samples analyzed by the process 700. As shown, 450 samples fall into the first bin 1405 of the histogram, 50 samples fall into the second bin 1410 of the histogram, and the remaining 500 samples fall into the other seven buckets of the histogram. Therefore, when the 500th sample is located in the second bucket 1410, the median latency has changed from 40ms expressed by the histogram 1200 of the fixed bin size to 50ms. In addition, the histogram shows that the 90% and 99% latency values ​​are 80 and 98ms, because the 900th and 990th samples fall into the buckets 1415 and 1420 corresponding to these values.

[0106] Process 700 generates (at 730) a variable-sized box histogram until it determines that it should report the histogram to a set of servers. The process makes this determination based on different criteria in different embodiments. For example, in some embodiments, the process generates a variable-sized box histogram only for a certain number of samples, while in other embodiments, it generates the histogram only for a certain period of time.

[0107] Once the process determines (at 730) that it should provide a variable-sized bin histogram to a collection of servers, the process transmits (at 735) the histogram over the network to the server for analysis to evaluate the operation of the collection of resources in the data center. Figure 8 In the example shown in , load balancer 805a provides a variable-sized histogram to a set of one or more controllers 875. As described further below, the set of controllers 875 aggregates the histogram with variable-sized bin histograms generated by other load balancers 805 executing on other host computers 810 for identified latencies for packets forwarded to application cluster 820.

[0108] Fig.15 An example of how a load balancer reports its variable-sized bin histogram in some embodiments is illustrated. As shown, in some embodiments, the load balancer reports its histogram as a table with multiple records representing multiple bins. The record for each bin has a delay value that represents the maximum delay associated with the bin, where the minimum value is the maximum delay value of the previous bin, or 0 if it is the first bin. The record for each bin also has a sample count that identifies the number of processed samples that fall into the bin. In other embodiments, the load balancer reports its histogram in different ways. Other embodiments use other schemes to specify the bin structure. For example, some embodiments define each bin according to its midpoint and its width. In some of these embodiments, the width of the bin is specified based on an error percentage.

[0109] After sending (at 735) the variable-sized bin histograms to the set of servers, the process 700 performs (at 740) bin modification operations to determine whether it needs to modify the positions and / or sizes of the bins of the next variable-sized bin histogram, or whether it can use the same exact bins as the last variable-sized bin histogram it provided to the set of servers. To this end, in some embodiments, the process 700 analyzes the sample counts expressed by the previous variable-sized bin histogram to determine whether the positions and sizes of the first bin, the last bin, and the middle bins reflect the expressed sample counts, and if not, it modifies the positions and / or sizes of those bins.

[0110] for Fig.14In the example shown in , after the median was initially determined to be approximately 40 ms for the fixed-size box histogram, the median has shifted to 50 ms. Thus, in some embodiments, the process creates a variable-size box histogram for the next Fig.16 The box shown in . Fig.16 , the next variable bin size histogram has (1) ten buckets, (2) the first bucket centered at 22.5 ms and 22.5 ms wide, (3) the next four buckets centered at 50, 60, 70, and 80 ms, 10 ms wide each, and (4) the last five buckets centered at 86.5, 89.5, 92.5, 95.5, and 98.5 ms, 3 ms wide each. Similarly, in Fig.16 In , the buckets are identified by their leftmost and rightmost values ​​to simplify the illustration.

[0111] At 740, if the process 700 changes the bin structure, the process 700 provides the new bin structure for the next variable-sized histogram to other service engines, or notifies the service engine that it has not changed the bin structure. After 740, the process returns to 730 to generate the next variable-sized bin histogram. The process loops between 730-740 until an external event (e.g., an instruction from a server or termination of operation of its service engine) causes the process 700 to close.

[0112] In other embodiments, the main service engine's process 700 dynamically creates its variable-sized box histogram differently. For example, after generating (at 705) its IV first histogram, the process defines (at 710) an SVR second histogram from the IV first histogram, rather than generating a fixed-size box histogram from the IV first histogram. Fig.17 An example of how the process 700 defines a second SVR histogram based on the generated IV first histogram is illustrated. As shown, Fig.17 The SVR second histogram in has (1) one bin based on the bottom 25% of the samples of the IV first histogram, (2) four bins for the next 25% of the samples of the IV first histogram, (3) seven bins for the next 40% of the samples of the IV first histogram, and (4) another nine bins for the last 10% of the samples of the IV first histogram.

[0113] Based on the next set of samples it processes, the method then processes the next 1000 samples to generate (at 715) an SVR second histogram and uses that histogram to define (at 720) the bins for an SVR third histogram. Fig.18 An example of a generated SVR second histogram 1800 is illustrated. As shown, the histogram shows that the median has moved from 50 ms to 42 ms. Fig.17 and Fig.18 The approach shown in has the advantage of preventing the method from creating too many bins for its second histogram based on outlier sample values ​​identified in the first histogram.

[0114] Fig.19 The process 1900 is illustrated as being performed by another service engine based on its Figure 7 The other service engine generates its variable-sized bin histogram based on the bin size / position attributes received by process 700. The other service engine generates its variable-sized bin histogram to summarize the metric values ​​collected by the service engine for a particular operational metric when it performs services on the packets it receives. Unlike process 700, process 1900 does not generate bin attributes for its variable-sized bin histogram by first generating an IV histogram and then generating a fixed-sized bin histogram for the samples it collects.

[0115] Instead, because process 700 is designated as the master process for the particular operational metric for which all service engines generate variable-sized bin histograms, it obtains the bin attributes for its variable-sized bin histogram from process 700. In some embodiments, while it waits to obtain the bin attributes from process 700, the service engine executing process 1900 continues its collection of sample metric values ​​so that it can generate its variable-sized bin histogram using those values ​​and other sample values ​​collected after it began generating that histogram.

[0116] As shown, process 1900 initially starts from Figure 7 The process 700 receives (at 1905) bin size / location attributes. Based on these received bin attributes, the process 1900 then generates (at 1910) a variable-sized histogram by processing a set of sample values ​​it has identified for a particular operational metric over a period of time. The histogram specifies the number of samples that the process has analyzed for each of its bins. In some embodiments, the process 1900 generates a variable-sized bin histogram by stepping through the sample values ​​and, for each sample value, identifying the histogram bin corresponding to the sample value (i.e., the bin specifying the range of values ​​that contains the processed sample value) and incrementing the sample count of the identified bin by one.

[0117] Process 1900 generates (at 1910) a variable-sized box histogram until it determines that it should report the histogram to a set of servers. In different embodiments, the process makes this determination based on different criteria. For example, in some embodiments, the process generates a variable-sized box histogram only for a certain number of samples, while in other embodiments, it generates the histogram only for a certain period of time.

[0118] Once the process determines (at 1910) that it should provide a variable-sized bin histogram to a collection of servers, the process transmits (at 1915) the histogram over the network to the server for analysis in order to evaluate the operation of the collection of resources in the data center. Figure 8 When the load balancer 805 of is executed, the load balancer forwards its identified latency histogram to the controller set 875, which then aggregates the histogram with variable-sized bin histograms generated by other load balancers 805 executing on other host computers 810 for the latencies identified for packets forwarded to the application cluster 820.

[0119] After 1915, process 1900 transitions to 1920, where it waits until it receives from process 700 the bin attributes for the next variable-sized bin histogram it should generate, or the direction to use the previous bin attributes. After receiving (at 1920) this input from process 700, process 1900 transitions back to 1910 to generate its next variable-sized histogram for the next time period. Process 1900 loops through its operations until an external event (e.g., an instruction from a server or termination of operation of its service engine) causes process 1900 to shut down.

[0120] Fig. 20 Illustrated is a process 2000 performed by a controller in some embodiments for a variable-sized set of bin histograms reported by a set of service engines for a particular operational metric. An example of such an operational metric is the latency experienced by packets forwarded to an application cluster by a set of load balancers. In some embodiments, the controller iteratively (e.g., periodically) performs process 2000. As shown, process 2000 initially collects (at 2005) variable-sized bin histograms from several service engines. In some embodiments, process 2000 instructs the service engines to provide their histograms, while in other embodiments, the service engines provide their histograms to the controller at set intervals.

[0121] As described above, some embodiments use one service engine as a master service engine that calculates the bin properties of the variable-sized histograms for all service engines to use. In these embodiments, this ensures that the collected variable-sized histograms all have the same bin properties, thereby simplifying the aggregation of these histograms by the controller. In some embodiments, the master service engine provides its initial variable-sized histogram to the controller before other service engines have a chance to generate their variable-sized histograms.

[0122] In some of these embodiments, the controller uses the provided histogram as an initial data set for generating an initial report, while in other embodiments, the controller stores the data set for later use with other reported histogram data from the main service engine and other service engines. In still other embodiments, the duration for which the main service engine generates its initial variable-sized box histogram is longer than the duration for which the other service engines do, so that the main service engine and the other service engines can report their initial histograms to the controller at the same time.

[0123] After collecting (at 2005) the histograms, the process 2000 aggregates the data (at 2005) to obtain a larger histogram for the operation of all reporting services engines in the most recent time period for the operation of all reporting services engines in the most recent time period. Fig.21 The controller 875 is illustrated as adding the data of the three reported histograms 2105, 2110, and 2115 to obtain the aggregated histogram 2120. As shown, in some embodiments, the controller simply adds the sample counts from all corresponding bins in each histogram to produce an aggregated sample count for each bin in the aggregated histogram. This can be achieved because all reported histograms have the same bin structure.

[0124] In some embodiments, the process 2000 also combines the aggregate histogram it generates with the previous aggregate histogram in its previous iteration. To this end, in some embodiments, the process 2000 uses a weighted sum approach that takes into account the previous aggregate histogram with a lower weight than the current aggregate histogram. This weighted approach also takes into account the movement of the bins over time.

[0125] Next, at 2015, the controller stores the aggregated histogram in a data storage device (e.g., a database) that a network administrator can access to obtain information about the collected operational metrics. For example, in some embodiments, one or more servers can access the data to provide a graphical display of the aggregated histogram, or provide the information in a tabular or textual form, for example, providing latency values ​​for 50%, 90%, and 99% of the processed packets. These servers provide access to the data through their user interfaces (e.g., management portals) or through their application programming interface (API) calls.

[0126] In some embodiments, the controller process 2000 also analyzes (at 2020) its aggregate histogram and the different histograms reported by the different service engines in order to perform certain actions. In some embodiments, the aggregate histogram analyzed at 2020 is the aggregate histogram generated by the process for its current iteration based on the histograms collected in that iteration, while in other embodiments, the aggregate histogram analyzed is the histogram generated for the entire several iterations of the process 2000. Similarly, in some embodiments, the process analysis of the different reported histograms is limited to the current iteration of the process, while in other embodiments, it takes into account the analysis of several reported histograms reported by each service engine over the entire several cycles of the process 2000.

[0127] For example, after analyzing the histogram data from the non-master service engines, in some embodiments, the process 2000 provides (at 2025) some of the histogram data to the master service engine so that the master service engine can analyze the data to adjust its bin properties (e.g., bin size and / or location) as necessary. Alternatively or in conjunction, after analyzing the histogram data from the non-master service engines, in some embodiments, the process 2000 instructs (at 2030) all service engines (including the master service engine) to use a new bin structure. In some embodiments, when the process 2000 detects that the bin structure defined by the master service engine is not suitable for other service engines (e.g., exceeds a threshold percentage of data collected by other service engines), the process 2000 provides the new bin structure to all service engines. In other embodiments, the process 2000 does not perform either or both of operations 2025 and 2030.

[0128] Rather than having one service engine acting as the master service engine that defines the bin structure for the variable-sized bin histograms generated by all service engines, some embodiments use a controller to define the bin structure. In some of these embodiments, a controller cluster collects IV histograms or fixed-sized bin histograms from service engines and aggregates these histograms into an aggregated histogram. Based on this aggregation, the controller cluster generates bin attributes for the variable-sized bin histograms and distributes this bin structure to the service engines for use in generating their variable-sized bin histograms.

[0129] Based on the analysis of the aggregated histogram, in some embodiments, the process 2000 may also provide (at 2035) new configuration data to the host computer to modify the operation of the service engine and / or the application cluster to improve one or more operational metrics, including the specific metric for which the service engine generates a histogram. For example, with the new configuration data, the controller process 2000 may deploy additional application instances (e.g., additional application VMs or boxes) and / or additional service engines (e.g., service VMs, etc.) in the application cluster.

[0130] In combination or alternatively, the new configuration data may direct one or more host computers to allocate more resources (e.g., memory, processor cores, network bandwidth, etc.) to the application cluster and / or service engine. Moreover, in some embodiments, the new configuration data may configure other elements in the data center, for example, configuring a front-end load balancer to distribute flows differently to different service engines. In other embodiments, the controller process 2000 does not perform one or more of operations 2020-2035.

[0131] Although the present invention has been described with reference to many specific details, those of ordinary skill in the art will recognize that the present invention may be implemented in other specific forms without departing from the spirit of the present invention. For example, although several examples for tracking latency for a service engine are provided above, those of ordinary skill in the art will recognize that some embodiments are used by a service engine or other forwarding or computing elements in a network to track other operational metrics in a data center. Therefore, those of ordinary skill in the art will understand that the present invention is not limited by the foregoing illustrative details, but is defined by the appended claims.

Claims

1. A method for collecting values ​​of specific operation metrics related to operations of a collection of resources executed on a host computer in a data center, the method comprising: At the first host computer, while identifying different sample values ​​of a particular operating metric, generating an individual value IV first histogram specifying a number of samples identified for each of a plurality of sample values ​​of the particular operational metric; For the sample value range SVR second histogram, specify a plurality of metric value ranges for the specific operation metric, each metric value range comprising at least one sample value and a related number of sample values ​​specified by the IV first histogram; generating the SVR second histogram that specifies the number of samples identified for each range in a set of specified metric value ranges specified for the particular operational metric; Providing the SVR second histogram to a server for analysis so as to evaluate the operation of the set of resources in the data center; as well as After providing the SVR second histogram to the server, at least two metric value ranges specified for the SVR second histogram are modified based on the number of sample values ​​specified for the plurality of metric value ranges by the generated SVR second histogram.

2. The method of claim 1, wherein providing the SVR second histogram comprises: The SVR second histogram is provided to a set of one or more servers for aggregation with the SVR second histograms generated by other sets of host computers for the particular operational metric.

3. The method of claim 1, wherein the first histogram and the second histogram are generated by a service engine on the first host computer, the service engine performing middlebox service operations on the first host computer.

4. The method of claim 3, wherein the middlebox service operation is one of a load balancing operation, a firewall operation, an intrusion detection operation, an intrusion prevention operation, and a network address translation operation.

5. The method of claim 1, wherein the IV first histogram is generated for samples identified in a first time period, and the SVR second histogram is generated for samples identified in a second time period after the first time period.

6. The method of claim 1, wherein The plurality of metric value ranges is a first plurality of metric value ranges, and Specifying a first plurality of metric value ranges for the SVR second histogram includes: For the SVR third histogram, specify a second plurality of metric value ranges for the specific operation metric; generating the SVR third histogram specifying the number of samples identified for each range in a set of specified metric value ranges in the second plurality of metric value ranges specified for the particular operational metric; as well as Based on the generated SVR third histogram, the first plurality of metric value ranges are specified.

7. The method of claim 6, wherein the range of metric values ​​specified for the SVR third histogram has a fixed size, and the range of metric values ​​specified for the SVR second histogram has a variable size.

8. The method of claim 1, wherein the SVR second histogram specifies values ​​of the particular operational metric for 50%, 90%, and 99% of the samples processed for the second histogram.

9. The method of claim 1, wherein the particular operational metric is a latency experienced by a set of packets processed at the first host computer.

10. The method of claim 1, further comprising: allocating a first amount of memory of the first host computer for the generated IV first histogram; detecting that the generated first histogram of IV has consumed a second amount of memory, the second amount being within a threshold size of the first amount; Based on the detection, the plurality of metric value ranges are specified and the SVR second histogram is generated.

11. The method of claim 10, further comprising terminating generation of the IV first histogram based on the detection.

12. A method for collecting values ​​of specific operation metrics related to operations of a collection of resources executed on a host computer in a data center, the method comprising: At the first host computer, while identifying different sample values ​​of the particular operating metric, generating an individual value IV first histogram specifying a number of samples identified for each of a plurality of sample values ​​of the particular operational metric; For the sample value range SVR second histogram, specify a plurality of metric value ranges for the specific operation metric, each metric value range comprising at least one sample value and a related number of sample values ​​specified by the IV first histogram; generating the SVR second histogram that specifies the number of samples identified for each range in a set of specified metric value ranges specified for the particular operational metric; modifying at least two metric value ranges specified for the SVR second histogram based on the number of sample values ​​specified for the plurality of metric value ranges by the generated SVR second histogram; Modify the generated SVR second histogram based on the modified metric value range; as well as The modified SVR second histogram is provided to a server for analysis so as to evaluate the operation of the resource set in the data center.

13. A machine-readable medium storing a program which, when executed by at least one processing unit, implements the method according to any one of claims 1 to 12.

14. An electronic device comprising: A collection of processing units; and A machine-readable medium storing a program which, when executed by at least one of the processing units, implements the method according to any one of claims 1-12.

15. An electronic system comprising means for implementing the method according to any one of claims 1-12.