This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2017-140642 filed Jul. 20, 2017.
The present invention relates to an information processing apparatus and an information processing system.
According to an aspect of the invention, there is provided an information processing apparatus including an acquisition unit that acquires an amount of operating resources among plural resources, in each of which a usage fee per unit time is defined, and an amount of jobs to be executed by using the plural resources, an identifying unit that identifies a resource whose operation is to be halted when the acquired amount of resources is more than a reference that is defined in advance relative to the acquired amount of jobs, a first instruction unit that gives an instruction to prohibit acquisition of a new job to the resource identified by the identifying unit, and a second instruction unit that gives an instruction to halt the operation of the resource identified by the identifying unit when the second instruction unit has acquired information indicating that a job under processing is not present in the resource identified by the identifying unit.
An exemplary embodiment of the present invention will be described in detail based on the following figures, wherein:
A terminal apparatus 90 is a computer to be used by a user who uses the resources 30 and is connected to the communication network 2. For example, the terminal apparatus 90 is a personal computer. The user operates the terminal apparatus 90 and causes the resources 30 provided by the information processing system 1 to perform information processing.
The information processing system 1 includes a cloud system 5, a management apparatus 10, and a monitoring apparatus 20. The cloud system 5 provides information processing to be performed by the resources 30 to the user of the terminal apparatus 90 and includes the job queue 50, a control apparatus 40, and plural resources 30. In the exemplary embodiment of the present invention, the management apparatus 10 and the monitoring apparatus 20 may be arranged in the cloud system 5.
The job queue 50 includes a storage apparatus that stores information. The job queue 50 stores job information transmitted from the load balancer 80. The control apparatus 40 that is an example of a control apparatus according to the exemplary embodiment of the present invention provides the job information and information related to the resources 30 to the monitoring apparatus 20 and scales in or out the resources 30 in response to an instruction from the management apparatus 10.
The plural resources 30 that are examples of resources according to the exemplary embodiment of the present invention are apparatuses that process supplied job information. The resources 30 acquire the job information from the job queue 50. In this exemplary embodiment, each of the plural resources 30 is a virtual machine to be scaled in or out by the control apparatus 40. For example, the resource 30 processes an image processing job and a document translation job. The jobs to be processed by the resource 30 are not limited to those jobs but may be other jobs. In the cloud system 5, a usage fee per unit time is defined for the resource 30 in advance. In this exemplary embodiment, a fixed usage fee per fixed unit time is defined for each of the plural resources 30 and the user is charged in accordance with a usage time of the resource 30.
The monitoring apparatus 20 is connected to the control apparatus 40, the management apparatus 10, the resources 30, and the job queue 50. The monitoring apparatus 20 is a computer that accesses each resource 30 to monitor an operation status of the resource 30, an operation time of the resource 30, a load on the resource 30, a job executed by the resource 30, and the like. The monitoring apparatus 20 also accesses the job queue 50 to monitor the amount of jobs stored in the job queue 50. The monitoring apparatus 20 provides, to the management apparatus 10, information necessary to scale in and out the resources 30. The management apparatus 10 that is an example of an information processing apparatus according to the exemplary embodiment of the present invention is connected to the monitoring apparatus 20 and the control apparatus 40. The management apparatus 10 controls the number of resources 30. The management apparatus 10 scales in or out the resources 30 by using the information provided from the monitoring apparatus 20.
In the control unit 401, a resource control unit 4001 and a job information supply unit 4002 are implemented. The resource control unit 4001 scales in or out the resources 30. The job information supply unit 4002 supplies, to the resources 30, job information supplied from the job queue 50. The resources 30 supply information on the number of operating resources 30, operating periods of the resources 30, job processing statuses of the resources 30, and the like to the monitoring apparatus 20 at predetermined time intervals.
In the control unit 201, a second acquisition unit 2001 and a second supply unit 2002 are implemented. The second acquisition unit 2001 acquires information supplied from the resources. Further, the second acquisition unit 2001 acquires information indicating the amount of jobs stored in the job queue 50. The second supply unit 2002 supplies first information including the information acquired by the second acquisition unit 2001 to the management apparatus 10.
In the control unit 101, a first acquisition unit 1001, an identifying unit 1002, a first instruction unit 1003, and a second instruction unit 1004 are implemented. The first acquisition unit 1001 acquires the first information supplied from the second supply unit 2002. The identifying unit 1002 identifies a resource whose operation is to be halted when the amount of operating resources is more than a reference that is defined in advance relative to the amount of jobs included in the first information. The first instruction unit 1003 transmits, to the resource identified by the identifying unit 1002, a message indicating an instruction to prohibit acquisition of a new job. The second instruction unit 1004 transmits a message indicating an instruction to halt the operation of the resource 30 identified by the identifying unit 1002 when the second instruction unit 1004 has acquired a message indicating that a job under processing is not present in the resource 30 identified by the identifying unit 1002.
Next, an example of an operation of this exemplary embodiment is described. First, when the user has performed an operation of giving an instruction to execute a job on the terminal apparatus 90, job information that is information necessary to execute the job is transmitted from the terminal apparatus 90 to the load balancer 80. The load balancer 80 supplies the job information transmitted from the terminal apparatus 90 to the job queue 50.
The monitoring apparatus 20 (second acquisition unit 2001) acquires the amount of jobs stored in the job queue 50. Further, the monitoring apparatus 20 (second acquisition unit 2001) acquires information including the number of operating resources 30, operating periods of the resources 30, and job processing statuses of the resources 30 at predetermined time intervals. The monitoring apparatus 20 (second supply unit 2002) supplies first information including the acquired information on the resources 30 and the information acquired from the job queue 50 to the management apparatus 10.
When the result of determination in Step SA2 is “YES”, the management apparatus 10 (identifying unit 1002) identifies the resource 30 to be removed (whose operation is to be halted) (Step SA3).
The management apparatus 10 selects, as the resource 30 to be removed, a resource 30 whose charging timing is closer to the timing when the processing of Step SA3 is performed. For example, when the number of surplus resources is 1 at the timing “t”, the resource whose charging timing is closest to the timing “t” is the resource A whose charging timing is “t1”. In this case, the management apparatus 10 identifies the resource A as the resource 30 to be removed. For example, when the number of surplus resources is 2 at the timing “t”, the resource whose charging timing is closest to the timing “t” is the resource A whose charging timing is “t1” and the resource whose charging timing is second closest to the timing “t” is the resource B whose charging timing is “t2”. In this case, the management apparatus 10 identifies the resource A and the resource B as the resources 30 to be removed.
Resources 30 whose next charging timing precedes an estimated completion time of a job under processing may be excluded from the resources to be removed and other resources 30 may be selected.
When the resource 30 to be removed is selected, the management apparatus 10 (first instruction unit 1003) transmits, to the selected resource 30, a prohibition message indicating an instruction to prohibit acquisition of a job (Step SA4). The prohibition message transmitted from the management apparatus 10 is acquired by the resource 30 that is selected by the management apparatus 10 in Step SA3.
The management apparatus 10 (second instruction unit 1004) receives the removal request message transmitted from the resource 30 (Step SA5). When the removal request message is received, the management apparatus 10 transmits a removal instruction message indicating an instruction to remove the resource 30 identified in Step SA3 (Step SA6). The removal instruction message is an example of the message indicating an instruction to halt the operation of the resource 30. The removal instruction message transmitted from the management apparatus 10 is acquired by the control apparatus 40. The control apparatus 40 removes the resource 30 specified in the removal instruction message.
The prohibition message to be transmitted from the management apparatus 10 may include information indicating the resource 30 that is prohibited from acquiring a job. This prohibition message may be acquired by the control apparatus 40 and the control apparatus 40 may prohibit supply of a job to the resource 30 indicated by the information included in the prohibition message. Further, the control apparatus 40 may monitor the resources 30 and, when a job under processing is not present in the resource 30 in which the supply of a job is prohibited, the control apparatus 40 may transmit, to the management apparatus 10, a removal request message indicating a request to remove the resource 30 in which the supply of a job is prohibited. The management apparatus 10 may instruct the control apparatus 40 to remove the resource 30 that is requested for removal in the removal request message and the instructed control apparatus 40 may remove the resource 30.
According to this exemplary embodiment, the resource 30 having a job under processing is not removed while processing the job. According to this exemplary embodiment, when surplus resources 30 are present compared with the amount of jobs to be processed, a resource 30 that has finished processing the job is removed and the number of resources 30 is reduced.
The exemplary embodiment of the present invention is described above but is not limitative and various other exemplary embodiments may be employed. For example, the exemplary embodiment described above may be modified as follows. The exemplary embodiment described above and the following modified examples may be combined with each other.
In the exemplary embodiment described above, the resource 30 is a virtual machine. For example, the resource 30 may be a server or storage that is a physical computer. When the resource 30 is a physical computer, an operation of the computer is halted instead of removing a virtual machine.
In the exemplary embodiment of the present invention, the resource 30 may be an application that operates on a virtual machine. This modified example is described in detail with reference to
When the resource 30 to be removed is selected, the management apparatus 10 transmits, to the selected resource 30, a prohibition message indicating an instruction to prohibit acquisition of a job. When the prohibition message is acquired, the application AP7 prohibits acquisition of a new job and determines whether a job under processing is present. When a job under processing is not present, the application AP7 transmits a removal request message to the management apparatus 10. The management apparatus 10 receives the removal request message transmitted from the application AP7. When the removal request message is received, the management apparatus 10 transmits a removal instruction message indicating an instruction to remove the application AP7 to be removed. The removal instruction message transmitted from the management apparatus 10 is acquired by the resource B. The resource B removes the application AP7 specified in the removal instruction message.
When the application AP7 on the resource B is removed, the resource B has no operating application. When a virtual machine having no operating application is present, the management apparatus 10 transmits a removal instruction message indicating an instruction to remove the virtual machine. The removal instruction message transmitted from the management apparatus 10 is acquired by the control apparatus 40. The control apparatus 40 removes the resource B specified in the removal instruction message.
In the exemplary embodiment described above, the management apparatus 10 may analyze the acquired first information and, when a resource 30 having no job under processing is present among the plural resources 30, the management apparatus 10 may transmit a removal instruction message indicating an instruction to remove the resource 30.
In the exemplary embodiment described above, the monitoring apparatus 20 supplies the first information to the management apparatus 10. The management apparatus 10 may have the function of the monitoring apparatus 20 and acquire the first information without intervention of the monitoring apparatus 20.
In the exemplary embodiment described above, when the removal request message is not received within a predetermined time after the prohibition message has been transmitted in Step SA4, the management apparatus 10 may transmit the removal instruction message even though the removal request message is not received.
In the exemplary embodiment described above, the management apparatus 10 may acquire, from the table, the number of resources associated with the amount of jobs included in the first information after the prohibition message has been transmitted and, when the number of operating resources 30 included in the first information is less than the number acquired from the table, the management apparatus 10 may transmit a message indicating an instruction to acquire a job to the resource 30 that has acquired the prohibition message. This message is acquired by the resource 30 that has acquired the prohibition message. The resource 30 that has acquired the message resumes acquiring a job and processes the acquired job.
In the exemplary embodiment described above, the control apparatus 40 scales in and out the resources 30 but the management apparatus 10 may scale in and out the resources 30.
The foregoing description of the exemplary embodiment of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations will be apparent to practitioners skilled in the art. The embodiment was chosen and described in order to best explain the principles of the invention and its practical applications, thereby enabling others skilled in the art to understand the invention for various embodiments and with the various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2017-140642 | Jul 2017 | JP | national |