Portions of some workloads and applications may be processed in parallel and independent of one another, while other workloads and applications may be processed sequentially. Large-scale machine learning applications may be distributed among numerous compute nodes for parallel processing, while single threaded applications may not be easily divisible.
Some computer systems may include a single core for sequential processing, while others computer systems may include multiple cores for parallel processing. The time required to execute a given application may depend on the way the application is written, the processor speed of the executing computer system, and the number of cores in the computing system.
The written disclosure herein describes illustrative examples that are nonlimiting and non-exhaustive. Reference is made to certain of such illustrative examples that are depicted in the figures described below.
As used herein, a compute cluster may be defined in terms of the collective available compute resources of multiple compute nodes, each of which may have a different number of cores for executing multithreaded applications. A compute cluster includes at least one compute node but may include multiple compute nodes. In a cloud computing environment, the various compute nodes can be selected to have homogeneous or near homogeneous compute resources. Some tasks, such as large-scale data processing, can be divided into any number of increasingly smaller and simpler workflows for parallel processing based on the number of discrete compute nodes and available compute resources. In contrast, single-threaded applications may benefit more from increased process speed instead of an increased number of processing cores.
As used herein, the term workload includes specific compute jobs or tasks and an associated or underlying dataset. For example, a workload may include the execution of a particular application or portion of an application. Each compute job or task may include instructions for actions to be taken with respect to the associated dataset. Thus, each compute job or task may include the execution of an application with respect to an associated dataset.
In some instances, it may be desirable to execute artificial intelligence or other machine learning applications using on-premises compute devices and/or edge devices. Unlike in a cloud computing environment, on-premises compute devices and edge devices may each have widely different compute resources. Thus, while a cloud computing environment can be modeled as a plurality of distributed compute clusters with homogeneous compute resources, on-premises and/or edge device networks are more accurately described as a plurality of distributed compute clusters with heterogeneous compute resources.
Examples of compute resources include, without limitation, central processing unit (CPU) resources, GPU resources, volatile memory resources, network communication capabilities, persistent storage resources, and the like. For example, compute resources of homogeneous or heterogeneous compute resources may be quantified and compared in terms of a function of one or more of available volatile memory, available persistent storage, processor clock speed, floating-point operations per second (“flops”), number of compute cores or processors, memory speed, network bandwidth, and the like. The assignment of machine learning workloads in a heterogeneous compute network can result in underutilization of some compute clusters and/or asynchronous learning parameter exchanges between compute clusters.
Some applications may be executable or at least partially executable by multicore processors in parallel, while others may not. For instance, a fully multithreaded application may be executed by a compute node having four cores much faster than if the same application is executed by a compute node having a single core. The performance difference between various compute node configurations may depend partially on the number of cores in each compute node, but only to the extent that the application being executed can take advantage of additional cores. Thus, a compute node with 12 cores may not necessarily execute an application faster than an otherwise similar compute node that only has 6 cores.
As used herein, the term “core” or “cores” may refer to physical or virtual cores (threads) implemented by processors and/or virtual machines. In many examples, the evaluation of what constitutes a “core” may be based on what is exposed to the operating system or operating systems of the machine (physical or virtual) on which the application is executed.
The presently described systems and methods may estimate the amount of time it will take to execute an application or other task on a given compute node. For example, some tasks or applications may not scale at all when additional cores are available. Such tasks or applications may have a thread scaling ratio of 1, indicating that the presence of additional cores will not result in a faster execution time of the task or application. In contrast, some tasks or applications may be fully scalable to utilize the full number of cores available. As described herein, some tasks or applications may partially scale to include a constant number or fixed ratio of utilized cores and reserved cores. The hyperparameters associated with each workload may be defined or adjusted to compensate for the different processing speeds and number of cores in each compute cluster to which it is assigned.
In one example, a workload orchestration system includes a discovery subsystem to identify the specific compute resources of each compute cluster in a network of computer clusters (e.g., heterogeneous compute clusters). The system may determine the number of cores available in the various compute clusters. A manifest subsystem may receive or generate a manifest that describes the resource demands for each workload associated with an application, such as a single-threaded application, an artificial intelligence application, a machine learning application, or other application. The system may estimate an execution time for the various workloads based on a scaling ratio associated with the workload and the number of cores in each compute cluster. A placement subsystem may assign each workload to one of the compute clusters by matching or mapping the resource demands of each workload and the compute resources of each compute cluster. The placement subsystem may assign each workload in further consideration of affinity, anti-affinity, and/or co-locality constraints and policies. An adaptive modeling subsystem may dynamically define (e.g., establish, set, or modify) hyperparameters for each workload as a function of the identified compute resources of the compute cluster to which each respective workload is assigned and the dataset.
For example, a discovery subsystem or module may determine a measured execution time for a first compute cluster with a first number of cores to execute a task. A manifest subsystem or module may identify resource demands for each workload. A scaling subsystem or module may calculate thread scaling ratios (e.g., minimum and maximum thread scaling ratios) for the application indicative of the scalability of the application across the compute clusters having variations in the number of cores. For example, the thread scaling ratios may be calculated based on a measured execution time for a first compute cluster with a first number of cores to execute the application.
A placement subsystem may assign each workload to one of the compute clusters by matching the identified resource demands of each respective workload using the calculated thread scaling ratios for the application and the identified compute resources of each compute cluster (including the number of cores in each respective compute cluster).
An adaptive modeling subsystem may define hyperparameters of each workload based, at least in part, on the calculated thread scaling ratio and the number of cores in each respective compute cluster to which each respective workload is assigned.
Various modules, systems, and subsystems are described herein as implementing functions and/or as performing various actions. In many instances, modules, systems, and subsystems may be divided into sub-modules, subsystems, or even as sub-portions of subsystems. Modules, systems, and subsystems may be implemented in hardware or as processor-executable instructions stored in, for example, a non-transitory computer-readable medium. Some examples may be embodied as a computer program product, including a non-transitory computer and/or machine-readable medium having stored thereon instructions that may be used to program a computer (or another electronic device) to perform processes described herein.
The examples of the disclosure may be further understood by reference to the drawings. It is readily understood that the components of the disclosed examples, as generally described and illustrated in the figures herein, could be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the examples of the systems and methods of the disclosure is not intended to limit the scope of the disclosure, as claimed, but is merely representative of possible examples of the disclosure. In addition, the elements of a method do not necessarily need to be executed in any specific order, or even sequentially, nor do the elements need to be executed only once, unless otherwise specified. In some cases, well-known features, structures, or operations are not shown or described in detail.
The discovery subsystem 152 identifies or otherwise profiles the individual compute resources of each of the compute clusters A, B, C, and Z (131, 132, 133, and 139) that are part of the heterogeneous compute clusters 130. The network of heterogeneous compute clusters 130 may include any number of compute clusters, but only four are illustrated in the example. The compute clusters A, B, C, and Z (131, 132, 133, and 139) may have various combinations of compute resources, graphically illustrated by bar charts in the lower right corner of each compute cluster 131-139. For instance, each compute cluster 131-139 may have different CPU resources, GPU resources, volatile memory resources, network bandwidth, network latency characteristics, persistent storage resources, or the like. Each compute cluster 131-139 may have a different number of cores, illustrated as M, N, P, and X integer values that differ from one another.
In some examples, the discovery subsystem 152 may identify the total (e.g., theoretical) compute resources of each compute cluster 131-139, currently available compute resources of each compute cluster 131-139, and/or expected or scheduled availability of compute resources of each compute cluster 131-139 during a future time window. Some compute clusters may have the same compute resources as one another, while others may be heterogeneous.
A scaling subsystem 153 may calculate thread scaling ratios for the application indicative of the scalability of each of a plurality of workloads for the various compute clusters. The thread scaling ratios may be calculated based on a measured execution time for a first computer cluster with a first number of cores. For example, the thread scaling ratios may be calculated based on a measured execution time for a first compute cluster with a first number of cores to execute the application. The system may calculate minimum and maximum estimated execution times for each respective compute cluster that has a different number of cores based on the thread scaling ratios. As described herein, the minimum and maximum thread scaling ratios may, in some instances, be the same value.
The manifest subsystem 158 may maintain a manifest that describes or specifies the resource demands for each of a plurality of workloads that implement the application service 105. In some examples, the manifest subsystem 158 divides the application service 105 into the plurality of workloads based on the compute resources of the compute clusters 131-139 identified by the discovery subsystem 152. For example, the workloads may be intentionally selected to have resource demands that correspond to the identified compute resources of the compute clusters 131-139. In other embodiments, the manifest subsystem 158 may receive a manifest that describes the resource demands of predefined workloads that are, for example, specified by the application service 105 independent of the identified compute resources of the compute clusters 131-139.
A placement subsystem 156 allocates each workload to one of the compute clusters 131-139. For example, the placement subsystem 156 may match workloads of the application service 105 as defined in the manifest subsystem 158 with compute clusters 131-139 by matching the resource demands of each respective workload with the identified compute resources of each of the compute clusters 131-139. The placement subsystem 156 may allocate workloads with compute clusters 131-139 based, at least in part, on the number of cores in each compute cluster and the calculated thread scaling ratio.
In some examples, the placement subsystem 156 implements resources-aware workload scheduling in which the resource demands comprise metrics corresponding to the identified compute resources of the compute clusters 131-139 (e.g., CPU resources, GPU resources, vCPUs, volatile memory resources, network bandwidth, network latency characteristics, persistent storage resources, or the like). In other examples, the placement system 156 additionally implements models-aware workload scheduling in which the allocation of workloads to the compute clusters 131-139 is further based on co-locality, anti-affinity and/or affinity constraints and policies of workloads.
In some examples, the placement subsystem 156 may relax or ignore locality constraints based on the available compute resources. The resulting fragmentation may be resolved through migration and defragmentation, as described herein. That is, while the placement subsystem 156 may implement resources-aware and models-aware workload assignments, sometimes the models-aware constraints may be relaxed or even ignored based on limitations of the available compute resources. The workload orchestration system 150 may migrate workloads from one compute cluster 131-139 to another compute cluster 131-139 after partial or complete execution to satisfy affinity and/or co-locality constraints. The workload orchestration system 150 may implement a checkpoint approach that allows for the restoration of machine learning models to avoid rerunning, for example, training from the beginning.
In some examples, the placement subsystem 156 may assign each workload to one of the compute clusters based on a matching of (i) the identified resource demands of each respective workload, (ii) the calculated thread scaling ratios for the application, and (iii) the identified compute resources of each compute cluster, including the number of cores in each respective compute cluster.
An adaptive modeling subsystem 154 sets, adjusts or otherwise defines the hyperparameters of each workload as a function of the identified compute resources of the compute cluster 131-139 to which each respective workload is assigned. The hyperparameters of a workload assigned to the compute cluster A 131 may be different than the hyperparameters of a workload assigned to the compute cluster B 132 due to the different compute resources of compute clusters A and B (131 and 132, respectively). For instance, different batch sizes, number of epochs, learning rates, and/or other hyperparameters may be assigned to the workload(s) assigned to compute cluster A 131 than to the workload(s) assigned to compute clusters B-Z (132-139). The system may reduce straggler issues by dynamically modifying the hyperparameters of the workloads assigned to the various heterogeneous compute clusters 131-139 to synchronize or more closely synchronize execution of the workloads.
The registry 214 may be maintained by a discovery subsystem, as previously described. In some examples, the registry 214 may be a dynamic database identifying the compute resources of each of the compute devices in the network of on-premises compute devices 212. The workload orchestration system 200 may also set, adjust, or otherwise define the hyperparameters of each assigned workload as a function of the identified compute resources of the compute devices in the network of on-premises compute devices 212. The discovery subsystem may acquire or reserve compute resources as they become available. Accordingly, since compute resource availability is dynamic, the workload orchestration system 200 may use a hysteresis margin to acquire resources with appropriate locality and/or affinity to meet the corresponding resource demands of the workload(s).
The workload orchestration system 200 may assign workloads to the compute devices in the network of on-premises compute devices 212 in a resources-aware manner. That is, the workload orchestration system 200 may assign workloads to the compute devices by matching or mapping the compute resources of each compute device with the resource demands of each workload. In some examples, the workload orchestration system 200 may also assign the workloads to the compute devices in a models-aware manner. That is, the workload orchestration system 200 may assign the workloads to the compute devices in further consideration co-locality constraints, anti-affinity, and/or affinity constraints and policies of the workloads.
The workload orchestration system 200 may isolate workloads (e.g., machine learning training and interference jobs) of the artificial intelligence application 201. The workload orchestration system 200 may assign workloads to the compute devices in the network of on-premises compute devices 212 based at least in part on an evaluation of network communication costs associated with assigning workloads to distributed computing devices having the computational benefits of increased processor speeds and/or and increased number of cores.
In some examples, the workload orchestration system 200 may implement preemption policies for the compute resources of the compute devices in the network of on-premises compute devices 212 to enforce resource sharing (e.g., the shared file system 216). The preemption policies can be set to avoid using the full capacity of any one compute device and/or mitigate head-of-line issues. In some examples, if higher priority jobs arrive in the message queue 208 while there are lower priority jobs running, the system 200 may free up compute resources of the compute devices in the network of on-premises compute devices 212 to focus on the higher priority jobs. For example, the lower priority jobs may be temporarily suspended while the higher priority jobs are executed.
The artificial intelligence scheduler 206 may include an execution estimator 207 to calculate minimum and maximum estimated execution times for a compute cluster with a number of cores, N, to execute a task or application. In various examples, the execution estimator may estimate the minimum and maximum execution times for the N-core compute cluster based on a measured execution time on a different compute cluster with kN cores, where k is any number greater than 0. In some instances, the measured compute cluster may have more or fewer cores than the compute cluster for which the execution time is being estimated.
A minimum scaling ratio for the compute cluster executing the task or application may be calculated as one (i.e., unity or 1) when N is equal to or exceeds kN. When the number of cores N is less than the number of cores kN, the minimum scaling ratio is equal to the N/kN. In either case, the maximum scaling ratio may be equal to N/kN. As described herein, further refinement in the minimum and maximum scaling ratios may be calculated based on a fixed number or fixed ratio of reserved cores.
For example, a discovery subsystem module 380 may discover the compute resources of each compute cluster of a plurality of compute clusters. At least some of the compute clusters may have differing compute resources, including differing numbers of cores. An adaptive modeling subsystem module 382 may associate hyperparameters with each workload associated with an application (such as an artificial intelligence or other machine learning application) based at least in part on the compute resources of the compute cluster to which each respective workload is assigned.
A placement subsystem module 384 may assign each workload to a compute cluster that has compute resources corresponding to the resource demands of each respective workload. The manifest subsystem module 386 may identify resource demands of predefined workloads of an application. Alternatively, the manifest subsystem module 386 may divide an application, such as a machine learning application, into a plurality of workloads with each workload having resource demands corresponding to the compute resources of the compute clusters.
The specific arrangement of subsystems and modules may be modified from the specific examples illustrated. Accordingly, any of a wide variety of computing systems, electronics, computer-executable instructions, network configurations and the like may be adapted to implement the concepts described herein.
The system may assign, at 415, each workload to one of the compute clusters. For example, each workload may be assigned to one of the compute clusters based on a matching between the resource demands of each workload and available compute resources of the respective compute cluster to which each workload is assigned. The system may dynamically define, at 420, hyperparameters for each workload as a function of the identified compute resources of each respective compute cluster and the dataset.
When predicting the execution time of a workload with traces collected during a run in a processor with fewer cores than the processor of a prediction target, the performance of the application may be impacted by the fact that the application may or may not upscale. When multithreaded applications are executed in processors with different numbers of cores, their behavior may be unpredictable. The present system may estimate execution times and/or thread scaling ratios for a given application based on information from one or more tests or sample executions of the application in compute nodes having different numbers of cores.
As illustrated and described in conjunction with
The system may utilize a known thread scaling ratio as a data point for assigning workloads between various compute clusters. The prediction accuracy of the execution time by each compute cluster is improved by using bounded thread scaling ratios. Even outside the context of dividing machine learning tasks among different compute clusters, the presently described systems and methods may be used to make decisions and provide suggestions for which machine or machines to utilize to execute a given application. As a specific example, a user may plan to execute an application on a primary machine that has 4 cores. The system may evaluate minimum and maximum scaling ratios calculated for the application based on measured execution times on other machines having any number of cores. The system may suggest that the user utilize a machine with more cores (e.g., 16 cores) based on a determination that the application would be able to fully utilize (or at least partially utilize) the additional cores.
In the illustrated example, the system may determine that the application will fully scale upward to utilize every available core. Thus, the minimum and maximum thread scaling ratios may be equal to one another and based on the ratio of cores in the compute node for which an execution time is being estimated relative to the number of cores in the measured compute node (or one of the measured compute nodes).
As illustrated, the start, at 1101, of the analysis begins with a comparison of the number of cores, CoresP1, in a first compute node and the number of cores, CoresP2, in a second compute node. The thread scaling ratio calculated via the approach 1100 represents the relative execution times of the first compute node and the second compute node, depending on how the application scales with compute nodes having more nodes (upscaling) or fewer nodes (downscaling), with respect to the first compute node.
As illustrated, if the first compute node has the same number of cores as the second compute node, at 1103, then the scaling ration is 1, at 1190. If the number of cores in the first compute node is greater than the number of cores in the second compute node, at 1103, then the analysis is a downscaling analysis. Following the downscaling analysis, if the application uses all of the cores in the first compute node, at 1107, then the scaling ratio is equal to the number of cores in the second compute node, CoresP2, divided by the number of cores in the first compute node, CoresP1, at 1191.
If, however, only some of the cores are used by the first compute node, at 1107, then, at 1110, a constant MulCONST is calculated as the number of cores used to execute the application in the first compute node, BusyCoresP1, divided by the total number of cores in the first compute node, CoresP1. An EstMulCores constant is then calculated as the greater of (a) 1 and (b) the number of cores in the second compute node, CoresP2, multiplied by the MulCONST. The minimum thread scaling ratio is then calculated as the EstMulCores divided by the number of cores used to execute the application in the first compute node, BusyCoresP1, at 1192.
If the number of cores used to execute the application in the first compute node, BusyCoresP1, is greater than the number of cores in the second compute node, CoresP2, at 1115, then the thread scaling max is equal to, at 1193, the number of cores in the second compute node, CoresP2, divided by the number of cores used to execute the application in the first compute node, BusyCoresP1. Otherwise, if, at 1115, the number of cores used to execute the application in the first compute node, BusyCoresP1, is less than or equal to the number of cores in the second compute node, CoresP2, then the thread scaling max is equal to 1, at 1194.
If the number of cores in the first compute node, CoresP1 is less than the number of cores in the second compute node, CoresP2, at 1103, then the system conducts an upscaling analysis. If the first compute node utilizes all of the cores to execute the application, at 1120, then the minimum thread scaling ratio is 1 and the maximum thread scaling ratio is the number of cores in the second compute node, CoresP2, divided by the number of cores in the first compute node, CoresP1, at 1195.
If, however, the first compute node utilizes only some of the cores to execute the application, at 1120, then the minimum thread scaling ratio is 1. A Subconst is calculated as the number of cores in the first compute node, CoresP1, less the number of cores used by the first compute node to execute the application, BusyCoresP1. The maximum thread scaling ratio is calculated as the difference between the number of cores in the second compute node less the SubCONST, divided by the number of cores used by the first compute node to execute the application, BusyCoresP1, at 1196.
According to various examples, the system may assign each workload to one of the compute clusters based on a matching of the identified resource demands of each respective workload, the calculated thread scaling ratios (e.g., minimum and maximum thread scaling ratios) for the application, and the identified compute resources of each compute cluster, including the number of cores in each respective compute cluster.
In some examples, a thread scaling ratio may be calculated based on a first measured execution time on a first compute node with a known number of cores and a second measured execution time on a second compute node with a second number of cores. The system may estimate an execution time for a third compute node with a third number of cores based on the calculated thread scaling ratio. The thread scaling ratio may be an exact thread scaling ratio, in which the minimum scaling ratio and the maximum scaling ratio are equal. Alternatively, the thread scaling ratio may comprise a distinct minimum thread scaling ratio and a distinct maximum thread scaling ratio. The system may use the minimum and maximum thread scaling ratios to estimate an execution time range that includes estimates for minimum and maximum execution times.
Specific examples of the disclosure are described above and illustrated in the figures. It is, however, appreciated that many adaptations and modifications could be made to the specific configurations and components detailed above. In some cases, well-known features, structures, and/or operations are not shown or described in detail. Furthermore, the described features, structures, or operations may be combined in any suitable manner. It is also appreciated that the components of the examples, as generally described, and as described in conjunction with the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, all feasible permutations and combinations of examples are contemplated. Furthermore, it is appreciated that changes may be made to the details of the above-described examples without departing from the underlying principles thereof.
In the description above, various features are sometimes grouped together in a single example, figure, or description thereof for the purpose of streamlining the disclosure. This method of disclosure, however, is not to be interpreted as reflecting an intention that any claim now presented or presented in the future requires more features than those expressly recited in that claim. Rather, it is appreciated that inventive aspects lie in a combination of fewer than all features of any single foregoing disclosed example. The claims are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate example. This disclosure includes all permutations and combinations of the independent claims with their dependent claims.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US2020/027288 | 4/8/2020 | WO |