This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2015-108187, filed on May 28, 2015, the entire contents of which are incorporated herein by reference.
1. FIELD
The embodiments discussed herein are related to deployment techniques of machines.
It is possible to promote energy saving and resource saving by integrating physical machines using virtualization. However, if the amount of memory equal to or larger than the memory capacity of the physical machines is assigned to the virtual machines running on the physical machines, a memory over-commitment occurs, and the performance of the virtual machines is deteriorated. Accordingly, operations are normally carried out such that virtual machines are deployed in the range of the memory capacity installed on the physical machines.
On the other hand, in a private cloud environment for software development, or the like, actual situations are confirmed in which a virtual machine is left unused for a long time. In such a case, if the unused virtual machine is stopped to release the memory, and then the released memory is assigned to another virtual machine, it is possible to use resources more effectively. However, when a plurality of users use the same virtual machine, it is sometimes not possible for each user to determine whether or not the user is allowed to stop the virtual machine. Accordingly, for example, an operation schedule for running a virtual machine is made in accordance with a working time frame for general workers in advance, and the power source control of virtual machines is automatically performed in accordance with the schedule.
Also, in a related-art technique on the deployment of virtual machines, loads occurring in the virtual machines are obtained based on a scheduled time to start operation and a scheduled time to stop operation, and physical machines on which virtual machines are deployed are determined based on the loads.
A related technique is disclosed in International Publication Pamphlet No. WO 2012/117453, for example.
According to an aspect of the invention, a control method includes acquiring result information including first timings and second timings, the first timings indicating time when each of a plurality of virtual machines started on an information processing device, and the second timings indicating time when each of the plurality of virtual machines ended, executing predictions regarding each of the plurality of virtual machines running on the information processing device, for each of periods, based on the result information, when a start of a new virtual machine on the information processing device is requested, determining for each of the periods whether the start of the new virtual machine is permitted based on a result of the predictions, by a processor, and when it is determined that the start is permitted, starting the new virtual machine on the information processing device.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
In an environment in which a virtual machine is started and stopped depending on a user or by automatic power source control, if a memory that has been released by a stop of a virtual machine is assigned to a new virtual machine, a memory over-commitment sometimes occurs. This is because if a stopped virtual machine is restarted, a memory has to be assigned to that virtual machine.
Accordingly, in order to avoid performance deterioration, it is preferable to assign a sufficient amount of resources to a virtual machine. However, if operation is performed by simply assigning a large amount of resources to the virtual machine, it is not possible to effectively use the resources.
Also, in a technique for determining a physical machine on which virtual machines are deployed based on the load, it is assumed that an operation schedule of each of the virtual machines is determined. Accordingly, the technique is not effective for an environment in which there are some virtual machines not having fixed operation schedules.
With a disclosed technique according to the present embodiment, it is possible to restrain depletion of resources in an operation environment of a virtual machine.
The program for executing the processing according to the present embodiment is loaded in the memory 152, and is executed by the CPU 151 to achieve various functions illustrated in
The virtual infrastructure 101 is a hypervisor, for example, and allows one or a plurality of virtual machines to operate on the virtual infrastructure 101. Each virtual machine is in an operating state or a stop state. The virtual infrastructure 101 stores its managed data (for example, operation result data and data on the CPU use rate, or the like) in the first data storage unit 105. The virtual infrastructure 101 controls the power source of the virtual machines based on a notification from the schedule management unit 103.
The schedule management unit 103 executes processing based on the schedule data stored in the second data storage unit 104, and notifies the virtual infrastructure 101 of the processing result. The schedule management unit 103 passes schedule data for each virtual machine to the calculation unit 106. If the schedule management unit 103 receives a deployment request, which requests deployment of a new virtual machine, from the user terminal 5, the schedule management unit 103 notifies the determination unit 102 of information on the memory capacity to be assigned to the new virtual machine, which is included in the received deployment request. If the schedule management unit 103 is notified that the new virtual machine is not allowed to be deployed from the determination unit 102, the schedule management unit 103 transmits a response message to the deployment request received from the user terminal 5 to the user terminal 5.
If a part of the operation result data stored in the first data storage unit 105 is missing, the complement unit 108 in the calculation unit 106 complements the missing part of the operation result data based on the data of the CPU use rate stored in the first data storage unit 105. The extraction unit 107 in the calculation unit 106 generates data (hereinafter referred to as operation prediction data) indicating the future operation period for each virtual machine based on the operation result data stored in the first data storage unit 105. The calculation unit 106 generates time-series data of the memory capacity available in the physical machine 10 based on the operation prediction data of each virtual machine generated by the extraction unit 107 and the data stored in the first data storage unit 105, and passes the data to the determination unit 102.
The determination unit 102 determines whether or not it is possible for a new virtual machine to be deployed on the physical machine 10 based on the data received from the calculation unit 106 and the data received from the schedule management unit 103. If it is possible for the new virtual machine to be deployed on the physical machine 10, the determination unit 102 deploys the new virtual machine on the virtual infrastructure 101. If the new virtual machine is not possible to be deployed on the physical machine 10, the determination unit 102 notifies the schedule management unit 103 that the new virtual machine is not possible to be deployed.
Next, a description will be given of processing executed by the physical machine 10 using
The schedule management unit 103 of the physical machine 10 obtains current time information from the system clock, for example (
The schedule management unit 103 reads schedule data from the second data storage unit 104 and determines whether or not the current time is the scheduled time of the power source control of the virtual machine (step S103).
Referring back to
As described above, if power source control of the virtual machine is performed in accordance with the schedule determined in consideration of a pattern of a start and a stop of a virtual machine, or the like, it becomes possible to suppress the occurrence of the situation in which the resources run significantly short.
Second, a description will be given of processing executed when a deployment request is received from the user terminal 5 using
The schedule management unit 103 of the physical machine 10 receives a deployment request of a new virtual machine from the user terminal 5 (
In response to this, the calculation unit 106 executes calculation processing (step S3). A description will be given of the calculation processing using
The complement unit 108 in the calculation unit 106 executes complement processing (
The complement unit 108 determines whether or not at least a part of the operation result data stored in the first data storage unit 105 is missing (
A description will be given of a missing part using
Referring back to
Referring back to
The extraction unit 107 determines whether or not the virtual machine identified in step S13 (hereinafter referred to as a virtual machine to be processed) has been operating in the n time frame (n time frame is a time frame from 00 minutes past n to 59 minutes past n) on the day of the week m in the most recent predetermined period based on the operation result data and the data added to the operation result data (step S17). Here, it is assumed that the day of the week 1 is Sunday, the day of the week 2 is Monday, the day of the week 3 is Tuesday, the day of the week 4 is Wednesday, the day of the week 5 is Thursday, the day of the week 6 is Friday, and the day of the week 7 is Saturday. If the operation of a virtual machine is started or stopped in the middle of the n time frame, the virtual machine is considered to have been operating in the n time frame.
A detailed description will be given of step S17 using a specific example. For example, it is assumed that the operation result of the virtual machine to be processed is the operation result in
In this case, when time frames in which the virtual machine was operated in both the first week and the second week are extracted on each day of the week, the result becomes as illustrated in
In order to extract more time frames than those in
As an intermediate method between the method in
In this regard, the extraction unit 107 may set “ON” in the time frame that is scheduled to operate the virtual machine based on the schedule data received from the schedule management unit 103. In this manner, even if not so much time has passed from when the virtual machine was started, and thus sufficient operation result data has not been obtained, or the like, it becomes possible to suitably perform the extraction.
Also, if a predetermined period is set to one week, it is possible to attach importance to the recent trend of users without being influenced by the operation results that are equal to or older than one week.
Referring back to
The extraction unit 107 increments n by 1 (step S25), and determines whether or not n>23 holds (step S27). If n>23 does not hold (step S27: No route), the processing returns to the processing of step S17. On the other hand, if n>23 holds (step S27: Yes route), the extraction unit 107 increments m by 1, and sets n to 0 (step S29), and determines whether or not m >7 holds (step S31).
If m>7 does not hold (step S31: No route), the processing returns to the processing of step S17. On the other hand, if m>7 holds (step S31: Yes route), the extraction unit 107 determines whether or not there are unprocessed virtual machines (step S33). If there is an unprocessed virtual machine (step S33: Yes route), the processing returns to step S13. On the other hand, there are no unprocessed virtual machines (step S33: No route), the processing proceeds to step S35 in
With the processing so far, the operation prediction data illustrated in
Referring to
The calculation unit 106 calculates the sum Smn of the memory capacities to be assigned to the virtual machine identified in step S37 based on the information on the virtual machine identified in step S37, and the memory assignment information stored in the first data storage unit 105 (step S39).
Returning back to
Referring back to
If m>7 does not hold (step S49: No route), the processing returns to the processing of step S37. On the other hand, if m>7 holds (step S49: Yes route), the processing returns to the calling source processing (
By executing the processing described above, for example, as illustrated in
Referring back to
If Amn is larger than the memory capacity to be assigned to the new virtual machine in all the time frames on all the days of the week (step S5: Yes route), the schedule management unit 103 outputs a start instruction of the virtual machine specified by the deployment request to the virtual infrastructure 101. In response to this, the virtual infrastructure 101 starts the virtual machine in accordance with the start instruction (step S7). The processing is then terminated.
On the other hand, if Amn is less than or equal to the memory capacity to be assigned to the new virtual machine in any one of the time frames (step S5: No route), the schedule management unit 103 generates a message indicating that it is not possible to start the virtual machine specified in the deployment request and transmits the message to the user terminal 5 (step S9). The processing is then terminated. In this regard, if it is possible to start the new virtual machine by reducing the memory capacity assigned to the new virtual machine, or by limiting the time frame, the information indicating that may be added to the message.
The user terminal 5 displays the received message on a display device, such as a display, or the like.
By executing the processing as described above, it becomes possible to effectively use the resources of the physical machine 10 while avoiding the occurrence of performance deterioration due to memory over-commitment. In particular, the user does not have to perform operation, such as avoiding memory over-commitment by assigning a larger capacity of memory to each virtual machine.
Also, if a large amount of memory that has been assigned to a virtual machine for a certain project is released along with the end of the project, it becomes possible to promptly assign the large amount of released memory to another virtual machine. In contrast, with the technique that determines the assignment of memory based on the peak value of the amount of used memory, for example, it is not possible to effectively use the released memory until confirmation is made on a decrease of the peak value of the amount of used memory the next day.
In the above, a description has been given of an embodiment of the present disclosure. However, the present disclosure is not limited to this. For example, the functional block configuration of the physical machine 10 described above sometimes does not match the actual program module configuration.
Also, the structure of each table described above is an example, and the structure does not have to be as described above. Further, in the processing flows, it is possible to change the orders of the processing unless the processing result does not change. Further, the processing may be executed in parallel.
For example, the virtual infrastructure 101 and a virtual machine that operates on the virtual infrastructure 101 may be distributed on a plurality of physical machines 10. Also, the virtual infrastructure 101 and a physical machine 10 on which the virtual infrastructure 101 is executed may be different from the physical machine 10 on which the other parts are executed.
Also, the operation prediction data may be generated using only the data of the CPU use rate.
The embodiment of the present disclosure described above is summarized as follows.
A control method according to the present embodiment includes processing of (A) acquiring operation information indicating a timing when a virtual machine started on an information processing device, and a timing when the virtual machine ended its operation, (B) making operation predictions of the virtual machine on the information processing device for each predetermined period based on the acquired operation information, (C) if a start of a new virtual machine on the information processing device is requested, determining whether or not to permit the start of the new virtual machine for the predetermined period based on a result of the operation prediction.
In this manner, it is possible to avoid starting a virtual machine with exceeding a permissible limit, and thus it becomes possible to restrain depletion of resources in the operation environment of the virtual machine.
Also, the processing for performing operation prediction of a virtual machine may include (b1) generating second operation information indicating a start timing of the virtual machine and an end timing of the operation of the virtual machine in a predetermined period from the obtained operation information, (b2) calculating a memory capacity to be used by the information processing device in the predetermined period based on the generated second operation information, and the memory capacity to be assigned to each virtual machine, and (b3) calculating an available memory capacity in a predetermined period from the memory capacity of the information processing device, and the memory capacity used by the information processing device in the predetermined period. In this manner, it becomes possible to restrain depletion of resources in an operation environment of a virtual machine.
Also, in the processing to determine whether or not to permit to start a new virtual machine, (c1) a determination may be made whether or not to permit to start the new virtual machine in a predetermined period based on a comparison between the calculated available memory capacity and the memory capacity assigned to the new virtual machine all the time in a predetermined period. In this manner, it becomes possible to restrain the occurrence of memory over-commitment.
Also, the present control method may further include processing for (D) determining whether or not at least a part of the operation information is missing, (E) if determined that at least a part of the operation information is missing, determining whether or not a virtual machine is in operation in a period corresponding to the missing part based on the information of the use rate of the processor of the information processing device, (F) if determined that the virtual machine is in operation in the period corresponding to the missing part, generating data to complement the missing part, and adding the data to the operation information. In this manner, it becomes possible to cope with a situation in which at least a part of the operation information has been missing due to a failure, or the like.
In this regard, it is possible to create a program for causing a computer to perform the processing by the above-described method. The program is stored in a computer-readable storage medium or a storage device, such as a flexible disk, a CD-ROM, a magneto-optical disc, a semiconductor memory, a hard disk, or the like, for example. In this regard, an intermediate processing result is temporarily stored in a storage device, such as a main memory, or the like.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2015-108187 | May 2015 | JP | national |