Disclosure of Invention
Aiming at the defects of the prior art, the invention provides an automatic decision-making method and system of a virtualization technology, which comprises the following steps:
the test generation module is used for generating a test plan according to user input data and executing the test plan;
the virtualization environment switching module is used for switching between a non-virtualization environment and a virtualization environment and among the virtualization environments according to the execution progress requirement of the test plan;
the application execution module is used for executing the application in a non-virtualization environment or a virtualization environment according to the execution progress requirement of the test plan;
the information acquisition module is used for acquiring performance data when the application is executed in a non-virtualization environment or a virtualization environment;
and the data processing module is used for calculating the influence factor of each virtualization technology on each application according to the performance data and the interference factor of each virtualization technology under various combination conditions in the virtualization environment.
The automated decision-making system of the virtualization technology, wherein the test plan comprises:
step A1, informing the virtualization environment switching module to switch the tested platform to a non-virtualization environment, and executing step A2 after the non-virtualization environment is switched;
step A2, informing an application execution module to sequentially execute all applications on the platform to be tested, and executing the step A3 after the applications are all executed;
step A3, executing the step A4 for each virtualization technology in sequence;
step A4, informing the virtualization environment switching module to switch the tested platform to the virtualization environment provided by the virtualization technology specified in the step A3, and executing the step A5 after the switching is finished;
step A5, informing the application execution module to sequentially execute all applications on the virtual machines with all resources of the tested platform, and executing step A6 after the applications are executed;
step A6, the step A7 is sequentially executed for each virtual machine configuration, and the step A8 is executed after the step A7 is completed;
step A7. tells the application execution module to execute all applications in turn on the virtual machine having the virtual machine configuration specified in step A6;
the step A8. sequentially executes the step a9 for all combinations of applications that satisfy the user setting;
step A9. is to execute step A10 for each virtual machine configuration combination corresponding to the application combination;
and A10, informing the application execution module to respectively run the combination of the applications specified in the step A8 on the virtual machines with the virtual machine configuration combination specified in the step A9, wherein the virtual machines and the applications are in one-to-one correspondence.
In the automatic decision-making system of the virtualization technology, the virtualized environment switching module receives and executes the instruction of switching the non-virtualized environment in the step a1 and the virtualized environment in the step a4, and feeds back the instruction to the test generation module after completing the environment switching on the platform to be tested.
The automatic decision-making system of the virtualization technology comprises an application execution module, a virtual machine module and a virtual machine module, wherein the application execution module specifically comprises:
step B1. if the indication received from the test generation module is that all the applications are executed in the non-virtualization environment on the tested platform in sequence, executing step B2, otherwise executing step B5;
b2, sequentially executing the step B3 for each application, and executing the step B4 after the step B3 is completed;
b3, executing the application specified in the step B2 on the tested platform, and informing the information acquisition module of acquiring performance data after the application is completed;
step B4. informs the test generation module that all applications have been executed;
step B5. if the indication received from the test generation module is to execute all applications on a virtual machine having a certain configuration in turn in a certain virtualization environment on the platform under test, then step B6 is executed, otherwise step B10 is executed;
step B6. is to create and start the virtual machine with the configuration specified in step B5 on the tested platform, and execute step B7;
step B7. executes step B8 for each application in turn, and executes step B9 after completion;
step B8., executing the application specified in step B7 on the virtual machine, and informing the information collection module to collect performance data after completion;
step B9., closing and deleting the virtual machine created in step B6, informing the test generation module that all applications have been executed;
step B10, respectively creating and starting a plurality of virtual machines with the configuration specified by the test generation module on the platform to be tested, and executing step B11;
b11, executing the application combination specified by the test generation module on the virtual machine created by the B10, and informing the information acquisition module of acquiring performance data and executing the step B12 after the execution of the application combination is finished;
and B12, closing and deleting all the virtual machines created in the step B10, and informing the test generation module that the application combination is completed.
The automatic decision-making system of the virtualization technology, wherein the data processing module specifically comprises:
c1, executing the steps C2 and C4 for each virtualization technology, and executing the step C7 after the steps are completed;
step C2. performs step C3 for each application;
step C3., calculating the ratio of the performance data of the application specified in step C2, which is executed on the virtual machine in the virtualization environment provided by the virtualization technology specified in step C1, to the performance data of the application executed in the non-virtualization environment, and obtaining the virtualization factor of the virtualization technology for completing the corresponding application;
step C4. perform step C5 for each application combination;
step C5. performs step C6 for each application in the combination of applications of step C4;
step C6. calculating an interference factor for the application specified in step C5;
step C7. performs step C8 for each virtualization technique, and performs step C9 when completed;
step C8., for all applied virtualization factors and all interference factors, taking the application weight value input by the user as the weight of the virtualization factors and the interference factors, calculating the weighted average of all the virtualization factors and the interference factors, and calculating the obtained result as the score of the virtualization technology;
step C9. outputs the score to the user.
The invention also provides an automatic decision-making method of the virtualization technology, which comprises the following steps:
step 1, generating a test plan according to user input data and executing the test plan;
step 2, switching between a non-virtualization environment and a virtualization environment and among virtualization environments according to the execution progress requirement of the test plan;
step 3, executing the application in a non-virtualization environment or a virtualization environment according to the execution progress requirement of the test plan;
step 4, collecting performance data when the application is executed in a non-virtualization environment or a virtualization environment;
and the data processing module is used for calculating the influence factor of each virtualization technology on each application according to the performance data and the interference factor of each virtualization technology under various combination conditions in the virtualization environment.
The automatic decision-making method of the virtualization technology comprises the following steps:
a1, switching a tested platform to a non-virtualization environment, and executing the step A2 after the non-virtualization environment is switched;
a2, sequentially executing all applications on the platform to be tested, and executing the step A3 after the applications are executed;
step A3, executing the step A4 for each virtualization technology in sequence;
a4, switching the tested platform to the virtualization environment provided by the virtualization technology specified in the step A3, and executing the step A5 after the switching is finished;
step A5, executing all applications on the virtual machines provided with all resources of the tested platform in sequence, and executing the step A6 after the applications are executed;
step A6, the step A7 is sequentially executed for each virtual machine configuration, and the step A8 is executed after the step A7 is completed;
step A7. in turn executes all applications on the virtual machine having the virtual machine configuration specified in step A6;
the step A8. sequentially executes the step a9 for all combinations of applications that satisfy the user setting;
step A9. is to execute step A10 for each virtual machine configuration combination corresponding to the application combination;
step A10, running the combination of the applications specified in the step A8 on the virtual machines with the virtual machine configuration combination specified in the step A9 respectively, wherein the virtual machines and the applications are in one-to-one correspondence.
The automatic decision method of the virtualization technology receives and executes the command of switching the non-virtualization environment in the step A1 and the virtualization environment in the step A4, and performs feedback after completing the environment switching on the platform to be tested.
The automatic decision method of the virtualization technology includes the following specific steps in step 3:
step B1, if the received indication is that all the applications are executed in the non-virtualization environment on the tested platform in sequence, executing step B2, otherwise executing step B5;
b2, sequentially executing the step B3 for each application, and executing the step B4 after the step B3 is completed;
b3, executing the application specified in the step B2 on the tested platform, and acquiring performance data after the completion;
step B4. feeds back information that all applications have been executed;
step B5. if the received indication is that all applications are executed on a virtual machine with a certain configuration in turn in a certain virtualization environment on the platform under test, then step B6 is executed, otherwise step B10 is executed;
step B6. is to create and start the virtual machine with the configuration specified in step B5 on the tested platform, and execute step B7;
step B7. executes step B8 for each application in turn, and executes step B9 after completion;
step B8., executing the application specified in step B7 on the virtual machine, and collecting performance data after completion;
step B9., closing and deleting the virtual machine created in step B6, and feeding back information of all executed applications;
step B10, respectively creating and starting a plurality of virtual machines with specified configuration on the platform to be tested, and executing step B11;
b11, executing the specified application combination on the virtual machine created in the step B10, and after the execution of the application combination is finished, acquiring performance data and executing the step B12;
and B12, closing and deleting all the virtual machines created in the step B10, and feeding back the executed application combination.
The automatic decision-making method of the virtualization technology comprises the following steps of:
c1, executing the steps C2 and C4 for each virtualization technology, and executing the step C7 after the steps are completed;
step C2. performs step C3 for each application;
step C3., calculating the ratio of the performance data of the application specified in step C2, which is executed on the virtual machine in the virtualization environment provided by the virtualization technology specified in step C1, to the performance data of the application executed in the non-virtualization environment, and obtaining the virtualization factor of the virtualization technology for completing the corresponding application;
step C4. perform step C5 for each application combination;
step C5. performs step C6 for each application in the combination of applications of step C4;
step C6. calculating an interference factor for the application specified in step C5;
step C7. performs step C8 for each virtualization technique, and performs step C9 when completed;
step C8., for all applied virtualization factors and all interference factors, taking the application weight value input by the user as the weight of the virtualization factors and the interference factors, calculating the weighted average of all the virtualization factors and the interference factors, and calculating the obtained result as the score of the virtualization technology;
step C9. outputs the score to the user.
According to the scheme, the invention has the advantages that:
according to the invention, the performance of each application and application combination in the non-virtualization environment and the virtualization environment provided by the optional virtualization technology is measured, and the performance score of each virtualization technology is calculated according to the obtained data, so that the user can select the virtualization technology with the highest score as the service provided by the user.
Detailed Description
The invention comprises an automated decision-making system for virtualization technology and a method for selecting an appropriate virtualization technology for a user.
The method measures the virtualization influence factors and the interference factors of each application for each virtualization technology respectively, then carries out weighting and averaging on the factors according to the application weight defined by a user, and takes the weighted average obtained through calculation as the score of the virtualization technology, wherein the higher the score is, the better the virtualization technology is represented, so that the user can select the virtualization technology with the highest score.
The automated decision-making system in the invention comprises five modules: the decision-making system comprises a Test Generation Module (TGM), a virtualization environment switching module (VSM), an Application Execution Module (AEM), an information acquisition module (ICM) and a Data Processing Module (DPM), and the structure of the decision-making system is shown in figure 1.
The TGM generates a test plan and controls the execution of the plan according to the user's input. The input of the user comprises application information, virtualization technology, combination preference and virtual machine configuration, wherein the application information comprises all source code/executable files and data which can be executed on a target platform to be tested so as to ensure that the application can be executed on the platform to be tested or the virtual machine; the tested platform is a host which can run the application. The application information also comprises the weight set by the user for each application, and the weight of each application is the same as the default weight of each optional input item; wherein the virtualization technology refers to virtualization technology available for user selection. The combination preference refers to coexistence restrictions set by the user for the applications, including which applications must coexist on the same host and which applications cannot coexist on the same host, which is an optional option and default to no coexistence restriction. The input virtual machine configuration refers to the optional virtual machine resource configuration amount applied in the coexistence environment; the TGM generated test plan includes executing each application in a non-virtualized environment; executing each application on each virtual machine exclusively under the virtualization environment provided by each virtualization technology; each application combination is executed under a virtualization environment provided by each virtualization technology.
The VSM switches between the non-virtualized environment and the virtualized environment and between the virtualized environments according to the execution progress requirements of the test plan generated by the TGM.
The AEM executes the application in either a non-virtualized environment or a virtualized environment according to the execution schedule requirements of the test plan generated by the TGM.
The ICM collects performance of application execution in various environments.
And the DPM calculates the influence factor of each virtualization technology on each application and the interference factor applied to various combination conditions under the virtualization environment provided by each virtualization technology according to the data acquired by the ICM. And carrying out weighted average on the influence factors and the interference factors according to the applied weight to obtain the weighted average of each virtualization technology, and outputting the weighted average as the score of the virtualization technology to a user.
Specifically, the contents of the respective modules are as follows:
the TGM generates a test plan and controls execution of the test plan, the test plan comprising the steps of:
step A1, informing the VSM to switch the tested platform to a non-virtualization environment, and executing step A2 after the non-virtualization environment is switched;
step A2, informing the AEM to sequentially execute all applications on the tested platform, and executing the step A3 after all the applications are executed;
step A3, executing the step A4 for each virtualization technology in sequence;
step A4, informing the VSM to switch the tested platform to the virtualization environment provided by the virtualization technology specified in the step A3, and executing the step A5 after the switching is finished;
and step A5, informing the AEM to sequentially execute all the applications on the virtual machines provided with all the resources of the tested platform. When all the applications are executed, executing step a 6;
and A6, sequentially executing the step A7 for each virtual machine configuration. After completion, step A8 is executed;
step A7. tells the AEM to execute all applications in turn on the virtual machine with the virtual machine configuration specified in step A6;
the step A8. sequentially executes the step a9 for all application combinations satisfying the combination preference set by the user;
step A9. performs step A10 in turn for each possible combination of virtual machine configurations corresponding to the applied combination;
and step A10, informing the AEM to respectively run the application combinations specified in the step A8 on the virtual machines with the virtual machine configuration combinations specified in the step A9, wherein the virtual machines and the applications are in a one-to-one correspondence relationship, namely, one application is independently run on one virtual machine.
The VSM receives and executes the command of the non-virtualization environment switching in the step A1 and the virtualization environment switching in the step A4 of the TGM, and feeds back the command to the TGM after the environment switching is completed on the tested platform.
And the AEM executes the application on the tested platform according to the indication of the TGM and feeds back the application execution end to the TGM. The AEM transmits performance data of the executed application to the DPM. The method comprises the following specific steps:
b1, if the indication from the TGM is received that all the applications are executed in the non-virtualization environment on the tested platform in sequence, executing the step B2, otherwise executing the step B5;
step B2. step B3 is performed in turn for each application. After the completion, executing step B4;
b3, executing the application appointed in the step B2 on the tested platform, and informing the ICM of data acquisition after the application is completed;
step B4. informs the TGM that execution of all applications has been completed;
step B5. if the indication from the TGM is received that all applications are executed on the virtual machines with certain configuration in a certain virtualization environment on the tested platform in turn, then step B6 is executed, otherwise step B10 is executed;
step B6. creates and starts the virtual machine with the given configuration of step B5 on the platform under test, and executes step B7;
step B7. executes step B8 for each application in turn. After the completion, executing step B9;
step B8., executing the application appointed in step B7 on the virtual machine, and informing the ICM of collecting data after the application is completed;
step B9. closes and deletes the virtual machine created in step B6, informing the TGM that the execution of all applications has been completed;
step B10, respectively creating and starting a plurality of virtual machines with the configuration given by the TGM on the platform to be tested, and executing step B11;
b11, executing an application combination given by the TGM on the virtual machine created by the B10, and after the application execution is finished, informing the ICM to collect data and executing the step B12;
step B12. close and delete all virtual machines created in step B10, informing the TGM that the execution of the application combination has been completed.
The ICM collects the performance and environment of the AEM application execution in steps B3, B8, and B11. The environment includes whether the environment is a virtualization environment, which virtualization technology provides the environment, and the resource configuration of the virtual machine. The ICM transmits all collected information to the DPM.
And the DPM calculates the score of each virtualization technology according to the data transmitted by the ICM and the application weight value input by the user. The method comprises the following specific steps:
step C1, executing steps C2 and C4 for each virtualization technology, and executing step C7 after the steps are completed;
step C2. performs step C3 for each application;
step C3. calculates the ratio of the performance of the application specified by C2 executed on the virtual machine configuring all resources in the virtualization environment provided by the virtualization technology specified by C1 to the performance of the application executed in the non-virtualization environment to obtain the virtualization factor of the virtualization technology of the application;
step C4. perform step C5 for each application combination;
step C5. performs step C6 for each application in the combination of applications of step C4;
step C6. calculating the interference factor of the application specified in step C5, that is, the ratio of the performance of the application running on the tested platform in the form of application combination on the same configured virtual machine to the performance of the application running on the tested platform alone;
step C7. performs step C8 for each virtualization technique, and performs step C9 when completed;
step C8. is to calculate the weighted average of all applied factors of the virtualization technology designated in step C7 and calculated in steps C1-C6, with the application weight value inputted by the user as the weight corresponding to all applied factors, and calculate the obtained result as the score of the virtualization technology;
step C9. outputs the virtualization technique score calculated by steps C7-C8 to the user.
The following description will take two virtualization technical schemes of Xen and Docker and two applications as examples to illustrate specific embodiments of the present invention. Two applications are denoted a and b, respectively. The application weights entered by the user are wa and wb, respectively. The non-virtualized environment of the platform under test is provided by the CentOS 6.7 operating system. Xen and Docker are already installed on the platform to be tested. An alternative virtual machine configuration is provided, denoted by v. The data entered by the user has no combinatorial preferences.
The specific implementation steps of the above 5 modules are as follows.
The specific steps of TGM are as follows:
step A1, informing the VSM to start the platform to be tested, entering a CentOS 6.7 environment, and executing step A2 after the VSM is finished;
step A2, informing the AEM to execute a and b on the tested platform in sequence, and executing step A3 after the AEM is finished;
step A3, informing the VSM to switch the tested platform to a Docker virtualization environment, and executing the step A4 after the VSM is finished;
and A4, informing the AEM to create a Docker virtual machine configured as all resources of the platform on the platform to be tested, and executing a and b on the created virtual machine in sequence. Step A5 is performed after the AEM is completed;
and A5, informing the AEM to create two Docker virtual machines configured as v on the tested platform, and respectively executing a and b on the two created virtual machines. Step A6 is performed after the AEM is completed;
step A6, informing the VSM to switch the tested platform to the Xen virtualization environment, and executing the step A7 after the VSM is finished;
step A7. tells the AEM to create a Xen virtual machine on the platform under test that is configured to all resources of the platform, and to execute a and b sequentially on the created virtual machine. Step A8 is performed after the AEM is completed;
step A8. tells the AEM to create two Xen virtual machines configured as v on the platform under test, and execute a and b on the two virtual machines, respectively;
the specific steps of the VSM are as follows:
b1, if the received information from the TGM is to open the platform to be tested, executing the step B2, otherwise, executing the step B3;
b2, starting the platform to be tested, entering a CentOS 6.7 environment, and informing the TGM after the completion;
step B3, if the received information from the TGM is that the Docker service is started, executing step B4, otherwise, executing step B5;
step B4., executing a service Docker start on the tested platform, entering a Docker virtualization environment, and informing the TGM after completion;
and step B5., modifying/etc/grub.conf files, modifying the kernel started by default into Xen, restarting the virtual machine, and informing the TGM of finishing the switching of the Xen virtualization environment after the kernel is modified by default.
The specific steps of AEM are as follows:
step C1, if the received information is transmitted in the TGM step A2, executing the step C2, otherwise executing the step C4;
step C2., executing a on the platform to be tested, informing ICM to collect data after a is finished and executing step C3;
step C3., executing b on the tested platform, informing ICM to collect data and informing TGM to be completed after b is completed;
step C4, if the received information is transmitted in the TGM step A4, executing the step C5, otherwise executing the step C9;
step C5., creating and starting a Docker virtual machine configured as all resources of the platform on the platform to be tested, and executing step C6 after the Docker virtual machine is completed;
step C6. executes a on the virtual machine created in step C5, informs the ICM to collect data after a is completed, and executes step C7;
step C7. executing step b on the virtual machine created in step C5, informing the ICM to collect data after b is completed and executing step C8;
step C8., closing and deleting the virtual machine created in step C5, and informing the TGM of completion after completion;
step C9. if the received message is TGM transmitted in step A5, execute step C10, otherwise execute step C13;
c10, creating and starting two Docker virtual machines configured as v on the tested platform, and executing the step C11 after the two Docker virtual machines are completed;
step C11, running a on one virtual machine created in the step C10, running b on the other virtual machine created in the step C10, informing the ICM of collecting data after a and b are finished, and executing the step C12;
c12, closing and deleting the two virtual machines created in the step C10, and informing that the TGM is finished after the completion;
step C13. if the received information is transmitted in the TGM step A7, executing the step C14, otherwise executing the step C1;
c14, creating and starting a Xen virtual machine configured as all resources of the platform on the platform to be tested, and executing the step C15 after the Xen virtual machine is completed;
step C15, executing a on the virtual machine created in the step C14, informing the ICM of collecting data after a is completed, and executing a step C16;
step C16, executing the step b on the virtual machine created in the step C14, informing the ICM of collecting data after the step b is completed, and executing the step C17;
c17, closing and deleting the virtual machine created in the step C14, and informing that the TGM is finished after the virtual machine is finished;
c18, creating and starting two Xen virtual machines configured as v on the tested platform, and executing the step C19 after the two Xen virtual machines are completed;
step C19, operating a on one virtual machine created in the step C18, operating b on the other virtual machine created in the step C18, informing the ICM of collecting data after a and b are finished, and executing the step C20;
step C20, closing and deleting the two virtual machines created in the step C18, and informing that the TGM is finished after the completion;
the specific steps of ICM are as follows:
step D1. if the received information is transmitted in step C2 of AEM, executing step D1, otherwise executing step D3;
step D2. collects the performance p of a executionaAnd transmitting to the DPM;
step D3. if the received information is transmitted in step C3 of AEM, executing step D4, otherwise executing step D5;
step D4. collects the performance p of b executionbAnd transmitting to the DPM;
step D5. if the received message is transmitted in step C6 of AEM, execute step D6, otherwise execute step D7;
step D6. collects the performance p of a executionadAnd transmitting to the DPM;
step D7. if the received message is transmitted in step C7 of AEM, execute step D8, otherwise execute step D9;
step D8. collects the performance p of b executionbdAnd transmitting to the DPM;
step D9. if the received message is transmitted in step C11 of AEM, execute step D10, otherwise execute step D11;
step D10. Collection of Performance p of a and b executionadcAnd pbdcAnd transmitting to the DPM;
step D11. if the received information is transmitted in step C15 of AEM, executing step D12, otherwise executing step D13;
step D12. collecting the performance p of a executionaxAnd transmitting to the DPM;
step D13. if the received information is transmitted in step C16 of AEM, executing step D14, otherwise executing step D15;
step D14. collecting the performance p of b executionbxAnd transmitting to the DPM;
step D15. Collection of Performance p of a and b executionaxcAnd pbxcAnd transmitting to the DPM;
the specific steps of DPM are as follows:
step E1. after receiving all the data transmitted by the ICM in the steps D1-D15, executing the step E2;
step E2, calculating a virtualization factor V of a in Docker environmentad=pad/paStep E3 is executed;
step E3. calculates the virtualization factor V of b in Docker environmentbd=pbd/pbStep E4 is executed;
step E4. calculating interference factor I of a when a and b are combined in Docker environmentadc=padc/padStep E5 is executed;
step E5. calculating interference factor I of a when a and b are combined in Docker environmentbdc=pbdc/pbdStep E6 is executed;
step E6. calculates a score S for the Docker virtualization techniqued=[wa×(Vad+Iadc)+wb×(Vbd+Ibdc)]/(wa+wb) Step E7 is executed;
step E7. calculates a virtualization factor V for a in Xen environmentax=pax/paStep E8 is executed;
step E8. calculates the virtualization factor V of b in Xen environmentbx=pbx/pbStep E9 is executed;
step E9. is to calculate the interference factor I of a when a and b are combined under Xen environmentaxc=paxc/paxStep E10 is executed;
step E10. calculating the interference factor I of a when a and b are combined under Xen environmentbxc=pbxc/pbxStep E11 is executed;
step E11. calculate the score S of Xen virtualization technologyx=[wa×(Vax+Iaxc)+wb×(Vbx+Ibxc)]/(wa+wb) Step E12 is executed;
step E12. score S of two virtualization technologiesdAnd SxAnd transmitting to the user.
The following are method embodiments corresponding to the above system embodiments, and the present implementation system can be implemented in cooperation with the above embodiments. The related technical details mentioned in the above embodiments are still valid in the present implementation method, and are not described herein again in order to reduce repetition. Accordingly, the related technical details mentioned in the present embodiment method can also be applied to the above embodiment system.
The invention also provides an automatic decision-making method of the virtualization technology, which comprises the following steps:
step 1, generating a test plan according to user input data and executing the test plan;
step 2, switching between a non-virtualization environment and a virtualization environment and among virtualization environments according to the execution progress requirement of the test plan;
step 3, executing the application in a non-virtualization environment or a virtualization environment according to the execution progress requirement of the test plan;
step 4, collecting performance data when the application is executed in a non-virtualization environment or a virtualization environment;
and the data processing module is used for calculating the influence factor of each virtualization technology on each application according to the performance data and the interference factor of each virtualization technology under various combination conditions in the virtualization environment.
The present invention may be embodied in other specific forms without departing from the spirit or scope thereof, and it is therefore intended that all matter contained in the above description or shown in the accompanying drawings shall be interpreted as illustrative and not in a limiting sense.