This application claims the benefit of Japanese Priority Patent Application JP 2013-033451 filed Feb. 22, 2013, the entire contents of which are incorporated herein by reference.
The present disclosure relates to an information processing apparatus, a resource control method, and a program.
In recent years, computer use forms called cloud computing have been widely utilized. According to a definition by the National Institute of Standards and Technology, cloud computing is a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources and a model for allocating and providing resources rapidly with minimal use procedures or minimal interactions with a service provider.
One of the characteristics of cloud computing is to provide scalable resources and execute scale-in or scale-out of the resources rapidly or automatically in response to a request of a user or an application. In general, scale-in refers to reduction of the size (scale) of resources and scale-out refers to expansion of the size of resources. For example, “Auto Scaling,” [online] [searched on 28 Jan. 2013] Internet <URL: http://aws.amazon.com/en/autoscaling/> describes a method of automatically increasing an allocation number of instances of a physical or virtual application server when a load of a process is greater than a threshold value set in advance by a user. JP 2011-118525A discloses a method of executing scale-in or scale-out of a server based on a future load predicted using a history of the load of the server.
However, not only a processor but also various resources such as a memory, an input/output (I/O) device, and a communication device are associated with a server. In scale-in and scale-out in units of servers, it is difficult to use the resources without waste.
Accordingly, it is desirable to realize a structure capable of efficiently utilizing resources rather than rough resource control in units of servers.
According to an embodiment of the present disclosure, there is provided an information processing apparatus including a determination unit that determines whether to change a number of processes allocated to one or more program modules, based on a measurement result of a load of each program module when the program modules that form an application are executed using scalable processing resources.
According to an embodiment of the present disclosure, there is provided a resource control method executed by an information processing apparatus, the resource control method including determining whether to change a number of processes allocated to one or more program modules, based on a measurement result of a load of each program module when the program modules that form an application are executed using scalable processing resources.
According to an embodiment of the present disclosure, there is provided a program for causing a computer that controls an information processing apparatus to function as a determination unit that determines whether to change a number of processes allocated to one or more program modules, based on a measurement result of a load of each program module when the program modules that form an application are executed using scalable processing resources.
According to embodiments of a technology related to the present disclosure, it is possible to utilize computing resources more efficiently than resource control in units of servers.
Hereinafter, preferred embodiments of the present disclosure will be described in detail with reference to the appended drawings. Note that, in this specification and the appended drawings, structural elements that have substantially the same function and structure are denoted with the same reference numerals, and repeated explanation of these structural elements is omitted.
The description will be made in the following order.
1. Introduction
2. First embodiment
3. Second embodiment
4. Conclusion
First, an introduction of an information processing apparatus according to an embodiment will be described with reference to
The computing system 10 is a system that has resources used to execute an application. More specifically, the computing system 10 executes one or more program modules included in an application using scalable processing resources. In the example of
In an existing cloud computing system, resources can be virtualized in units of servers. The number of virtual servers can be dynamically changed according to needs of a user or an application. In the example of
Each of the servers S1, S2 . . . , and SM includes one or more processes Pij (where i=1, 2, . . . , M and j=1, 2, . . . , and NM) in order to realize more flexible scalability of resources. Here, Ni is the number of processes of an ith server. For example, in order to process so-called “big data” in real time, processing resources are managed with a hierarchical structure called servers and processes in a Storm framework suggested by the developers of Twitter (registered trademark). Storm is an example of a framework available to realize a technology related to an embodiment of a technology related to the present disclosure.
Here, although the processing resources are hierarchized to servers and processes, resources may be wasted when scale-in and scale-out of the resources are performed in units of servers as in the existing structure.
A load L1 is a load measured for the program module M1. A load L2 is a load measured for the program module M2. Here, for example, when an increase in process requests to an application is detected or predicted and it is desirable to avoid an increase in the load L2, the scale-out in units of servers for the program module M2 can be performed. Referring to
Accordingly, in an embodiment of a technology related to the present disclosure, the information processing apparatus 100 is introduced to control resources to be allocated to respective program modules in units of processes. The information processing apparatus 100 adjusts a load so that a desired performance (a throughput, a delay time, or the like) of an application is satisfied, while efficiently using resources of the computing system 10 by controlling resources to be allocated to respective program modules in units of processes.
An embodiment of the present disclosure is not limited to the examples of
The information processing apparatus 100 may be mounted as a part of a service by a service provider who operates a cloud computing service. Instead, the information processing apparatus 100 may be mounted by a user who uses a cloud computing service. A technology related to an embodiment of the present disclosure can also be applied to a service of a form which is not necessarily expressed with the term “cloud computing.” The information processing apparatus 100 may be, for example, a general-purpose personal computer (PC) or workstation or may be a dedicated apparatus that is designed for the unique purpose of controlling resources.
The program structure DB 110 is a database that stores program structure data indicating a program structure of one or more applications executed by the computing system 10. The program structure data indicates a list of one or more program modules included in each application and a calling relation between the program modules. Also, the program structure data includes information used to identify input data and output data of each program module. The program structure data may automatically be generated by analyzing an application or may be generated by a user who develops an application. Several examples of typical program structures will be described in detail later.
The resource structure DB 120 is a database that stores resource structure data indicating the structure of resources allocated to each program module of an application that is being executed by the computing system 10. The processing resources of the computing system 10 are resources for which an allocation scale can be changed dynamically, that is, scalable resources, as described above. For example, the resource structure data indicates the number of allocated servers and the number of allocated processes of each server according to the program module. When the allocation of the resources is changed by the resource control unit 150 to be described below, the resource structure data stored by the resource structure DB 120 is updated so that the change is reflected.
The load measurement unit 130 measures a load of each of the program modules included in an application which is being executed by the computing system 10. Loads measured by the load measurement unit 130 in the embodiment include a computational load of each program module and a non-computational load of each server. For example, the non-computational load includes at least one of a memory load (memory use ratio or the like), an I/O load (an I/O number per unit time, an I/O waiting time or the like), and a communication load (a communication data amount per unit time, a communication waiting time, or the like). The computational load is typically a load applied to a processor. However, in many cloud computing environments, it is difficult to directly measure how many loads are applied to which processor when a certain program module is executed. Accordingly, in the embodiment, the load measurement unit 130 measures the number of pieces of input data during processing for each program module as the computational load. The amount of input data during processing can be computed by subtracting the amount of output data from the amount of input data of each program module. In a cloud computing environment, a file system installed in a storage can be monitored even though processing resources are highly virtualized. Accordingly, by adopting a method of guiding the computational load approximately using the amount of input data and the amount of output data on a file system, the computational load of each program module can be identified without necessity of systematic alternation of the cloud computing environment.
[Math. 1]
L
11
=D
11
−D
10 (1)
L
12
=D
12
−D
11 (2)
L
13
=D
13
−D
12 (3)
L
14
=D
14
−D
13 (4)
The load measurement unit 130 periodically measures the computational loads while executing an application. Also, the load measurement unit 130 periodically measures the non-computational loads while executing the application. The load measurement unit 130 outputs the values of the measured computational loads and the non-computational loads to the determination unit 140. The application described with reference to
The determination unit 140 determines whether the number of processes allocated to each program module is changed based on the result of the measurement of the load of each program module input from the load measurement unit 130. For example, when the load measured for a given program module is greater than a threshold value definable in advance, the determination unit 140 may determine that the number of processes allocated to this program module is increased. Also, when the load measured for a program module is less than (the same or a different) threshold value definable in advance, the determination unit 140 may determine that the number of processes allocated to this program module is decreased.
In the embodiment, the determination unit 140 further determines whether the number of servers allocated to each program module is changed based on the non-computational load measured for each server. For example, when the determination unit 140 determines that the number of processes allocated to a given program module is increased and the non-computational load is greater than a threshold value definable in advance, the determination unit 140 can determine that the number of servers allocated to this program module is increased. By introducing this determination, the load can be resolved or reduced by dynamically increasing the number of servers when the non-computational load is a main cause of the overall load. Also, when the determination unit 140 determines that the number of processes allocated to a given program module is increased and the non-computational load is less than the threshold value, the determination unit 140 can determine that the number of processes allocated to this program module is increased while the number of servers allocated to this program module remains. By introducing this determination, the load can be resolved or reduced by dynamically increasing the number of processes without unnecessary addition of resources not contributing to the load, when the computational load is a main cause of the overall load. Likewise, when the determination unit 140 determines that the number of processes allocated to a given program module is reduced, the determination unit 140 may determine whether the number of servers allocated to this program module is reduced based on comparison between the non-computational load and a threshold value.
The determination unit 140 outputs the result of such determination based on the measurement result of the load to the resource control unit 150.
The resource control unit 150 changes the allocation of the number of processes for the program module for which the number of allocated processes is determined to be changed by the determination unit 140. For example, the resource control unit 150 may simply add 1 to the number of allocated processes for the program module for which the number of processes is determined to be increased. Instead, the resource control unit 150 may increase the number of processes by a number different according to the size of the load at that time. Accordingly, when the load is not reduced, the number of processes can be further increased in a subsequent control period. Likewise, the resource control unit 150 may simply reduce 1 from the number of allocated processes for the program module for which the number of processes is determined to be decreased. Instead, the resource control unit 150 may decrease the number of processes by a number different according to the size of the load at that time. The resource control unit 150 can change the allocation of the number of servers for the program module for which the number of allocated servers is determined to be changed. When such resource control is repeated, a greater number of processes is consequently allocated to the program module indicating a high ratio of the number of pieces of input data which is being processed.
When the number of processes or the allocation of the number of processes and the number of servers is changed for a given program module, the resource control unit 150 changes the resource structure of the computing system 10 by transmitting a control signal to the computing system 10. Also, the resource control unit 150 also updates the resource structure data stored by the resource structure DB 120.
The example of the method of measuring the load of each of the program modules having the simple sequential calling relation has been described in
In this way, the loads of the program modules may be measured by summing up differences between the numbers of pieces of output data and input data calculated at the time of the calling for the program modules (or the sub-routines) called a plurality of times.
In formula (9) to formula (11), K indicates a number of repetitions.
[Math. 4]
L
41=(D41
L
42
=D
42
−D
41
a (13)
L
43
=D
43
−D
41
b (14)
L
44
=D
44−(D41
These methods of measuring the loads approximately may be combined in any manner according to a program structure.
Referring to
Next, the load measurement unit 130 measures the number of pieces of input data and the number of pieces of output data of one or more program modules included in the recognized program structure (step S120). Then, the load measurement unit 130 computes the load of each program module based on the measured number of pieces of input data and the measured number of pieces of output data (step S130).
Also, the load measurement unit 130 measures the non-computational load (for example, a memory load, an I/O load, or a communication load) of one or more servers allocated to the application which is being executed, referring to the resource structure DB 120 (step S140).
Next, the determination unit 140 executes a resource allocation determination process based on the measurement result of the loads executed by the load measurement unit 130 (step S150). Thus, new allocation of the resources can be determined.
Next, the resource control unit 150 changes the allocation of the resources by transmitting a control signal to the computing system 10 with regard to the program module for which the number of allocated processes or the number of allocated servers is determined to be changed (step S170). The allocation of the new resources is stored by the resource structure DB 120.
Typically, the above-described processes can be repeated periodically until the execution of the application ends (step S180). When the execution of the application ends, the resource control process of
The process of
In step S155, the determination unit 140 determines that the number of servers is increased. In step S157, the determination unit 140 determines that the number of servers is decreased (excluding a case in which the number of servers is already one). In step S159, the determination unit 140 determines that the number of servers remains.
Next, the determination unit 140 determines the number of processes allocated to each program module according to the computational load ratio of each program module (step S161). As a result, for the program module indicating a high computational load, an additional process in the allocated server or a process in the new server can be allocated.
In the first embodiment, the processing resources are dynamically changed by monitoring the load of each program module. Under a condition in which the number of requests to an application is gently changed, the resource structure can be optimized by a so-called feedback type control method. However, under a condition in which the change in the number of requests to an application is not gentle, there is a probability of the feedback type control method not following the change in the number of requests. In this case, it is advantageous to predict an increase in a load from the number of requests and change the resource structure before occurrence of an actual load in order to ensure desired performance of an application. Accordingly, in a second embodiment, a structure in which necessary scale (for example, the number of necessary processes) of processing resources is predicted based on the number of requests to an application and the necessary processing resources are allocated to a program module before an increase in an actual load will be described.
The resource model DB 235 is a database that stores a resource model expressing a relation between the number of requests and a necessary scale of processing resources in advance with regard to each application executed by the computing system 10. The necessary scale of the processing resources may be, for example, a lower limit of the number of processes by which application processing can be completed for a given number of requests under the condition that a predetermined performance requirement be satisfied. The predetermined performance requirement may be any requirement such as an upper limit of a total execution time of application processing, an upper limit of an execution time of each program module, an available maximum number of servers, or a specific communication environment.
The determination unit 240 acquires the number of requests to an application which is being executed from the computing system 10 and determines whether the number of processes allocated to each program module is changed based on the resource model stored in the resource model DB 235 and the acquired number of requests. Also, the determination unit 240 determines the changed number of processes when the number of processes is changed. The determination unit 240 may determine (correct) the number of processes based on the latest load when the load measured by the load measurement unit 130 is determined not to be reduced with the number of processes determined from the resource model. Also the determination unit 240 further determines whether the number of servers allocated to each program module is changed based on the non-computational load measured for each server. As in the first embodiment, the number of processes allocated to each program module may be changed along with the change in the number of servers or may be changed without the change in the number of servers. The resource control unit 150 changes one or both of the number of processes and the number of servers allocated to each program module according to the determination result input from the determination unit 240.
The model update unit 270 updates the resource model stored by the resource model DB 235 while executing the application based on a new pair of the number of requests acquired from the computing system 10 and the corresponding necessary scale. For example, when the allocation of the number of processes is corrected based on the latest value of the load in the determination unit 240 (from the predicted value based on the resource model), the model update unit 270 can update the resource model by incorporating a new pair of the number of requests and the corrected number of processes into the regression analysis. By elaborating the resource model through the dynamic updating of the resource model, the prediction accuracy of the necessary scale is improved. Accordingly, by following the allocation of the processing resources rapidly to the change in the number of requests even under conditions in which the number of requests is dramatically changed, it is possible to prevent the performance of the application from deteriorating even temporarily.
Several embodiments of the technology related to the present disclosure have been described in detail above with reference to
According to the above-described embodiments, the number of pieces of input data which is being processed can be measured as a load of each program module. Accordingly, even in a cloud computing environment in which it is difficult to directly measure how many loads are provided to which processor when a certain program module is executed, the load of the processing resources can be approximately measured and the measured approximate load can be utilized to control the resources in units of processes.
According to the above-described embodiments, the scale of the processing resources is controlled based on at least the number of servers and the number of processes of each server. Additionally, it can be determined whether the number of servers allocated to each program module is changed based on the non-computational load measured for each application or each server. Thus, the allocation of the proper kinds of resources (servers/processes) can be controlled according to a cause increasing a load. Accordingly, the more efficient use of the resources is realized.
According to the above-described embodiments, the scale of the processing resources can be controlled in units of processes according to the resource model expressing the relation between the number of requests to the application and the necessary scale of the processing resources. In this case, unlike a pure feedback type control method based on the actually measured values of loads, it is possible to prevent a predicted increase in the load in advance. Accordingly, even under the condition in which the number of requests is changed, it is possible to ensure desired performance of the application.
A series of processes executed by the information processing apparatus described in this specification is realized typically using software. A program of the software realizing the series of processes is stored in advance in, for example, a storage medium (a non-transitory medium) installed inside or outside the information processing apparatus. Then, for example, each program is read to a RAM at the time of execution and is executed by a processor such as a CPU or the like.
It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and alterations may occur depending on design requirements and other factors insofar as they are within the scope of the appended claims or the equivalents thereof.
Additionally, the present technology may also be configured as below.
(1) An information processing apparatus including:
a determination unit that determines whether to change a number of processes allocated to one or more program modules, based on a measurement result of a load of each program module when the program modules that form an application are executed using scalable processing resources.
(2) The information processing apparatus according to (1), further including:
a resource control unit that changes the number of allocated processes with regard to each program module for which the determination unit has determined that the number of allocated processes is to be changed.
(3) The information processing apparatus according to (2), further including:
a measurement unit that measures the load of each program module.
(4) The information processing apparatus according to (3), wherein the measurement unit measures a number of pieces of input data which is being processed, as the load of each program module.
(5) The information processing apparatus according to (4),
wherein scale of the processing resources is controlled based on at least a number of servers and a number of processes of each server, and
wherein the determination unit further determines whether to change the number of servers allocated to each program module, based on a non-computational load measured for each application or each server.
(6) The information processing apparatus according to (5), wherein, in a case where the determination unit determines that the number of processes allocated to each program module is to be increased, the determination unit determines that the number of servers allocated to each program module is to be increased when the non-computational load is greater than a threshold value, and determines that the number of servers allocated to each program module is to be maintained and the number of processes is to be increased when the non-computational load is less than the threshold value.
(7) The information processing apparatus according to any one of (4) to (6), wherein the resource control unit allocates a greater number of processes to each program module indicating a high ratio of the number of pieces of input data which is being processed.
(8) The information processing apparatus according to (5) or (6), wherein the non-computational load includes at least one of a memory load, an I/O load, and a communication load.
(9) The information processing apparatus according to any one of (2) to (8), wherein the resource control unit controls scale of the processing resources according to a number of requests to the application in a resource model expressing a relation between the number of requests to the application and necessary scale of the processing resources.
(10) The information processing apparatus according to (9), wherein the resource model is acquired in advance by a regression analysis using a plurality of pairs of the number of requests and corresponding necessary scale.
(11) The information processing apparatus according to (10), further including:
a model update unit that updates the resource model based on a new pair of the number of requests and the corresponding necessary scale while executing the application.
(12) A resource control method executed by an information processing apparatus, the resource control method including:
determining whether to change a number of processes allocated to one or more program modules, based on a measurement result of a load of each program module when the program modules that form an application are executed using scalable processing resources.
(13) A program for causing a computer that controls an information processing apparatus to function as:
a determination unit that determines whether to change a number of processes allocated to one or more program modules, based on a measurement result of a load of each program module when the program modules that form an application are executed using scalable processing resources.
Number | Date | Country | Kind |
---|---|---|---|
2013-033451 | Feb 2013 | JP | national |