Using constraint programming to set resource quota limits for allocating resources to consumers
Constraint programming optimizes resource allocation in computing systems by setting limits and guarantees based on historical data, addressing inefficiencies and vulnerabilities in existing methods.
Patent Information
- Application Number
- JP2023569728
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-05-10
- Filing Date
- 2022-04-27
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-04-27
AI Technical Summary
Existing resource allocation methods in computing systems fail to efficiently manage resource quotas due to dynamic consumer loads and varying consumer attributes, leading to inefficiencies such as underutilization and vulnerability to resource demands.
Utilizing constraint programming (CP) to create a data model that sets resource limits and guarantees based on historical usage data, incorporating constraints to optimize resource allocation and minimize vulnerabilities.
This approach ensures optimal resource allocation by reducing the likelihood of consumer vulnerabilities and underutilization, allowing the system to adapt quickly to changing demands.
Smart Images

Figure 0007815278000005 
Figure 0007815278000006 
Figure 0007815278000007
Abstract
Description
[Technical Field]
[0001] Related Applications; Incorporated by Reference This application is related to U.S. Non-Provisional Patent Application No. 17 / 302,657, filed May 10, 2021, and is incorporated herein by reference.
[0002] Technical Field The present disclosure relates to the use of constraint programming. In particular, the present disclosure relates to the use of constraint programming to set resource allocation limits for allocating resources to consumers in a computing system. [Background technology]
[0003] background A computing system includes a set of resources (e.g., central processing units (CPUs)) that are shared among a set of consumers (e.g., database instances). If one consumer places a large demand on the shared set of resources, that consumer can adversely affect the performance of other consumers.
[0004] One way to mitigate adverse effects between consumers sharing a finite set of resources is to enforce resource quota limits on consumers. However, consumers are associated with different process types, priorities, and / or other attributes. Furthermore, the process load of consumers changes dynamically. If resource quota limits are set without considering the static attributes and / or dynamic load of consumers, resource allocation may be inefficient. For example, some resources may be underutilized while some consumers may resist the limits.
[0005] The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Thus, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.
[0006] The embodiments are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings. It should be noted that references to "one" or "an" embodiment in this disclosure do not necessarily refer to the same embodiment, but rather mean at least one. In the drawings: [Brief explanation of the drawings]
[0007] [Figure 1] FIG. 1 illustrates a resource manager for managing a computing system, according to one or more embodiments. [Figure 2A] FIG. 1 illustrates a constraint programming data model and search command generation system according to one or more embodiments. [Figure 2B] FIG. 1 illustrates a constraint programming data model and search command generation system according to one or more embodiments. [Figure 3] FIG. 1 illustrates an example set of operations for updating resource limits and / or resource guarantees for consumers in a computing system based on resource usage over a particular historical period, according to one or more embodiments. [Figure 4] FIG. 1 illustrates an example set of operations for generating a constraint programming data model, according to one or more embodiments. [Figure 5A] FIG. 10 illustrates an example set of operations for generating constraint programming search directives, according to one or more embodiments. [Figure 5B] FIG. 10 illustrates an example set of operations for generating constraint programming search directives, according to one or more embodiments. [Figure 5C] FIG. 10 illustrates an example set of operations for generating constraint programming search directives, according to one or more embodiments. [Figure 6] FIG. 1 illustrates an example of a constraint programming data model and a set of operations for applying constraint programming search directives to a constraint programming solver, according to one or more embodiments. [Figure 7] FIG. 10 illustrates an example set of operations for assigning resources to consumers based on resource guarantees being updated by a constraint programming solver, according to one or more embodiments. [Figure 8] FIG. 10 illustrates an example set of operations for queuing process requests that exceed resource limits updated by a constraint programming solver, according to one or more embodiments. [Figure 9] FIG. 1 is a block diagram illustrating a computer system according to one or more embodiments. DETAILED DESCRIPTION OF THE INVENTION
[0008] Detailed Description In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding. One or more embodiments may be practiced without these specific details. Features described in one embodiment may be combined with features described in different embodiments. In some instances, well-known structures and devices are described with reference to block diagram form in order to avoid unnecessarily obscuring the present invention. 1. Overview 2. Computing System Architecture 3. Constraint Programming Data Model and Search Instruction Generation System Architecture 4. Determining and Updating Resource Allocation Limits 5. Generation of constraint programming data model and constraint programming search directives and application to constraint programming solver 6. Enforcing resource guarantees and resource limits 7. Hardware Overview 8.Others;Extensions 1. Overview One or more embodiments include setting resource allocation limits for allocating resources to consumers in a computing system. Resource allocation limits include resource limits and resource guarantees. A resource limit is an upper limit on the number of resources a particular consumer can use at a particular time. A resource guarantee is a lower limit on the number of resources a particular consumer is guaranteed to have access to at a particular time. A consumer that uses more resources than its guaranteed resources becomes vulnerable to interruptions in the event of a sudden increase in resource demand by other consumers. As used herein, the term "vulnerability" refers to a consumer's resource usage that exceeds its resource guarantee.
[0009] One or more embodiments include using constraint programming (CP) to set resource allocation limits for allocating resources to consumers in a computing system. CP is a type of declarative programming. CP obtains solutions to real-world problems based on the specification of a CP data model and, optionally, CP search directives. In contrast, imperative programming is based on the specification of a series of steps.
[0010] A CP data model includes a set of data model elements, a domain (range) of possible values that can be assigned to each element, and one or more constraints that define the combinations of values that can be assigned to the elements. Based on the CP data model, a set of values for the set of elements that satisfies all the constraints is determined. A set of values for the set of elements that satisfies all the constraints may be referred to herein as a "CP solution."
[0011] A CP search directive leads to the assignment of a set of values to a set of data model elements that satisfy all constraints specified by the CP data model. The CP search directive generates a particular sequence in which value assignments to one or more data model elements are attempted. Additionally or alternatively, the CP search directive prioritizes the assignment of certain values over other values for one or more data model elements. Using different CP search directives for the same CP data model may result in different CP solutions. Additionally or alternatively, different CP search directives 234 for the same CP data model 232 may result in different efficiency levels and / or execution times for obtaining a CP solution.
[0012] One or more embodiments include generating a CP data model for determining resource allocation limits for allocating resources to consumers in a computing system. The CP data model includes several sets of data model elements. A set of limit elements represent resource limits for the consumer. A set of guarantee elements represent resource guarantees for the consumer. A set of vulnerability elements represent a number of data points indicating vulnerabilities (also referred to as a "vulnerability count"). A particular vulnerability element represents a number of data points indicating that a particular consumer is vulnerable with respect to a particular resource guarantee. The number of such data points is based on resource usage data for a particular consumer over a particular historical period.
[0013] The CP data model further includes several constraints. The limit-guarantee constraint relates a limit element to a guarantee element. It requires that the guarantee element (for a particular consumer) is equal to the limit element (for a particular consumer) divided by the oversubscription rate, which is equal to the sum of the limit elements divided by the total number of resources. The total resource constraint relates a guarantee element to the total number of resources in a computing system. It requires that the sum of the guarantee elements is less than or equal to the total number of resources. The guarantee-vulnerability constraint relates a guarantee element to a vulnerability element. It requires that the vulnerability element (for a particular consumer) is equal to the number of vulnerabilities that corresponds to the guarantee value that is (or should be) assigned to the guarantee element (for a particular consumer) based on resource usage over a historical period.
[0014] In one embodiment, a guarantee-vulnerability constraint is expressed as an element constraint. An element constraint accepts as input (a) an index element and (b) a set of values. The index element serves to index into the set of values such that the element constraint returns a particular value from the set of values that corresponds to the value assigned (or required to be assigned) to the index element. For a guarantee-vulnerability constraint, the index element is the guarantee element (for a particular consumer) and the set of values is an excess distribution (for a particular consumer). The excess distribution indicates the number of data points that indicate that a particular consumer's resource usage exceeds a critical value, which ranges from zero to the total number of resources in the computing system. The number of such data points is based on resource usage data for a particular consumer over a particular historical period.
[0015] One or more embodiments include generating a CP search directive for determining resource allocation limits for allocating resources to consumers in a computing system. In one embodiment, the CP search directive includes a minimization objective function associated with a vulnerability count. In one embodiment, the CP search directive is to minimize the maximum value of a set of vulnerability factors. In another embodiment, the CP search directive is to minimize the average value of the set of vulnerability factors. In another embodiment, the CP search directive is to minimize the sum of the vulnerability factors (i.e., minimize the total number of vulnerabilities for the computing system). In yet another embodiment, the CP search directive includes a minimization objective function associated with a vulnerability count and a vulnerability cost, where the per-consumer vulnerability cost for a particular consumer is the vulnerability factor for the particular consumer multiplied by the vulnerability factor for the particular consumer. Different consumers may be associated with different vulnerability factors. In one embodiment, the CP search directive is to minimize the maximum value of the vulnerability cost per consumer. In another embodiment, the CP search directive is to minimize the average vulnerability cost per consumer. In another embodiment, the CP search directive is to minimize the sum of the vulnerability costs per consumer (ie, minimize the total vulnerability cost for the computing system).
[0016] One or more embodiments include applying the CP data model and the CP search directive to a CP solver to obtain resource allocation limits. The resource manager obtains updated resource limits and / or resource guarantees from the CP solver. Based on the resource guarantee for the particular consumer, the resource manager assigns resources to the particular consumer. The number of assigned resources is equal to the resource guarantee. The resource manager prohibits other consumers from using the assigned resources. Furthermore, based on the resource guarantee and / or resource limits for the particular consumer, the resource manager queues or allocates new process requests made by the particular consumer. If the number of pending process requests for the particular consumer is less than or equal to the resource guarantee, the new process request may be preferentially allocated to the assigned resource. If the number of pending process requests exceeds the resource limit, the new process request is added to the queue for the particular consumer. Thus, the resource manager ensures that process requests assigned to resources are within the resource limit. If the number of pending process requests exceeds the resource guarantee but is less than or equal to the resource limit, then a process request being removed from the queue of a particular consumer (or, if there is no queue, the new process request itself) can be assigned to the particular resource. In order to assign the particular resource to a process request of a particular consumer, the resource manager can interrupt the ongoing execution of a process request made by another consumer on the particular resource.
[0017] The choice of using excess distributions to model resource allocation problems allows the CP solver to efficiently determine the optimized solution. The large amount of data embedded in the historical log of resource usage is compressed into the excess distribution, which logically corresponds neatly to the guarantee limits via the element constraints. Furthermore, the use of excess distributions and associated element constraints allows the CP solver to search for the optimized solution without any requirements on the shape of the objective function, perform derivatives of the objective function, and / or provide an initial guess for the CP solution.
[0018] The CP data model and CP search directives allow the CP solver to efficiently determine updated resource allocation limits based on recent resource usage data. Continually updating resource allocation limits allows a computing system to quickly adapt to changing resource usage patterns. Optimal resource allocation limits reduce the likelihood of consumer vulnerabilities and / or resource underutilization.
[0019] One or more embodiments described and / or claimed herein may not be included in this summary section.
[0020] 2. Computing System Architecture FIG. 1 illustrates a resource manager for managing a computing system according to one or more embodiments. As shown in FIG. 1, system 100 includes a resource manager 110, a data repository 102, a set of consumers 112, a set of resources 116, and a constraint programming (CP) solver 118. In one or more embodiments, system 100 may include more or fewer components than those illustrated in FIG. 1. The components illustrated in FIG. 1 may be local to one another or remote from one another. The components illustrated in FIG. 1 may be implemented in software and / or hardware. Each component may be distributed across multiple applications and / or machines. Multiple components may be combined into a single application and / or machine. Operations described with respect to one component may instead be performed by another component.
[0021] In one or more embodiments, a consumer 112 refers to hardware and / or software that generates workload for a resource 116. Examples of a consumer 112 include a database instance, a virtual machine, and / or a hardware server. The workload generated by a consumer 112 may be measured by various units, such as the number of process requests, the amount of data communicated and / or stored, and / or the duration of processing time.
[0022] In one or more embodiments, resources 116 refer to hardware and / or software that services and / or processes the workload being generated by consumers 112. Examples of resources 116 include central processing units (CPUs), disk memory, and / or communication bandwidth.
[0023] In one or more embodiments, resource manager 110 refers to hardware and / or software configured to allocate resources 116 to consumers 112. Allocation refers to allocating resources 116 to requests of consumers 112 such that the resources allocated to a request service and / or process that request. Additionally or alternatively, allocation refers to designating resources 116 to consumers 112 such that resources designated for one consumer cannot service requests of other consumers.
[0024] In one embodiment, resource manager 110 makes allocation decisions based on consumer configuration 104, which includes resource limits 106 and / or resource guarantees 108. Resource limits 106 are the maximum number of resources 116 that can be allocated to consumers 112 at any given time. Resource guarantees 108 are the minimum number of resources 116 guaranteed to consumers 112 at any given time. Example operations for enforcing resource limits 106 and / or resource guarantees 108 are further described below with reference to FIGS. 7-8.
[0025] Different consumer configurations 104 may correspond to different consumers 112. For example, one set of consumer configurations may correspond to consumer 112a, while another set of consumer configurations may correspond to consumer 112b.
[0026] In one or more embodiments, the data repository 102 is any type of storage unit and / or device for storing data (e.g., a file system, a database, a collection of tables, or any other storage mechanism). Furthermore, the data repository 102 may include multiple different storage units and / or devices. The multiple different storage units and / or devices may or may not be of the same type and may or may not be located at the same physical site. Furthermore, the data repository 102 may be implemented or run on the same computing system as the resource manager 110. Alternatively or additionally, the data repository 102 may be implemented or run on a computing system separate from the resource manager 110. The data repository 102 may be communicatively connected to the resource manager 110 via a direct connection or a network. The information describing the consumer configuration 104 may be implemented across any component in the system 100. However, this information is illustrated within the data repository 102 for purposes of clarity and explanation.
[0027] In one or more embodiments, CP solver 118 refers to hardware and / or software configured to determine a CP solution given CP data model 232 and CP search directives 234. Further embodiments and / or examples of CP solver 118 are described below with reference to Figures 2A and 2B.
[0028] In one or more embodiments, system 100 of Figure 1 and system 200 of Figure 2A may be combined into a single system configured to manage the allocation of resources 116 to consumers 112. CP solver 118 of Figure 1 is equivalent to CP solver 218 of Figure 2A. Resource limits 106 and resource guarantees 108 of Figure 1 (used by resource manager 110) are equivalent to resource limits 206 and resource guarantees 208 of Figure 2A (output by CP solver 218), respectively.
[0029] 3. Constraint Programming Data Model and Search Instruction Generation System Architecture 2A and 2B illustrate a constraint programming data model and search command generation system according to one or more embodiments. As shown in FIG. 2A, system 200 includes excess distribution generator 222, model and command generator 224, data repository 202, CP solver 218, resource constraint 206, and resource guarantee 208. In one or more embodiments, system 200 may include more or fewer components than those shown in FIG. 2A. The components shown in FIG. 2A may be local or remote from each other. The components shown in FIG. 2A may be implemented in software and / or hardware. Each component may be distributed across multiple applications and / or machines. Multiple components may be combined into a single application and / or machine. Operations described with respect to one component may instead be performed by another component. As described above, system 100 of FIG. 1 and system 200 of FIG. 2A may be combined into a single system configured to allocate resources to consumers.
[0030] In one or more embodiments, data repository 202 is any type of storage unit and / or device for storing data (e.g., a file system, a database, a collection of tables, or any other storage mechanism). Furthermore, data repository 202 may include multiple different storage units and / or devices. The multiple different storage units and / or devices may or may not be of the same type and may or may not be located at the same physical site. Furthermore, data repository 202 may be implemented or executed on the same computing system as excess distribution generator 222, model and command generator 224, and / or CP solver 218. Alternatively or additionally, data repository 202 may be implemented or executed on a computing system separate from excess distribution generator 222, model and command generator 224, and / or CP solver 218. Data repository 202 may be communicatively coupled to excess distribution generator 222, model and command generator 224, and / or CP solver 218 via a direct connection or a network.
[0031] The information describing resource usage dataset 226, excess distribution 228, vulnerability coefficients 230, CP data model 232, and / or CP search directives 234 may be implemented across any component in system 200. However, this information is illustrated in data repository 202 for purposes of clarity and explanation.
[0032] In one or more embodiments, the resource usage dataset 226 for a particular consumer includes data points indicating the amount of resource used by a particular consumer over a period of time. The resource usage dataset 226 may be stored in the form of a log, a spreadsheet, and / or any other format. Resource usage can be measured in terms of number (e.g., number of CPUs used), capacity (e.g., amount of memory space used), time (e.g., duration of use of a communication channel), and / or other units. The resource usage dataset 226 may include data points for a particular time interval, which may be fixed and / or variable. Each data point is an actual measurement and / or an aggregated measurement. An actual measurement is the actual measured resource usage at a particular time. An aggregated measurement refers to the result of some operation (such as sum or average) on the actual measurements over a time window. As an example, a monitoring agent may detect the actual number of CPUs being used every second. The actual measurements of CPU usage starting at time=0 seconds and ending at time=9 seconds may be 2, 3, 4, 4, 4, 2, 3, 4, 5, and 6. A monitoring agent may determine a moving average of the amount of CPU being used every 3 seconds. At time=2, the average is calculated based on the actual measurements at time=0, time=1, and time=2. So starting at time=2 and ending at time=9, the average CPU usage could be 3.00, 3.67, 4.00, 3.33, 3.00, 3.00, 4.00, 5:00. The monitoring agent may report the average CPU usage as the "aggregated measurement."
[0033] In one or more embodiments, the excess distribution 228 indicates the number of data points that indicate a particular consumer's resource usage exceeds a critical value, where the critical value ranges from zero to the total number of resources in the computing system. The number of such data points is based on the particular consumer's resource usage dataset 226 over a particular historical period.
[0034] As an example, the resource usage data set may include the following data points: January 1, 2021, 10:00 AM: 2CPU, January 1, 2021, 10:01 AM: 3CPU, January 1, 2021, 10:02 AM: 4CPU, January 1, 2021, 10:03 AM: 4CPU, January 1, 2021, 10:04 AM: 4CPU, January 1, 2021, 10:05 AM: 2CPU, January 1, 2021, 10:06 AM: 3CPU, January 1, 2021, 10:07 AM: 4CPU, January 1, 2021, 10:08 AM: 5CPU, January 1, 2021, 10:09 AM: 6CPU.
[0035] Therefore, the excess distribution of the resource usage dataset from 10:00 AM to 10:09 AM on January 1, 2021 would show the following: Critical value 0: 10 data points above the critical value; Critical value 1: 10 data points above the critical value; Critical value 2: 8 data points above the critical value; Critical value 3: 6 data points above the critical value; Critical value 4: 2 data points above the critical value; Critical value 5: 1 data point above the critical value; Critical Value 6: 0 data points above the critical value.
[0036] The excess distribution will omit information greater than the minimum critical value associated with no excess (i.e., 6). Omitting such information is acceptable because zero data points above the critical value of 6 necessarily imply zero data points above critical values of 7, 8, 9, and 10. Additionally, or alternatively, omitting such information may be desirable to ensure that resource guarantees are at or below the minimum critical value associated with no excess.
[0037] In one or more embodiments, vulnerability factor 230 indicates a cost factor associated with a particular consumer vulnerability data point. For example, a consumer associated with a non-interruptible workload may be associated with a higher vulnerability factor than a consumer associated with an interruptible workload. A consumer associated with a higher priority (and / or a process with a higher priority) may be associated with a higher vulnerability factor than a consumer associated with a lower priority. A consumer associated with a higher revenue may be associated with a higher vulnerability factor than a consumer associated with a lower revenue. If the vulnerability factors 230 of all consumers are assumed to be the same, then the vulnerability factors 230 of all consumers may be expressed as "1."
[0038] In one or more embodiments, CP data model 232 refers to a particular organization, structure, and / or representation of information. CP data model 232 declaratively expresses combinatorial properties of a problem in terms of constraints. CP data model 232 may be implemented as a software data structure. Software data structures are machine-readable. CP data model 232 may include a set of data and / or instructions readable by one or more devices, including a hardware processor. CP data model 232 may be used as an input parameter to hardware and / or software components, such as CP solver 218.
[0039] 2B, the CP data model 232 includes a set of data model elements and a domain of possible values that can be assigned to each element. A data model element cannot be assigned a value that is not within the data model element's domain. Data model elements may be implemented as arrays, vectors, linked lists, tables, software variables, constants, and / or other software data structures or data objects.
[0040] In one embodiment, the CP data model 232 includes several sets of data model elements. A set of limit elements 252 represent resource limitations for consumers. The domain of each limit element 252 ranges from zero to the total number of resources in the computing system.
[0041] A set of guarantee elements 254 represents resource guarantees to the consumer. The domain of each guarantee element 254 ranges from zero to the total number of resources in the computing system.
[0042] A set of vulnerability elements 256 represents the number of vulnerabilities for a consumer based on resource usage over a particular historical period. The domain of each vulnerability element 256 ranges from zero to the total number of data points for the corresponding consumer within the particular historical period.
[0043] As an example, a computing system may include eight CPUs and four database instances. The resource usage log for each database instance may show one data point per minute. The time period of interest may be from 10:00 AM to 10:09 AM on January 1, 2021. Therefore, there are 10 data points for each consumer within the time period of interest.
[0044] Based on the above settings, the CP data model can have the following data model elements and corresponding domains: L[0]:{0, 1, 2, 3, 4, 5, 6, 7, 8} L[1]:{0, 1, 2, 3, 4, 5, 6, 7, 8} L[2]:{0, 1, 2, 3, 4, 5, 6, 7, 8} L[3]:{0, 1, 2, 3, 4, 5, 6, 7, 8} G[0]:{0, 1, 2, 3, 4, 5, 6, 7, 8} G[1]:{0, 1, 2, 3, 4, 5, 6, 7, 8} G[2]:{0, 1, 2, 3, 4, 5, 6, 7, 8} G[3]:{0, 1, 2, 3, 4, 5, 6, 7, 8} V[0]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[1]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[2]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[3]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} L[i] represents a restriction element, G[i] represents a guarantee element, and V[i] represents a vulnerability element, where i corresponds to a database instance.
[0045] Optionally, CP data model 232 includes a set of per-consumer cost elements 258. The set of per-consumer cost elements 258 represents the consumer's respective costs attributable to vulnerabilities over a particular historical period. A per-consumer cost element 258 for a particular consumer represents the product of (a) the particular consumer's vulnerability coefficient and (b) the particular consumer's number of vulnerabilities over a particular historical period. A domain of per-consumer cost elements 258 for a particular consumer includes each product of (a) the particular consumer's vulnerability coefficient and (b) each value in the domain of the vulnerability element for the particular consumer.
[0046] As an example, a computing system may include eight CPUs and four database instances. The resource usage log for each database instance may include one data point per minute. The time period may be from 10:00 AM to 10:09 AM on January 1, 2021. The vulnerability factors for the four database instances may be 0.9, 0.6, 0.7, and 0.8, respectively.
[0047] As mentioned above, the CP data model may include the following vulnerability elements: V[0]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[1]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[2]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[3]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.
[0048] The domain of the per-consumer cost elements of the first database instance CC[0] may include the products of 0.9 and each of the values in the domain of V[0]. Thus, the CP data model may include the following per-consumer cost elements: CC[0]:{0.0, 0.9, 1.8, 3.6, 4.5, 5.4, 6.3, 7.2, 8.1, 9.0} CC[0]:{0.0, 0.6, 1.2, 1.8, 2.4, 3.0, 3.6, 4.2, 4.8, 5.4, 6.0} CC[0]:{0.0, 0.7, 1.4, 2.1, 2.8, 3.5, 4.2, 4.9, 5.6, 6.3, 7.0} CC[0]:{0.0, 0.8, 1.6, 2.4, 3.2, 4.0, 4.8, 5.6, 6.4, 7.2, 8.0}.
[0049] Optionally, CP data model 232 includes total cost element 260. Total cost element 260 represents the total cost to consumers in a computing system due to vulnerabilities over a particular historical period. The domain of total cost element 260 indicates the possible total cost values for consumers in a computing system. The minimum value in the domain is zero. The maximum value in the domain is the sum of the products of (a) each vulnerability coefficient for each consumer and (b) the total number of data points for each consumer over a particular historical period.
[0050] As an example, a computing system may include eight CPUs and four database instances. The resource usage log for each database instance may show one data point per minute per consumer. The time period may be from 10:00 AM to 10:09 AM on January 1, 2021. The vulnerability factors for the four database instances may be 0.9, 0.6, 0.7, and 0.8, respectively. Therefore, the maximum value of the domain of total cost elements is 0.9 × 10 + 0.6 × 10 + 0.7 × 10 + 0.8 × 10 = 30.
[0051] In one embodiment, the CP data model 232 includes several constraints that define combinations of values that can be assigned to a set of data model elements (such as the restriction element 252, the guarantee element 254, and the vulnerability element 256 described above).
[0052] A set of limit-guarantee constraints 262 relate link elements 252 and guarantee elements 254. The limit-guarantee constraints 262 require that the guarantee element 254 (for a particular consumer) is equal to the limit element 252 (for a particular consumer) divided by the oversubscription ratio, which is equal to the sum of the limit elements 252 divided by the total number of resources. The limit-guarantee constraints 262 can be expressed as follows:
[0053]
number
[0054] L[i] represents a limit element 252, G[i] represents a guarantee element 254, and L[c] represents a set of limit elements, where i corresponds to a particular consumer in the computing system.
[0055] Total resource constraint 264 relates guarantee factors 254 to the total number of resources in a computing system. Total resource constraint 264 requires that the sum of guarantee factors 254 be less than or equal to the total number of resources. Total resource constraint 264 can be expressed as follows:
[0056]
number
[0057] G[c] represents the set of guarantee elements 254 . A set of guarantee-vulnerability constraints 266 relate guarantee elements 254 and vulnerability elements 256. The guarantee-vulnerability constraints 266 require that the vulnerability element 256 (for a particular consumer) is equal to the vulnerability count that corresponds to the guarantee value that is assigned (or should be assigned) to the guarantee element 254 (for a particular consumer) based on resource usage over a particular historical period.
[0058] In one embodiment, the guarantee-vulnerability constraint 266 is expressed as an element constraint. The element constraint accepts as inputs (a) an index element and (b) a set of values. The index element input serves to index into the set of values such that the element constraint returns a particular value from the set of values that corresponds to the value assigned (or required to be assigned) to the index element. For the guarantee-vulnerability constraint 266, the index element is the guarantee element 254 and the set of values is the excess distribution 228. Furthermore, the index element outputs to a vulnerability element 256.
[0059] As an example, the CP data model may include the following data model elements: G[0]:{0, 1, 2, 3, 4, 5, 6, 7, 8} V[0]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} G[0] represents the assurance factor corresponding to a particular consumer, and V[0] represents the vulnerability factor corresponding to the same particular consumer.
[0060] The excess distribution can be {10, 8, 7, 6, 4, 1, 1, 0}. The assurance-vulnerability constraints can be expressed as element constraints, with (a) G[0] as the input index element, (b) the exceedance distribution as the set of input values, and (c) V[0] as the output element. Based on the element constraints, the value "0" assigned to G[0] maps to a specific set of values "10". Therefore, the value "10" is returned. The value "1" assigned to G[0] maps to a specific set of values "8". Therefore, the value "8" is returned. The value "2" assigned to G[0] maps to a specific set of values "7". Therefore, the value "7" is returned. The returned values must be within the domain of V[0].
[0061] Optionally, a set of per-consumer cost constraints 268 relate per-consumer vulnerability coefficients and vulnerability factors 256. A per-consumer cost constraint 268 (for a particular consumer) is the product of (a) the vulnerability coefficient (for the particular consumer) and (b) the vulnerability factor (for the particular consumer). The per-consumer cost constraints 268 can be expressed as follows: CC[i]=VF[i]×V[i] CC[i] represents the cost factor per consumer, VF[i] represents the vulnerability coefficient, and V[i] represents the vulnerability factor, where i corresponds to a consumer in the computing system.
[0062] Optionally, total cost constraint 270 relates vulnerability factors 256 to vulnerability coefficients across consumers in the computing system. Total cost constraint 270 is the dot product of a set of (a) vulnerability coefficients and (b) vulnerability factors. Total cost constraint 270 can be expressed as: TC=VF·V TC represents the total cost factor, VF represents the consumer vulnerability factor, and V represents the vulnerability factor.
[0063] Alternatively, if a per-consumer cost component is used, the total cost constraint 270 can be expressed as:
[0064]
number
[0065] TC represents the total cost components, and CC[c] represents the set of cost components per consumer.
[0066] Referring back to FIG. 2A , the CP search directives 234 are directives that guide the CP solver 218 in the process of determining an optimal CP solution given a particular CP data model 232. The CP search directives 234 guide the assignment of a set of values to a set of data model elements that satisfy all constraints, as specified by the CP data model 120. The CP search directives 234 prioritize the assignment of certain values over other values for one or more data model elements. Different CP search directives 234 for the same CP data model 232 may result in different CP solutions. Additionally or alternatively, different CP search directives 234 for the same CP data model 232 may result in different efficiency levels and / or execution times for obtaining a CP solution. The CP search directives 234 may be implemented as software data structures. The CP search directives 234 may include a set of computer-readable instructions. The CP search directives 234 may be used as input parameters to hardware and / or software components, such as the CP solver 218.
[0067] In one embodiment, the CP search directive 234 specifies an objective function, which is a minimization function associated with the number of vulnerabilities and / or vulnerability costs of the computing system.
[0068] The CP search command 234 may include minimizing the maximum value of the vulnerability factors 256. Additionally or alternatively, the CP search command 234 may include minimizing the sum of the vulnerability factors 256. Additionally or alternatively, the CP search command 234 may include minimizing the average (e.g., mean, median, or mode) of the vulnerability factors 256.
[0069] If vulnerability costs are considered, the CP search directive 234 may include minimizing the maximum value of the cost elements per consumer 258. Additionally, or alternatively, the CP search directive 234 may include minimizing the sum of the cost elements per consumer 258 (or total cost element 260). Additionally, or alternatively, the CP search directive 234 may include minimizing the average (e.g., mean, median, or mode) of the cost elements per consumer 258. Additional and / or alternative minimization functions may be used.
[0070] In one or more embodiments, model and command generator 224 refers to hardware and / or software configured to generate CP data model 232 and / or CP search command 234. Example operations for generating CP data model 232 are described below with reference to Figure 4. Example operations for generating CP search command 234 are described below with reference to Figures 5A-5C.
[0071] In one or more embodiments, the model and command generator 224 is implemented on one or more digital devices. The term "digital device" generally refers to any hardware device that includes a processor. A digital device may refer to a physical device that runs an application or a virtual machine. Examples of digital devices include computers, tablets, laptops, desktops, netbooks, servers, web servers, network policy servers, proxy servers, general-purpose machines, function-specific hardware devices, mainframes, televisions, content receivers, set-top boxes, printers, mobile phones, smartphones, and personal digital assistants (PDAs).
[0072] In one or more embodiments, CP solver 218 refers to hardware and / or software configured to determine a CP solution using constraint programming techniques, given a CP data model 232 and CP search directives 234. The CP solution specifies resource limitations 206 and / or resource guarantees 208. Constraint programming techniques include backtracking algorithms, forward-checking algorithms, constraint propagation, and the like. Example operations for applying CP data model 232 and CP search directives 234 to CP solver 218 are described below with reference to FIG. 6.
[0073] 4. Determining and Updating Resource Allocation Limits One or more of the operations shown in Figure 3 may be modified, rearranged, and / or omitted altogether, and therefore the particular sequence of operations shown in Figure 3 should not be construed as limiting the scope of one or more embodiments.
[0074] FIG. 3 illustrates an example set of operations for updating resource limits and / or resource guarantees for consumers in a computing system based on resource usage over a particular historical period, according to one or more embodiments.
[0075] One or more embodiments include determining whether a trigger has occurred to update the resource limits and / or resource guarantees (act 302). A model and command generator (such as model and command generator 224 of FIG. 2A) determines whether a trigger has occurred to update the resource limits and / or resource guarantees. The trigger may be based on a schedule. As an example, the schedule may specify that the resource limits must be updated every three hours. Additionally or alternatively, the trigger may be based on the workload of one or more consumers in the computing system. As an example, the trigger may be that a consumer's workload exceeds a threshold. Another trigger may be that the aggregate workload of the consumers exceeds another threshold. Additional and / or alternative triggers may also be used.
[0076] One or more embodiments include determining consumers and resources within the computing system (act 304). A tracking system (which may be included in resource manager 110 of FIG. 1 and / or the model and command generator) tracks consumers and resources within the computing system via a notification system, a heartbeat system, and / or other approaches. The tracking system stores identifiers of the consumers and resources in a data repository. The model and command generator retrieves identifiers of the consumers and resources within the computing system from the data repository.
[0077] One or more embodiments include obtaining a resource usage dataset for the consumers over a particular time period (act 306). A monitoring system (which may be, but is not necessarily, included in the model and command generator) monitors resource usage for the consumers. The monitoring system detects, aggregates, measures, and / or otherwise obtains resource usage for each consumer at regular time intervals (e.g., once per second). The monitoring system creates one data point for each resource usage measurement in each resource usage dataset for each consumer. The monitoring system stores the resource usage dataset in a data repository. The model and command generator obtains the resource usage dataset from the data repository.
[0078] In one embodiment, in each iteration to obtain updated resource limits and / or resource guarantees, the model and command generator uses resource usage data from the most recent historical period. Thus, the CP data model used to determine resource limits and / or resource guarantees is generated based on the most recent historical usage data. Thus, the resource limits and / or resource guarantees are adaptively updated based on changes in resource usage of consumers of the computing system.
[0079] As an example, the resource limits and resource guarantees of a computing system may be updated hourly. In a first iteration, at 11:00 AM on January 1, 2021, the model and command generator may generate a CP data model based on the resource usage log from 10:00 AM to 10:59 AM on January 1, 2021. Thus, the resource limits and / or resource guarantees may be determined based on the resource usage data from 10:00 AM to 10:59 AM. In a second iteration, at 12:00 PM on January 1, 2021, the model and command generator may generate a new CP data model based on the resource usage log from 11:00 AM to 11:59 AM on January 1, 2021. Thus, the resource limits and / or resource guarantees may be determined based on the resource usage data from 11:00 AM to 11:59 AM. Thus, the resource limits and / or resource guarantees may be continuously updated to be optimal based on the latest resource usage.
[0080] In one embodiment, at each iteration to obtain updated resource limits and / or resource guarantees, the model and command generator uses a prediction of resource usage for the next time period. The prediction of resource usage may be based on (a) a resource usage dataset from a most recent historical time period, (b) a resource usage dataset from a historical time period that shares characteristics with the next time period, and / or (c) other factors. The historical time period that shares characteristics with the next time period may be, for example, a historical time period associated with the same time of day, day of the week, and / or day of the month as the next time period. Thus, the resource limits and / or resource guarantees are adaptively updated based on the prediction of resource usage of consumers of the computing system.
[0081] One or more embodiments include determining a vulnerability coefficient for the consumer (act 308). A user and / or application specifies the vulnerability coefficient for the consumer. The vulnerability coefficient is stored in a data repository. The model and command generator retrieves the vulnerability coefficient from the data repository.
[0082] One or more embodiments include generating an excess distribution based on the resource usage dataset (operation 310). An excess distribution generator (which may, but is not necessarily, included in the model and command generator, such as excess distribution generator 222 in FIG. 2A) generates the excess distribution based on the resource usage dataset.
[0083] First, the excess distribution generator determines the number of data points in the resource usage dataset for a particular consumer within a particular historical period. The excess distribution generator continues its iteration process, with the number of data points within the particular historical period serving as an upper limit for the number of iterations. The excess distribution generator starts with a critical value of zero. The excess distribution generator counts the number of data points that exhibit resource usage above the critical value. The excess distribution generator records the number in association with the critical value. The excess distribution generator increases the critical value and repeats the above process. The excess distribution generator repeats the above process until the critical value is greater than the number of data points within the particular historical period. Thus, the excess distribution generator obtains pairs of values. Each pair includes a critical value and the number of data points that exhibit resource usage above the critical value. The pair of values forms the excess distribution for the particular consumer. The excess distribution generator also repeats the above process for each consumer to obtain an excess distribution for each consumer.
[0084] The excess distribution generator stores the excess distribution of the consumer in the data repository, and the model and command generator retrieves the excess distribution of the consumer from the data repository.
[0085] One or more embodiments include generating a CP data model (act 312). The model and command generator generates the CP data model. An example operation for generating a CP data model is further described below with reference to FIG.
[0086] One or more embodiments include generating a CP search command (act 314). The model and command generator generates the CP search command. Example operations for generating a CP search command are further described below with reference to Figures 5A-5C. Each of Figures 5A-5C illustrates operations for generating a different alternative CP search command. Other CP search commands not described with reference to Figures 5A-5C may be used instead.
[0087] One or more embodiments include inputting the CP data model and the CP search directives to a CP solver to obtain resource limits and / or resource guarantees (act 316). The model and directives generator inputs the CP data model and the CP search directives to a CP solver (such as CP solver 218 in FIG. 2A). An example operation of applying the CP data model and the CP search directives to the CP solver is further described below with reference to FIG. 6.
[0088] One or more embodiments include applying resource limits and / or resource guarantees to the computing system (act 318). The CP solver outputs resource limits and / or resource guarantees to consumers. A resource manager (such as resource manager 110 of FIG. 1) manages the computing system using the resource limits and / or resource guarantees. An example operation for assigning resources to consumers based on resource guarantees is described below with reference to FIG. 7. An example operation for queuing process requests that exceed resource limits is described below with reference to FIG. 8.
[0089] 5. Generation of constraint programming data model and constraint programming search directives and application to constraint programming solver One or more of the operations shown in Figures 4-6 may be modified, rearranged, and / or omitted altogether, and therefore the particular sequence of operations shown in Figures 4-6 should not be construed as limiting the scope of one or more embodiments.
[0090] FIG. 4 illustrates an example set of operations for generating a constraint programming data model in accordance with one or more embodiments.
[0091] One or more embodiments include specifying a set of limit elements, each limit element representing a resource limitation for a respective consumer (act 402). A model and command generator (such as model and command generator 224 of FIG. 2A) specifies the set of limit elements. The set of limit elements may be represented as a vector, an array, and / or other data structure. Each limit element represents a resource limitation for a respective consumer in the computing system.
[0092] Additionally, the model and command generator specifies the domain of the constraint elements. Each domain can be represented as a vector, array, and / or other data structure. The domain of each constraint element ranges from zero to the total number of resources in the computing system.
[0093] One or more embodiments include specifying a set of guarantee elements, each guarantee element representing a resource guarantee for a respective consumer (act 404). The model and command generator specifies the set of guarantee elements. The set of guarantee elements may be represented as a vector, an array, and / or other data structure. Each guarantee element represents a resource guarantee for a respective consumer in the computing system.
[0094] Additionally, the model and directive generator specifies the domain of the guarantee elements. Each domain can be represented as a vector, array, and / or other data structure. The domain of each guarantee element ranges from zero to the total number of resources in the computing system.
[0095] One or more embodiments include specifying a set of vulnerability elements, each vulnerability element representing a number of vulnerabilities for a respective consumer (act 406). The model and command generator specifies the set of vulnerability elements. The set of vulnerability elements may be represented as a vector, an array, and / or other data structure. Each vulnerability element represents a number of vulnerabilities for a respective consumer in the computing system.
[0096] Additionally, the model and directive generator specifies the domain of the vulnerability elements. Each domain can be represented as a vector, array, and / or other data structure. The domain of each vulnerability element ranges from zero to the total number of data points for the corresponding consumer within a particular historical period.
[0097] In one embodiment, a user and / or application can specify a particular privilege consumer in a computing system. The user and / or application can specify a particular maximum value for the vulnerability count of the privilege consumer. The model and command generator can set the domain of the vulnerability element for the privilege consumer according to the specified maximum value. Additionally or alternatively, the user and / or application can specify a particular minimum value for the resource guarantee of the privilege consumer. The model and command generator can set the domain of the guarantee element for the privilege consumer according to the specified minimum value.
[0098] As an example, a computing system may include eight CPUs and four database instances. The resource usage log for each database instance may show one data point per minute. The time period covered may be from 10:00 AM to 10:09 AM on January 1, 2021.
[0099] Without an externally specified maximum number of vulnerabilities, the set of vulnerability elements could be: V[0]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[1]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[2]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[3]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.
[0100] However, if the user specifies that there cannot be any vulnerabilities in the first database, then the only number of vulnerabilities allowed in the first database is 0. All values greater than 0 are removed from the domain of vulnerability elements in the first database. Thus, the set of vulnerability elements could be: V[0]:{0} V[1]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[2]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[3]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.
[0101] As another example, a computing system may include eight CPUs and four database instances. The resource usage log for each database instance may show one data point per minute. The time period covered may be from 10:00 AM to 10:09 AM on January 1, 2021.
[0102] Without an externally specified minimum for resource guarantees, the set of guarantee elements could be: G[0]:{0, 1, 2, 3, 4, 5, 6, 7, 8} G[1]:{0, 1, 2, 3, 4, 5, 6, 7, 8} G[2]:{0, 1, 2, 3, 4, 5, 6, 7, 8} G[3]:{0, 1, 2, 3, 4, 5, 6, 7, 8}.
[0103] However, if the user specifies that the resource guarantee of the first database must be greater than or equal to 4, then 0, 1, 2, and 3 are not acceptable values for the resource guarantee. Therefore, 0, 1, 2, and 3 are removed from the domain of the guarantee elements of the first database. Therefore, the set of guarantee elements can be as follows: G[0]:{4, 5, 6, 7, 8} G[1]:{0, 1, 2, 3, 4, 5, 6, 7, 8} G[2]:{0, 1, 2, 3, 4, 5, 6, 7, 8} G[3]:{0, 1, 2, 3, 4, 5, 6, 7, 8}.
[0104] As another example, the two examples above can be combined so that both the assurance and vulnerability elements are modified by externally specified requirements. Combining the two examples above, the CP data model might contain the following assurance and vulnerability elements: G[0]:{4, 5, 6, 7, 8} G[1]:{0, 1, 2, 3, 4, 5, 6, 7, 8} G[2]:{0, 1, 2, 3, 4, 5, 6, 7, 8} G[3]:{0, 1, 2, 3, 4, 5, 6, 7, 8} V[0]:{0} V[1]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[2]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} V[3]:{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.
[0105] One or more embodiments include specifying a set of cost components per consumer and / or a total cost component (act 408).
[0106] Optionally, the model and command generator specifies a set of per-consumer cost elements. The set of per-consumer cost elements may be represented as a vector, an array, and / or other data structure. Each per-consumer cost element represents a vulnerability cost for a respective consumer in the computing system. Additionally, the model and command generator specifies a domain of the per-consumer cost elements. Each domain may be represented as a vector, an array, and / or other data structure. The domain of the per-consumer cost elements for a particular consumer includes each product of (a) the vulnerability coefficient for the particular consumer and (b) each value in the domain of the vulnerability elements for the particular consumer.
[0107] Optionally, the model and command generator specifies a total cost element. The total cost element represents a total vulnerability cost for the computing system. Additionally, the model and command generator specifies a domain for the total cost element. The domain may be represented as a vector, an array, and / or other data structure. The domain of the total cost element indicates the possible total cost values for consumers in the computing system. The minimum value in the domain is zero. The maximum value of the domain is the sum of the products of (a) each vulnerability coefficient for each consumer and (b) the total number of data points for each consumer in a particular historical period.
[0108] One or more embodiments include specifying a constraint relating a limit element and a guarantee element based on a total number of resources (act 410).
[0109] The model and command generator generates a set of limit-guarantee constraints 262, which require that the guarantee factor (for a particular consumer) is equal to the limit factor (for a particular consumer) divided by the oversubscription rate, which is equal to the sum of the limit factors 252 divided by the total number of resources.
[0110] Additionally, the model and command generator generates a total resource constraint 264. The total resource constraint 264 requires that the sum of the guarantee elements 254 is less than or equal to the total number of resources.
[0111] One or more embodiments include specifying a constraint requiring that each vulnerability element be assigned a vulnerability number corresponding to the assurance value assigned to the assurance element (act 412). The model and directive generator generates a constraint requiring that each vulnerability element be assigned a vulnerability number corresponding to the assurance value assigned to the assurance element based on resource usage over a particular historical period.
[0112] The model and command generator generates an element constraint. The model and command generator inputs the guarantee element for the particular consumer as an index element into the element constraint. The model and command generator inputs the excess distribution for the particular consumer (e.g., determined in operation 310 of Figure 3) as a set of values into the element constraint. The model and command generator sets the vulnerability element for the particular consumer as an output element of the element constraint.
[0113] The model and directive generator repeats the above process for each consumer to generate a set of guarantee-vulnerability constraints.
[0114] One or more embodiments include specifying one or more constraints relating vulnerability factors to vulnerability factors on a per-consumer and / or across consumers basis (act 414).
[0115] Optionally, the model and command generator generates constraints relating vulnerability coefficients and vulnerability elements for each consumer. The model and command generator sets a constraint requiring that the per-consumer vulnerability cost element for a particular consumer be equal to the product of (a) the vulnerability coefficient for the particular consumer and (b) the vulnerability element for the particular consumer. The model and command generator repeats the above process for each consumer to obtain a set of per-consumer cost constraints.
[0116] Optionally, the model and command generator generates constraints relating vulnerability factors to vulnerability coefficients across consumers of the computing system. The model and command generator sets a constraint requiring that the total vulnerability cost factor be equal to the dot product of (a) the vulnerability coefficient for the consumer and (b) the set of vulnerability factors for the consumer. Alternatively, if per-consumer cost factors are used, the model and command generator sets a constraint requiring that the total vulnerability cost factor be equal to the sum of the per-consumer cost factors for the consumer.
[0117] One or more embodiments include generating a CP data model including data model elements and constraints (act 416). The model and directive generator generates the CP data model. The CP data model includes a limit element, a guarantee element, a vulnerability element, and optionally a per-consumer cost element and / or a total cost element. The CP data model further includes a limit-guarantee constraint, a total resource constraint, a guarantee-vulnerability constraint, and optionally a per-consumer cost constraint and / or a total cost constraint.
[0118] The CP data model may be stored as a software data structure. The CP data model may include one or more arrays, vectors, linked lists, tables, software variables, constants, and / or data objects. The CP data model may include a set of data and / or instructions readable by one or more devices, including a hardware processor.
[0119] 5A-5C illustrate an example set of operations for generating constraint programming search commands according to one or more embodiments, each of which illustrates an operation for generating a different alternative CP search command.
[0120] 5A, one or more embodiments include generating an objective function that minimizes a maximum value of a set of cost components per consumer (operation 502). A model and command generator (such as model and command generator 224 of FIG. 2A) generates an objective function that minimizes a maximum value of a set of cost components per consumer. The objective function can be expressed as:
[0121] min(max(CC)) CC represents a set of cost elements per consumer.
[0122] One or more embodiments include generating a CP search directive that includes the objective function (operation 504). The model and directive generator generates the CP search directive. The CP search directive includes the objective function. The CP search directive may be stored as a software data structure. The CP search directive may include one or more arrays, vectors, linked lists, tables, software variables, constants, and / or data objects. The CP search directive may include a set of instructions executable by one or more devices, including a hardware processor.
[0123] 5B, one or more embodiments include generating an objective function that minimizes the sum of the set of cost elements per consumer (operation 506). The model and command generator generates the objective function that minimizes the sum of the set of cost elements per consumer. The objective function can be expressed as:
[0124]
number
[0125] CC[i] represents the cost element per consumer, where i corresponds to a consumer in the computing system.
[0126] Alternatively, the objective function can be expressed as: min(TC) TC represents the total cost element.
[0127] One or more embodiments include generating a CP search directive that includes the objective function (operation 508). Example operations for generating a CP search directive are described above with reference to operation 504.
[0128] 5C, one or more embodiments include generating an objective function that minimizes the average of the set of cost components per consumer (operation 510). The model and command generator generates the objective function that minimizes the average of the set of cost components per consumer. The objective function can be expressed as:
[0129] min(ave(CC)) CC represents a set of cost elements per consumer.
[0130] One or more embodiments include generating a CP search directive that includes the objective function (operation 512). Example operations for generating a CP search directive are described above with reference to operation 504.
[0131] 6 illustrates an example set of operations for applying a constraint programming data model and constraint programming search directives to a constraint programming solver in accordance with one or more embodiments. The operations in FIG. 6 assume a CP search directive that specifies minimizing the total cost of a computing system. However, modified operations can also be used to implement different CP search directives.
[0132] One or more embodiments include accepting, by a CP solver, a CP data model and a CP search directive as input parameters (act 602). A CP solver (such as CP solver 218 of FIG. 2A) accepts the CP data model and the CP search directive as input parameters. Example operations for generating a CP data model are described above with reference to FIG. 4. Example operations for generating a CP search directive are described above with reference to FIGS. 5A-5C.
[0133] One or more embodiments include determining whether the CP solver can return a CP solution based on the CP data model and the CP search directives (act 604). The CP solver applies one or more constraint programming techniques, guided by the CP search directives, to the CP data model. The CP solver 132 determines a CP solution based on the CP data model and the CP search directives, or determines that no CP solution exists that satisfies all of the constraints of the CP data model.
[0134] Constraint programming techniques include, for example, constraint propagation, backtracking search algorithms, and / or forward-checking algorithms. Constraint propagation involves removing inconsistent values from the domain of data model elements in the CP data model. Backtracking search algorithms involve incrementally building candidate CP solutions, such as abandoning candidates as soon as the CP solver determines that a candidate cannot be completed to provide a valid CP solution. Forward-checking algorithms include attempting to predict the impact of selecting one candidate CP solution over others and determining the order in which to try candidate CP solutions. In one embodiment, the CP solver updates the domain of a data model element as the CP solver traverses the data model element and assigns values to the data model element. The CP solver removes values from the domain that are no longer possible, taking into account previous pre-assignments. The CP solver removes values from the domain that violate any constraints of the CP data model.
[0135] As an example, a CP solver can traverse each of a set of constraint elements specified by a CP data model to determine a CP solution. The CP solver can start with a particular constraint element. A value from the domain of the particular constraint element is pre-assigned to the particular constraint element. Next, the CP solver removes values from the domains of other data model elements of the CP data model that conflict with the pre-assigned value for the particular constraint element. If this pre-assignment violates a constraint specified by the CP data model (e.g., the domain of another data model element is completely removed), another value from the domain of the particular constraint element is pre-assigned to the particular constraint element. All values from the domain of the particular constraint element are tried, and if none satisfy the constraint, a reassignment of one or more previously traversed constraint elements is performed. In particular, a value from the domain of a previously traversed constraint element was pre-assigned to the previously traversed constraint element. Based on the need for reassignment, another value from the domain of a previously traversed constraint element is pre-assigned to the previously traversed constraint element. Then, the assignment of the particular constraint element is retried.
[0136] Additionally, the CP solver can be guided by an objective function specified by a CP search directive. Based on the CP search directive, the CP solver can determine the order in which value assignments to one or more constraint and / or guarantee elements are attempted. If the assignment of value A to a particular constraint element is attempted before value B and a valid CP solution is found, the assignment of value A is completed regardless of whether the assignment of value B resulted in a valid CP solution. Therefore, the assignment of value A takes precedence over value B.
[0137] Thus, the CP solver can traverse each constraint element until it is assigned a limit value from its respective domain without violating any constraints. The CP solver can determine the prior assignments as the final assignments. The CP solution can include final assignments of limit values to constraint elements and / or guaranteed values to guaranteed elements.
[0138] Alternatively, the CP solver may traverse each constraint element, attempting to assign each constraint value to the constraint element, until no assignment satisfies the constraint. The CP solver may then determine that there is no valid CP solution for the CP data model. The CP solver may return a message indicating that no CP solution exists.
[0139] If a CP solution is not returned, one or more embodiments include returning a resource limit and / or a resource guarantee using the last determined CP solution (operation 614). Because the current iteration does not return a CP solution, the CP solver obtains the CP solution returned in the last iteration. The CP solver identifies the CP solution from the last iteration as the last determined CP solution. The CP solver also identifies the CP solution from the last iteration as the CP solution that satisfies the objective function of the CP search directive. If the objective function minimizes total cost, the CP solution from the last iteration is the CP solution associated with the lowest total cost (compared to other CP solutions that satisfy the constraints of the CP data model). The CP solution specifies limit values assigned to limit elements and / or guarantee values assigned to guarantee elements. The limit values are used as resource limits for consumers in the computing system. The guarantee values are used as resource guarantees for consumers in the computing system.
[0140] If there is no final CP solution determined (i.e., the CP solver is unable to return a CP solution in the first iteration of operation 602), then the CP solver generates a message indicating that no valid CP solution exists for the provided CP data model.
[0141] Conversely, if a CP solution is returned, one or more embodiments include determining whether an interrupt to the iterative process has been received (operation 606). As shown, operations 602-612 form an iterative process for finding a CP solution associated with the lowest total cost. A user and / or application may interrupt the iterative process. As an example, a user may indicate via a user interface that they would like the best CP solution determined so far, without waiting for the iterative process to complete.
[0142] If an abort is received, one or more embodiments include returning resource limits and / or resource guarantees using the last determined CP solution (operation 614). Because the CP solution is returned in the current iteration, the CP solver identifies the CP solution from the current iteration as the last determined CP solution. Example operations for determining resource limits and / or resource guarantees based on the CP solution are provided above in the description of operation 614.
[0143] In one embodiment, the CP solver may receive an interruption (at acts 602-604) while in the process of determining a CP solution. The interruption is received before the CP solution is returned in the current iteration. Thus, the CP solver identifies the CP solution from the last iteration as the last CP solution to be determined.
[0144] The CP solution last determined based on the interruption may not necessarily be the CP solution associated with the lowest total cost. A request may be received to restart the iterative process for determining the CP solution associated with the lowest total cost. In response to the request to restart, the iterative process may continue at operation 608.
[0145] If no interruption is received, one or more embodiments include identifying a total cost associated with the CP solution as the "current minimum total cost" (operation 608). The CP solver identifies a total cost assigned to the total cost elements associated with the CP solution obtained in operation 604 for the current iteration. The total cost is identified as the "current minimum total cost."
[0146] One or more embodiments include removing any values from the domain of the total cost element that are greater than or equal to the current minimum total cost (operation 610). The CP solver uses the current minimum total cost as an upper bound on total cost values that may be assigned to the total cost element during the next iteration. The CP solver removes values from the domain of the total cost element that are greater than or equal to the current minimum total cost.
[0147] As an example, during the current iteration, the CP solver may return the current CP solution. The current CP solution may indicate that a total cost element is assigned a total cost value of "9." The CP solver may determine "9" as the current minimum total cost. The CP solver may determine that the current domain of the total cost element is {0, 4, 5, 8, 9, 11, 12}. The CP solver may remove total cost values equal to or greater than 9 from the domain of the total cost element. Thus, the CP solver may change the domain of the total cost element to be {0, 4, 5, 8}.
[0148] One or more embodiments include modifying the CP data model (operation 612). The CP solver modifies the CP data model to include the total cost element whose domain has been reduced. Based on operation 610, the domain of the total cost element includes only total cost values that are less than the current minimum total cost.
[0149] The CP solver iterates through operations 602-612 with respect to the modified CP data model. In operation 602, the CP solver accepts the modified CP data model as an input parameter. In operations 604-608, the CP solver updates the current minimum total cost, assuming that the CP solver determines a new CP solution based on the modified CP data model. The CP solver identifies the total cost value assigned to the total cost element associated with the new CP solution as the current minimum total cost. In operation 610, the CP solver removes any values from the domain of the total cost element that are greater than or equal to the current minimum total cost value. In operation 612, the CP solver again modifies the CP data model. The CP solver continues the iterative process until the CP solver is unable to find a CP solution in operation 604 or an interrupt is received in operation 606. As described above with reference to operation 614, if the CP solver is unable to find a CP solution in operation 604 or receives an interruption in operation 606, the CP solver returns the resource limits and / or resource guarantees using the last determined CP solution. If the CP solver completes the iterations without interruption, the last determined CP solution becomes the optimal solution, i.e., there is no other solution with a lower cost.
[0150] In one or more embodiments, additional and / or alternative operations for applying the constraint programming data model and search directives to the constraint programming solver may be performed based on different search techniques. Examples of various search techniques are described below.
[0151] In one embodiment, the CP data model is modified before initially applying the CP solver in operation 602. A particular value within the range of possible total cost values within the domain of the total cost element is determined as an initial cutoff value. The initial cutoff value may be, for example, the median of the possible total cost values. All values above the initial cutoff value are removed from the domain of the total cost element. Thus, a first run of the CP solver is required to generate a CP solution with a total cost value below the initial cutoff value. If a valid CP solution exists, setting the initial cutoff value may allow the CP solver to more efficiently arrive at a CP solution with a lower total cost.
[0152] In one embodiment, the CP solver iterates until all possible CP solutions for a particular CP data model are found. The CP solver does not change the domain of the total cost element based on previous iterations. Thus, the CP solver may find a CP solution with a higher total cost value than a previous CP solution. After determining all possible CP solutions, the CP solver compares the total cost values associated with each possible CP solution. The CP solver then identifies the CP solution with the lowest total cost value.
[0153] In one embodiment, multiple CP solutions can be associated with the same lowest total cost. The iterative process can be modified to determine such a CP solution. At operation 610, all values greater than the current minimum total cost are removed from the domain of the total cost element (but all values equal to the current minimum total cost are retained). At operation 604, the CP solver attempts to find a CP solution that has not yet been found. If no further CP solutions are found, at operation 614, the set of last determined CP solutions having the same total cost is identified. A CP solution is selected from the set of last determined CP solutions having the same total cost. Any selection criteria can be used. As an example, the CP solver may select a CP solution from the set of last determined CP solutions having the same total cost that is associated with resource constraints that are most evenly distributed across consumers.
[0154] In one or more embodiments, additional and / or alternative operations for applying the constraint programming data model and search directives to the constraint programming solver may be performed based on various CP search directives. Examples of various CP search directives are described below.
[0155] In one embodiment, the CP search directive specifies that the maximum value of the set of per-consumer cost components be minimized. Operations 602-606 and 612-614 remain the same. However, operation 608 is modified to identify the maximum value of the set of per-consumer cost components as the "current minimum maximum per-consumer cost." Operation 610 is modified to remove any values greater than or equal to the current minimum maximum per-consumer cost from the domain of each per-consumer cost component.
[0156] In one embodiment, the CP search directive specifies minimizing the average of a set of cost components per consumer. The CP data model includes an additional data model element called average cost component. The average cost component has a domain that includes the possible average costs per consumer in the computing system. The average cost component should equal the sum of the cost components per consumer divided by the total number of consumers. Operations 602-606 and 612-614 remain the same. However, operation 608 is modified to identify the value of the average cost component as the "current minimum average cost." Operation 610 is modified to remove any value greater than or equal to the current minimum average cost from the domain of the average cost component.
[0157] 6. Enforcing resource guarantees and resource limits One or more of the operations shown in Figures 7-8 may be modified, rearranged, and / or omitted altogether, and therefore the particular sequence of operations shown in Figures 7-8 should not be construed as limiting the scope of one or more embodiments.
[0158] FIG. 7 illustrates an example set of operations for assigning resources to consumers based on resource guarantees being updated by a constraint programming solver, according to one or more embodiments.
[0159] One or more embodiments include obtaining resource limits and / or resource guarantees for consumers in the computing system (operation 702). A resource manager (such as resource manager 110 of FIG. 1) obtains resource limits and / or resource guarantees for consumers in the computing system based on a CP solution that has been determined by a CP solver (such as CP solver 218 of FIG. 2A). Example operations for determining a CP solution are described above with reference to FIG. 6, and in particular operation 614.
[0160] One or more embodiments include assigning resources to the consumer based on the resource guarantees (operation 704). The resource manager assigns resources to the consumer based on the resource guarantees. In one embodiment, the resource manager assigns resources to the consumer based on the resource guarantees determined by the CP solver without receiving user confirmation for the resource guarantees.
[0161] As an example, a computing system may include three database instances DB1, DB2, and DB3, and eight CPUs: CPU1, CPU2, CPU3, CPU4, CPU5, CPU6, CPU7, and CPU8. In a CP solution, the following resource guarantees may be specified: DB1 has 2 CPUs, 3 CPUs for DB2, For DB3, 1 CPU.
[0162] Therefore, the resource manager can designate two CPUs for DB1, three CPUs for DB2, and one CPU for DB3. Specifically, the resource manager can designate CPU1 and CPU3 for DB1, CPU4, CPU6, and CPU8 for DB2, and CPU2 for DB3. The designated resources are reserved for use by the corresponding consumer and are unavailable to other consumers in the computing system. Therefore, consumers using the designated resources are not vulnerable to interruptions caused by requests from other consumers in the computing system. Meanwhile, CPU5 and CPU7 remain undesignated and are available for sharing among database instances.
[0163] One or more embodiments include determining whether the resource limits and / or resource guarantees have been updated (operation 706). The resource manager determines whether the resource limits and / or resource guarantees have been updated. If so, the resource manager redetermines the resource assignments in operation 704.
[0164] FIG. 8 illustrates an example set of operations for queuing process requests that exceed resource limits updated by a constraint programming solver, in accordance with one or more embodiments.
[0165] One or more embodiments include determining that a particular consumer within a computing system has generated a new process request that requires a resource within the computing system (act 802). A resource manager (such as resource manager 110 of FIG. 1) determines that a particular consumer within the computing system has generated a new process request that requires a resource within the computing system. The particular consumer may submit the new process request to the resource manager for scheduling. Additionally, or alternatively, the particular consumer may send a notification message to the resource manager to inform the resource manager about the new process request.
[0166] One or more embodiments include determining the number of pending process requests made by the particular consumer (act 804). The resource manager determines the number of process requests (including new process requests) that (a) have been made by the particular consumer and (b) have not yet been fully processed.
[0167] One or more embodiments include determining whether the number of pending process requests is less than or equal to the resource guarantee for the particular consumer (operation 806). The resource manager determines whether the number of pending process requests is less than or equal to the resource guarantee for the particular consumer. In one embodiment, the resource manager uses the resource guarantee determined by the CP solver as a threshold without receiving user confirmation of the resource guarantee determined by the CP solver.
[0168] If the number of pending process requests is less than or equal to the resource guarantee, one or more embodiments include allocating the specified resource to the new process request (operation 808). The resource manager allocates the resource to the new process request. In one embodiment, the resource manager is set to allocate the specified resource as much as possible. Because the number of pending process requests is less than or equal to the resource guarantee, at least one of the specified resources is available. Therefore, the resource manager allocates an available dedicated resource to the new process request.
[0169] If the number of pending process requests exceeds the resource guarantee, one or more embodiments include determining whether the number of pending process requests is greater than a resource limit for the particular consumer (operation 810). The resource manager determines whether the number of pending process requests exceeds the resource limit for the particular consumer. In one embodiment, the resource manager uses the resource limit determined by the CP solver as a threshold without receiving user confirmation of the resource limit determined by the CP solver.
[0170] If the number of pending process requests is greater than the resource limit, one or more embodiments include queuing the new process request (act 814). The resource manager queues the new process request. Resources within the computing system are not allocated to the process request in the queue until the process request is removed from the queue.
[0171] If the number of process requests being processed for a particular consumer falls below a resource limit, the resource manager has the option of removing the process request from the queue for the particular consumer. If another resource is available, the resource manager may allocate the available resource to the process request being removed from the queue. If no resource is available, the resource manager may optionally suspend the ongoing execution of a particular resource for a process request made by another consumer. The resource manager allocates the particular resource to the process request being removed from the queue for the particular consumer. Alternatively, if no resource is available, the resource manager may refrain from suspending any ongoing execution. Whether to suspend may depend on various factors, examples of which are described below with reference to operation 812.
[0172] If the number of pending process requests is (a) greater than the resource guarantee and (b) less than or equal to the resource limit, one or more embodiments include either allocating resources to the new process request or queuing the process request (operation 812). If at least one resource is available and the queue for the particular consumer is empty, the resource manager allocates the available resources to the new process request. If at least one resource is available and the queue for the particular consumer is not empty, the resource manager removes the process request from the head of the queue and allocates the available resources to the process request. The resource manager adds the new process request to the end of the queue.
[0173] If no resources are available, the resource manager may evaluate various factors to determine whether to suspend the ongoing execution of a process request made by another consumer. Example factors include the priority levels associated with the new process request made by the particular consumer and other running process requests, the priority levels associated with the particular consumer and other consumers, the time the other process requests have been running, the predicted time remaining until the execution of the other process requests is completed, and the predicted time until the execution of the new process request made by the particular consumer is completed. Based on various factors, the resource manager may suspend the ongoing execution of a process request by a particular resource. The resource manager may allocate a particular resource to a process request being removed from the queue of a particular consumer (or to a new process request being created by a particular consumer if the queue is empty). Alternatively, based on various factors, the resource manager may queue the new process request and continue to wait before allocating resources to any process request made by a particular consumer.
[0174] 7. Hardware Overview According to one embodiment, the techniques described herein are implemented by one or more special-purpose computing devices. The special-purpose computing devices may be hardwired to perform the techniques or may include digital electronic devices such as one or more application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or network processing units (NPUs) that are permanently programmed to perform the techniques, or may include one or more general-purpose hardware processors that are programmed to perform the techniques according to program instructions in firmware, memory, other storage, or a combination thereof. Such special-purpose computing devices may also combine custom hardwired logic, ASICs, FPGAs, or NPUs with custom programming to implement the techniques. The special-purpose computing devices may be desktop computer systems, portable computer systems, handheld devices, network devices, or other devices that incorporate hardwired and / or program logic to implement the techniques.
[0175] 9 is a block diagram illustrating a computer system 900 in which embodiments of the present invention may be implemented. Computer system 900 includes a bus 902 or other communication mechanism for communicating information, and a hardware processor 904 coupled to bus 902 for processing information. Hardware processor 904 may be, for example, a general-purpose microprocessor.
[0176] Computer system 900 also includes a main memory 906, such as a random access memory (RAM) or other dynamic storage device, coupled to bus 902 for storing information and instructions executed by processor 904. Main memory 906 may also be used for storing temporary variables or other intermediate information during execution of instructions executed by processor 904. Such instructions, when stored on a non-transitory storage medium accessible to processor 904, render computer system 900 into a special-purpose machine that is customized to perform the operations specified in the instructions.
[0177] Computer system 900 further includes a read-only memory (ROM) 908 or other static storage device coupled to bus 902 for storing static information and instructions for processor 904. A storage device 910, such as a magnetic disk or optical disk, is provided and coupled to bus 902 for storing information and instructions.
[0178] Computer system 900 may be coupled via bus 902 to a display 912, such as a cathode ray tube (CRT), for displaying information to a computer user. An input device 914, including alphanumeric and other keys, is coupled to bus 902 for communicating information and command selections to processor 904. Another type of user input device is a cursor control 916, such as a mouse, trackball, or cursor direction keys, for communicating directional information and command selections to processor 904 and for controlling cursor movement on display 912. This input device typically has two degrees of freedom in two axes, a first axis (e.g., x) and a second axis (e.g., y), allowing the device to specify a position in a plane.
[0179] Computer system 900 can implement the techniques described herein using customized hardwired logic, one or more ASICs or FPGAs, firmware, and / or program logic that, in combination with the computer system, makes computer system 900 a special-purpose machine or program. According to one embodiment, the techniques herein are performed by computer system 900 in response to processor 904 executing one or more sequences of one or more instructions contained in main memory 906. Such instructions may be read into main memory 906 from another storage medium, such as storage device 910. Execution of the sequences of instructions contained in main memory 906 causes processor 904 to perform the process steps described herein. In alternative embodiments, hardwired circuitry may be used in place of or in combination with software instructions.
[0180] The term "storage medium," as used herein, refers to any non-transitory medium that stores data and / or instructions that cause a machine to operate in a specific manner. Such storage media can include non-volatile media and / or volatile media. Non-volatile media include, for example, optical or magnetic disks, such as storage device 910. Volatile media include dynamic memory, such as main memory 906. Common forms of storage media include, for example, floppy disks, flexible disks, hard disks, solid-state drives, magnetic tape or other magnetic data storage media, CD-ROMs, other optical data storage media, any physical media with a pattern of holes, RAM, PROMs, and EPROMs, FLASH-EPROMs, NVRAMs, other memory chips or cartridges, content addressable memories (CAMs), and ternary content addressable memories (TCAMs).
[0181] Storage media is distinct from but may be used in combination with transmission media. Transmission media involves transferring information between storage media. For example, transmission media include coaxial cables, copper wire and fiber optics, including the wires that comprise bus 902. Transmission media can also take the form of acoustic or light waves, such as those generated during radio wave or infrared data communications.
[0182] Various forms of media may be involved in carrying one or more sequences of one or more instructions to processor 904 for execution. For example, the instructions may initially be stored on a magnetic disk or solid state drive of a remote computer. The remote computer may load the instructions into a dynamic memory and send the instructions over a telephone line using a modem. A modem local to computer system 900 can receive the data on the telephone line and use an infrared transmitter to convert the data to an infrared signal. An infrared detector can receive the data carried in the infrared signal and appropriate circuitry can place the data on bus 902. Bus 902 carries the data to main memory 906, from which processor 904 retrieves and executes the instructions. The instructions received by main memory 906 may optionally be stored on storage device 910 either before or after execution by processor 904.
[0183] Computer system 900 also includes a communication interface 918 coupled to bus 902. The communication interface 918 provides a two-way data communication coupling to a network link 920 that is connected to a local network 922. For example, communication interface 918 may be an Integrated Services Digital Network (ISDN) card, a cable modem, a satellite modem, or a modem that provides a data communication connection to a corresponding type of telephone line. As another example, communication interface 918 may be a local area network (LAN) card to provide a data communication connection to a compatible LAN. Wireless links may also be implemented. In such implementations, communication interface 918 sends and receives electrical, electromagnetic, or optical signals that carry digital data streams representing various types of information.
[0184] Network link 920 typically provides data communication through one or more networks to other data devices. For example, network link 920 may provide a connection through local network 922 to a host computer 924 or to data equipment operated by an Internet Service Provider (ISP) 926. ISP 926, in turn, provides data communication services through the worldwide packet data communication network now commonly referred to as the "Internet" 928. Local network 922 and Internet 928 both use electrical, electromagnetic, or optical signals that carry digital data streams. The signals through the various networks, the signals on network link 920, and the signals through communication interface 918, which carry the digital data to and from computer system 900, are exemplary forms of transmission media.
[0185] Computer system 900 can send messages and receive data, including program code, through the network(s), network link 920 and communication interface 918. In the Internet example, a server 930 might transmit a requested code for an application program through Internet 928, ISP 926, local network 922 and communication interface 918.
[0186] The received code may be executed by processor 904 as it is received, and / or stored in storage device 910, or other non-volatile storage for later execution.
[0187] 8.Others;Extensions Embodiments are directed to systems with one or more devices that include a hardware processor and are configured to perform any of the operations described herein and / or recited in any of the claims below.
[0188] In one embodiment, a non-transitory computer-readable storage medium comprises instructions that, when executed by one or more hardware processors, cause performance of any of the operations described and / or claimed herein.
[0189] Any combination of the features and functions described herein may be used in accordance with one or more embodiments. The foregoing specification has described embodiments with reference to numerous specific details that may vary from implementation to implementation. Accordingly, the specification and drawings should be regarded in an illustrative, rather than a restrictive, sense. The sole and exclusive indication of the scope of the invention, and what the applicant intends to be the scope of the invention, is the literal equivalent range of the set of claims issuing from this application in the particular form in which such claims are issued, including any subsequent amendments.
Claims
1. A program for causing a processor to execute a method, comprising: The method comprises: determining a set of consumers and a set of resources in a computing system; obtaining a set of resource usage data sets corresponding to the set of consumers over a particular time period; A particular resource usage dataset corresponds to a particular consumer, The method further includes generating a set of excess distributions each corresponding to the set of consumers; generating a particular excess distribution corresponding to the particular consumer, determining a respective number of data points in the particular resource usage data set that indicate resource usage by the particular consumer exceeds each of a set of critical values; The method further includes generating a constraint programming data model; Generating a constraint programming data model includes: specifying a set of limit elements each representing a resource limit for said set of consumers; a resource limit for the particular consumer is an upper limit on the number of resources that the particular consumer is allowed to use at a particular time; specifying a set of guarantee elements each representing a resource guarantee for said set of consumers; the resource guarantee for the particular consumer is a lower bound on the number of resources that the particular consumer may access at a particular time; a particular assurance element of the set of assurance elements corresponds to the particular consumer; specifying a set of vulnerability elements based on said set of resource usage datasets, each vulnerability element representing a vulnerability count for said set of consumers; the vulnerability count for the particular consumer is the number of data points that indicate a vulnerability based on the resource usage data set for the particular consumer over the particular time period; a particular vulnerability element of the set of vulnerability elements corresponds to the particular consumer; specifying a set of assurance-vulnerability constraints associated with said set of assurance elements and said set of vulnerability elements; the guarantee-vulnerability constraint corresponding to the particular consumer requires assigning a counter value to the particular vulnerability element that corresponds to the guarantee value assigned to the particular guarantee element based on the particular excess distribution; The method further includes generating constraint programming search commands; Generating a constraint programming search directive comprises: specifying a minimization objective function associated with said set of vulnerability elements; The method further includes applying the constraint programming data model and the constraint programming search directives to a constraint programming solver to obtain at least one of the resource restrictions for the set of consumers and the resource guarantees for the set of consumers. program.
2. a particular limiting element of the set of limiting elements corresponds to the particular consumer; Generating a constraint programming data model includes: specifying a set of limit-guarantee constraints associated with the set of limit elements and the set of guarantee elements; a limit-guarantee constraint corresponding to the particular consumer requiring that the particular guarantee factor be equal to the particular limit factor divided by an oversubscription rate; The program of claim 1 , wherein the oversubscription rate is equal to the sum of the set of limiting factors divided by the total number of resources.
3. a particular limiting element of the set of limiting elements corresponds to the particular consumer; Generating a constraint programming data model includes: specifying a total resource constraint and a total number of resources associated with the set of guarantee elements; The program of claim 1 , wherein the total resource constraint requires that the sum of the set of guarantee elements be less than or equal to the total number of resources.
4. The minimization objective function is: the maximum value of said set of vulnerability elements; the sum of said set of vulnerability elements, and the average of said set of vulnerability elements The program according to claim 1 , wherein at least one of
5. The method further comprises: obtaining a set of vulnerability coefficients respectively corresponding to said set of consumers; a particular vulnerability factor corresponds to said particular consumer; Generating a constraint programming data model includes: specifying a set of per-consumer cost elements each representing a cost to the consumer attributable to a vulnerability over the specified time period, wherein a particular per-consumer cost element corresponds to the particular consumer; specifying a set of per-consumer cost constraints associated with said set of vulnerability coefficients and said set of vulnerability elements, wherein a per-consumer cost constraint corresponding to said particular consumer requires said particular per-consumer cost element to be equal to the product of (a) said particular vulnerability coefficient and (b) said particular vulnerability element; The program of claim 1 , wherein the minimization objective function is further associated with the set of cost components per consumer.
6. The minimization objective function is: the maximum value of said set of cost elements per consumer; the sum of said set of cost elements per consumer; and Average of said set of cost elements per consumer The program according to claim 5, wherein at least one of the following is minimized:
7. The method further comprises: obtaining a set of vulnerability coefficients respectively corresponding to said set of consumers; a particular vulnerability factor corresponds to said particular consumer; Generating a constraint programming data model includes: specifying a total cost element representing the total cost to the consumer attributable to vulnerabilities over the specified time period; specifying a total cost constraint associated with the set of vulnerability coefficients and the set of vulnerability elements, the total cost constraint requiring the total cost element to be equal to a dot product of (a) the set of vulnerability coefficients and (b) the set of vulnerability elements; The program of claim 1 , wherein the minimization objective function is further associated with the total cost component.
8. The method further comprises: obtaining a set of vulnerability coefficients respectively corresponding to said set of consumers; a particular vulnerability factor corresponds to said particular consumer; Generating a constraint programming data model includes: specifying a set of per-consumer cost elements each representing a cost to the consumer attributable to a vulnerability over the specified time period, wherein a particular per-consumer cost element corresponds to the particular consumer; specifying a total cost element representing a total cost to the consumer attributable to the vulnerability over the specified time period; specifying a set of per-consumer cost constraints associated with said set of vulnerability coefficients and said set of vulnerability elements, wherein a per-consumer cost constraint corresponding to said particular consumer requires said particular per-consumer cost element to be equal to the product of (a) said particular vulnerability coefficient and (b) said particular vulnerability element; specifying a total cost constraint associated with said set of vulnerability coefficients and said set of vulnerability elements, said total cost constraint requiring said total cost element to be equal to the sum of said set of per-consumer cost elements; The program of claim 1 , wherein the minimization objective function is further associated with at least one of (a) the set of per-consumer cost components and (b) the total cost component.
9. The assurance-vulnerability constraints are expressed as element constraints, The particular guarantee element is used as an input index element to the element constraint; The particular excess distribution is used as the input set of values to the element constraints; and The program of claim 1 , wherein the specific vulnerability element is used as an output to the element constraint.
10. The program of claim 1 , wherein the set of resource usage data over a particular period of time comprises resource usage data measured over a historical period of time.
11. The program of claim 1 , wherein the set of resource usage data over a particular time period includes projected resource usage data over a future time period.
12. The method further comprising:
2. The program of claim 1, further comprising assigning to the particular consumer a number of the set of resources equal to a resource guarantee determined for the particular consumer by the constraint programming solver.
13. 13. The program of claim 12, wherein resources designated for the particular consumer cannot be used by other consumers in the set of consumers.
14. The method further comprising: determining whether the number of pending process requests made by the particular consumer is greater than a resource limit determined for the particular consumer by the constraint programming solver; 2. The program of claim 1, further comprising, in response to determining that a number of pending process requests exceeds the resource limit, adding a new process request made by the particular consumer to a queue rather than allocating resources to the new process.
15. 15. The program of claim 14, wherein no resources are allocated to any process request in the queue.
16. The method further comprising: obtaining a second set of resource usage data sets corresponding respectively to said set of consumers over a second time period; generating a second set of excess distributions respectively corresponding to the set of consumers based on the second set of resource usage data sets; generating a second constraint programming data model based on the second set of excess distributions; and 2. The program of claim 1, further comprising applying at least the second constraint programming data model to the constraint programming solver to obtain at least one of updated resource limits for the set of consumers and updated resource guarantees for the set of consumers.
17. 2. The program of claim 1, wherein the constraint programming solver periodically updates at least one of the resource limits for the set of consumers and the resource guarantees for the set of consumers based on an updated resource usage data set.
18. The method further comprises: obtaining a set of vulnerability coefficients respectively corresponding to said set of consumers; a particular vulnerability factor corresponds to said particular consumer; a particular limiting element of the set of limiting elements corresponds to the particular consumer; Generating a constraint programming data model includes: specifying a set of limit-guarantee constraints associated with the set of limit elements and the set of guarantee elements; a limit-guarantee constraint corresponding to the particular consumer requiring that the particular guarantee factor be equal to the particular limit factor divided by an oversubscription rate; the oversubscription rate is equal to the sum of the set of limiting factors divided by the total number of resources; specifying a total resource constraint and a total number of resources associated with the set of guarantee elements; the total resource constraint requires that the sum of the set of guarantee elements is less than or equal to the total number of resources; specifying a set of per-consumer cost elements each representing a cost to the consumer attributable to a vulnerability over the specified time period, wherein a particular per-consumer cost element corresponds to the particular consumer; specifying a total cost element representing a total cost to the consumer attributable to the vulnerability over the specified time period; specifying a set of per-consumer cost constraints associated with said set of vulnerability coefficients and said set of vulnerability elements, wherein a per-consumer cost constraint corresponding to said particular consumer requires said particular per-consumer cost element to be equal to the product of (a) said particular vulnerability coefficient and (b) said particular vulnerability element; and specifying a total cost constraint associated with the set of vulnerability coefficients and the set of vulnerability elements, wherein the total cost constraint: (i) said total cost component is equal to the dot product of (a) said set of vulnerability coefficients and (b) said set of vulnerability components; and (ii) said total cost element is equal to the sum of said set of cost elements per consumer; At least one of The minimization objective function is: the maximum value of said set of vulnerability elements; the sum of said set of vulnerability elements, and the average of said set of vulnerability elements; the maximum value of said set of cost elements per consumer; the sum of said set of cost elements per consumer; the average of said set of cost elements per consumer; and said total cost elements; Minimize at least one of The assurance-vulnerability constraints are expressed as element constraints, The particular guarantee element is used as an input index element to the element constraint; The particular excess distribution is used as an input set of values to the element constraints; and The particular vulnerability element is used as an output to the element constraint; the set of resource usage data sets over a particular time period includes at least one of (a) resource usage data measured over a historical time period, and (b) resource usage data projected over a future time period; The method further includes assigning to the particular consumer a number of the set of resources equal to a resource guarantee determined for the particular consumer by the constraint programming solver; resources designated for said particular consumer cannot be used by other consumers in said set of consumers; determining whether the number of pending process requests made by the particular consumer is greater than a resource limit determined for the particular consumer by the constraint programming solver; in response to determining that the number of pending process requests exceeds the resource limit, adding new process requests made by the particular consumer to a queue rather than allocating resources to the new process; No resources are allocated to any process requests in said queue; obtaining a second set of resource usage data sets corresponding respectively to said set of consumers over a second time period; generating a second set of excess distributions respectively corresponding to the set of consumers based on the second set of resource usage data sets; generating a second constraint programming data model based on the second set of excess distributions; and applying at least the second constraint programming data model to the constraint programming solver to obtain at least one of updated resource restrictions for the set of consumers and updated resource guarantees for the set of consumers; 2. The program of claim 1, wherein the constraint programming solver periodically updates at least one of the resource limits for the set of consumers and the resource guarantees for the set of consumers based on an updated resource usage data set.
19. A method according to any one of claims 1 to 18.
20. A system comprising means for executing a method according to any one of claims 1 to 18.
Citation Information
Patent Citations
Congestion solving method for information processing device, and information processing device
JP2014153841A
Resource management device and resource management method
JP2017191485A
System and method for tag based resource limits or quotas in a cloud infrastructure environment
WO2021030219A1