CN112965788B - Task execution method, system and equipment in hybrid virtualization mode - Google Patents

Task execution method, system and equipment in hybrid virtualization mode Download PDF

Info

Publication number
CN112965788B
CN112965788B CN202110299443.5A CN202110299443A CN112965788B CN 112965788 B CN112965788 B CN 112965788B CN 202110299443 A CN202110299443 A CN 202110299443A CN 112965788 B CN112965788 B CN 112965788B
Authority
CN
China
Prior art keywords
task
virtual machine
container
executed
control node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110299443.5A
Other languages
Chinese (zh)
Other versions
CN112965788A (en
Inventor
李金库
胡少泽
韦昊典
罗林波
马建峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xidian University
Original Assignee
Xidian University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xidian University filed Critical Xidian University
Priority to CN202110299443.5A priority Critical patent/CN112965788B/en
Publication of CN112965788A publication Critical patent/CN112965788A/en
Application granted granted Critical
Publication of CN112965788B publication Critical patent/CN112965788B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/577Assessing vulnerabilities and evaluating computer system security
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45587Isolation or security of virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/034Test or assess a computer or a system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)
  • Power Sources (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a task execution method, a system and equipment of a hybrid virtualization mode, which comprise the steps of receiving task information by utilizing a control node, selecting a virtualization mode in task execution according to the overall energy consumption of a cloud computing system, and correspondingly creating a virtual machine or a container; the control node acquires the created virtual machine or container, carries out environment configuration on the virtual machine or container according to the task script, and executes the task; after the task is executed, a task result file is obtained, stored and returned; according to the overall energy consumption of the cloud computing system, the method selects a virtualization mode of a cloud computing process in task execution, and intelligently selects a virtual machine or a container to execute the task in the cloud computing system; the virtual machine is used when the whole energy consumption of the cloud computing is low, and the container is used when the whole energy consumption of the cloud computing is high, so that balance between the energy consumption and the safety of the cloud computing system is achieved, the whole energy consumption of the cloud computing system is reduced, the whole safety of the system is improved, and the task operation efficiency is improved.

Description

Task execution method, system and equipment in hybrid virtualization mode
Technical Field
The invention belongs to the field of computer science and technology, relates to virtualization and task execution in a cloud computing system, and particularly relates to a method, a system and equipment for executing tasks in a hybrid virtualization mode.
Background
Cloud computing can be roughly divided into three types functionally, including IaaS providing infrastructure services, paaS providing platform services, and SaaS providing software services; in particular, iaaS provides infrastructure services that provide virtualized computing resources such as virtual machines, storage, networks, and operating systems to individuals or businesses; paaS provides platform service, which provides needed development environment for developer; saaS provides software services that host applications and open access rights for applications.
Task execution is an important function of a cloud computing system and is highly valued by the industry; the cloud computing system transfers tasks needing a large amount of computation from the local to the cloud, so that the local pressure is reduced; meanwhile, a user does not need to purchase needed equipment for executing a task, so that unnecessary cost is greatly reduced; the cloud computing system uses a virtualization technology to integrate and centrally manage server resources, and allocates required computing resources, such as a CPU, a memory, network resources, and the like, for executing tasks. The current computing system virtualization mode mainly comprises a virtual machine and a container; the virtual machine uses an independent operating system, is an abstraction of a physical layer, and has a virtualized CPU, a memory, IO equipment and the like; the container is an abstraction of an application layer, and directly uses a CPU, a memory, IO equipment and the like of a physical machine; thus, the virtual machine is safer with respect to the container, which is more efficient with respect to the virtual machine.
Currently, for task execution, most of existing cloud computing systems focus attention on task scheduling, namely, a scheduling algorithm is used for achieving various purposes such as load balancing of a server, reducing energy consumption of the server and accelerating computing speed of the task; for one of the single use of the virtualization modes, namely selecting a virtual machine or a container to finish the execution of the task; the virtual machine virtualization mode is singly used, and the whole energy consumption of the cloud computing system is high; and the single-use container virtualization mode has lower overall security of the cloud computing system.
Disclosure of Invention
Aiming at the technical problems in the prior art, the invention provides a task execution method, a system and equipment in a hybrid virtualization mode, which are used for solving the technical problems of higher overall energy consumption or lower overall safety of a cloud computing system caused by adopting a single virtualization mode in the existing task execution process.
In order to achieve the above purpose, the invention adopts the following technical scheme:
the invention provides a task execution method of a hybrid virtualization mode, which comprises the following steps:
receiving task information by using a control node;
according to the overall energy consumption of the cloud computing system, selecting a virtualization mode in task execution, and correspondingly creating a virtual machine or a container;
the control node acquires the created virtual machine or container, carries out environment configuration on the virtual machine or container according to the task script, and executes the task; and after the task is executed, acquiring a task result file, and storing and returning the task result file.
Further, the task information received by the control node comprises task to be executed and task configuration information; the task configuration information comprises CPU core number, memory size, hard disk size and an operating system.
Further, before the virtualized mode in task execution is selected according to the overall energy consumption of the cloud computing system, whether the task to be executed is applicable to two virtualized modes of a virtual machine and a container is judged according to task configuration information.
Further, selecting a virtualization mode process, and selecting by adopting a virtualization judgment formula; the virtualization judgment formula is as follows:
wherein alpha is cpu Is the CPU correlation coefficient; beta cpu The ratio of CPU power consumption to total power consumption of the task to be executed; η (eta) cpu A ratio of speeds at which the CPU executes commands in the virtual machine and the container in the operating system specified for the task to be performed; alpha mem Is the memory correlation coefficient; beta mem The ratio of the memory power consumption to the total power consumption of the task to be executed; η (eta) mem The ratio of speeds at which commands are executed in the virtual machine and the container are present in the operating system specified for the task to be executed; alpha disk Is the correlation coefficient of the hard disk; beta disk The ratio of the power consumption of the hard disk to the total power consumption of the task to be executed; η (eta) disk Operating system designated for task to be performedThe ratio of the speeds at which the hard disk executes commands in the virtual machine and the container; mu is a fixed parameter; θ is the current power consumption ratio of the cloud computing server.
Further, the virtual machine creation process specifically includes:
selecting a computing node according to a virtual machine scheduling algorithm by using the control node; and pulling the virtual machine image creation virtual machine from the storage node by the computing node, and informing the control node that the virtual machine creation is successful by the computing node.
Further, the container creation process is specifically as follows:
rotating the computing node according to a container scheduling algorithm by using the control node; the computing node pulls the container image from the storage node to create a container; the compute node informs the control node that the container creation was successful.
Further, the control node obtains the created virtual machine or container, configures the environment of the virtual machine or container according to the task script, and executes the task, and the specific process is as follows:
the method comprises the steps that a control node is utilized to obtain script files required by tasks to be executed, and virtual machine or container configuration information is obtained;
the control node carries out environment configuration on the virtual machine or the container according to the task script;
checking the environment configuration of the virtual machine or the container according to the task script, re-executing the environment configuration operation if the error exists, and executing the task if the error exists;
the control node controls the virtual machine or the container to execute the task according to the task script.
Further, the script file comprises environment configuration and execution steps of the task to be executed; the control node obtains configuration information of the virtual machine or the container, wherein the configuration information comprises a user name, a password and an ip address; the control node establishes connection with the virtual machine or the container in the ssh mode.
The invention also provides a task execution system of the hybrid virtualization mode, which comprises a virtualization mode selection module and a task execution module;
the virtualization mode selection module is used for receiving task information by using the control node; according to the overall energy consumption of the cloud computing system, selecting a virtualization mode in task execution, and correspondingly creating a virtual machine or a container;
the task execution module is used for controlling the node to acquire the created virtual machine or container, carrying out environment configuration on the virtual machine or container according to the task script, and executing the task; and after the task is executed, acquiring a task result file, and storing and returning the task result file.
The invention also provides task execution equipment in a hybrid virtualization mode, which comprises a memory, a processor and executable instructions stored in the memory and capable of running in the processor; and the processor executes the executable instructions to realize the task execution method of the hybrid virtualization mode.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a task execution method, a system and equipment of a hybrid virtualization mode, wherein the virtualization mode of a cloud computing process in task execution is selected according to the overall energy consumption of a cloud computing system, so that the task in the cloud computing system is executed by intelligently selecting a virtual machine or a container; the virtual machine is used when the whole energy consumption of the cloud computing is low, and the container is used when the whole energy consumption of the cloud computing is high, so that balance between the energy consumption and the safety of the cloud computing system is achieved, the whole energy consumption of the cloud computing system is reduced, the whole safety of the system is improved, and the task operation efficiency is improved.
Compared with the task execution method adopting a single virtual machine virtualization mode, the task execution method adopting the hybrid virtualization mode reduces the overall energy consumption of the cloud computing system; because the container is fewer than the abstraction layer of the virtual machine, the task running on the container directly uses the resource of the physical machine, and the virtual machine virtualizes the hardware resource, the efficiency of the container is higher than that of the virtual machine on CPU, memory and IO read-write, and correspondingly, the energy consumption of the container is lower than that of the virtual machine; the mixed use of the virtual machine and the container reduces the overall energy consumption of the cloud computing system; compared with the task execution in a single-use container virtualization mode, the overall safety of the cloud computing system is improved; because the virtual machine abstracts the whole operating system, the resource isolation aspect is better than that of a container, an application program in the virtual machine has independent resources, and the loopholes of the application program only affect one virtual machine and basically do not affect other virtual machines and physical machines; the application programs in the container share physical machine resources, and the probability that the loopholes of the application programs affect the physical machines and other application programs is definitely larger than that of the virtual machines; thus, the hybrid use of virtual machines and containers improves the overall security of the cloud computing system.
Drawings
FIG. 1 is a diagram of a single cloud computing cluster architecture of the present invention;
FIG. 2 is a general flow chart of the present invention;
FIG. 3 is a selective virtualization mode sub-flowchart of the present invention;
FIG. 4 is a task execution sub-flowchart of the present invention.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects solved by the invention more clear, the following specific embodiments are used for further describing the invention in detail. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The invention provides a task execution method of a hybrid virtualization mode, which comprises the following steps:
step 1, receiving task information by using a control node; the method comprises the steps that a user autonomously selects a virtualization mode in task execution or intelligently selects the virtualization mode in task execution according to the overall energy consumption of a cloud computing system, and a virtual machine or a container is correspondingly created; the task information received by the control node comprises tasks to be executed and task configuration information; the task configuration information comprises CPU core number, memory size, hard disk size and an operating system;
according to the method and the device, before the virtualization modes in task execution are intelligently selected according to the overall energy consumption of the cloud computing system, whether the task to be executed is applicable to two virtualization modes of a virtual machine and a container is judged according to task configuration information.
And when the task to be executed is not suitable for the container virtualization mode, selecting the virtual machine for virtualization, and executing to create the virtual machine.
When the task to be executed is suitable for two virtualization methods of the virtual machine and the container, judging that the virtualization mode is intelligent selection, executing the virtual machine or the container virtualization mode intelligently selected by the server, and correspondingly creating the virtual machine or the container.
In the invention, a virtualization mode process is intelligently selected, and a virtualization judgment formula is adopted for selection; the virtualization judgment formula is as follows:
wherein alpha is cpu Is the CPU correlation coefficient; beta cpu The ratio of CPU power consumption to total power consumption of the task to be executed; η (eta) cpu A ratio of speeds at which the CPU executes commands in the virtual machine and the container in the operating system specified for the task to be performed; alpha mem Is the memory correlation coefficient; beta mem The ratio of the memory power consumption to the total power consumption of the task to be executed; η (eta) mem The ratio of speeds at which commands are executed in the virtual machine and the container are present in the operating system specified for the task to be executed; alpha disk Is the correlation coefficient of the hard disk; beta disk The ratio of the power consumption of the hard disk to the total power consumption of the task to be executed; η (eta) disk A ratio of speeds at which the hard disk executes commands in the virtual machine and the container in the operating system specified for the task to be performed; mu is a fixed parameter; θ is the current power consumption ratio of the cloud computing server.
Step 2, creating a virtual machine
The virtual machine creation process is specifically as follows:
selecting a computing node according to a virtual machine scheduling algorithm by using the control node; and pulling the virtual machine image creation virtual machine from the storage node by the computing node, and informing the control node that the virtual machine creation is successful by the computing node.
Step 3, creating a container
The container creation process is specifically as follows:
rotating the computing node according to a container scheduling algorithm by using the control node; the computing node pulls the container image from the storage node to create a container; the compute node informs the control node that the container creation was successful.
Step 4, the control node acquires the created virtual machine or container, carries out environment configuration on the virtual machine or container according to the task script, and executes the task; the specific process is as follows:
the method comprises the steps that a control node is utilized to obtain script files required by tasks to be executed, and virtual machine or container configuration information is obtained; the script file comprises environment configuration and execution steps of a task to be executed; the control node obtains configuration information of the virtual machine or the container, wherein the configuration information comprises a user name, a password and an ip address; the control node establishes connection with the virtual machine or the container in the ssh mode.
The control node carries out environment configuration on the virtual machine or the container according to the task script;
checking the environment configuration of the virtual machine or the container according to the task script, re-executing the environment configuration operation if the error exists, and executing the task if the error exists;
the control node controls the virtual machine or the container to execute the task according to the task script.
And 5, after the task execution is completed, acquiring a task result file, and storing and returning the task result file.
Step 6, the control node deletes the virtual machine or container on the computing node; the virtual machine or container is not useful at this point, since the task has already been performed.
The invention also provides a task execution system of the hybrid virtualization mode, which comprises a virtualization mode selection module and a task execution module; the virtualization mode selection module is used for receiving task information by using the control node; according to the overall energy consumption of the cloud computing system, selecting a virtualization mode in task execution, and correspondingly creating a virtual machine or a container; the task execution module is used for controlling the node to acquire the created virtual machine or container, carrying out environment configuration on the virtual machine or container according to the task script, and executing the task; and after the task is executed, acquiring a task result file, and storing and returning the task result file.
The invention also provides task execution equipment in a mixed virtualization mode, which comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor.
When the processor executes the computer program, the following method is realized:
receiving task information by using a control node; according to the overall energy consumption of the cloud computing system, selecting a virtualization mode in task execution, and correspondingly creating a virtual machine or a container; the control node acquires the created virtual machine or container, carries out environment configuration on the virtual machine or container according to the task script, and executes the task; and after the task is executed, acquiring a task result file, and storing and returning the task result file.
Or when the processor executes the computer program, the functions of all modules in the task execution system in the mixed virtualization mode are realized; for example: the virtualization mode selection module is used for receiving task information by using the control node; according to the overall energy consumption of the cloud computing system, selecting a virtualization mode in task execution, and correspondingly creating a virtual machine or a container; the task execution module is used for controlling the node to acquire the created virtual machine or container, carrying out environment configuration on the virtual machine or container according to the task script, and executing the task; and after the task is executed, acquiring a task result file, and storing and returning the task result file.
The computer program may be divided into one or more modules/units, which are stored in the memory and executed by the processor to accomplish the present invention.
The task execution device in the hybrid virtualization mode can be computing devices such as a desktop computer, a notebook computer, a palm computer and a cloud server. The task execution device in the hybrid virtualization manner may include, but is not limited to, a processor and a memory.
The processor may be a central processing unit (CentralProcessingUnit, CPU), but may also be other general purpose processors, digital signal processors (DigitalSignalProcessor, DSP), application specific integrated circuits (ApplicationSpecificIntegratedCircuit, ASIC), off-the-shelf programmable gate arrays (Field-ProgrammableGateArray, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like.
The memory may be used to store the computer program and/or module, and the processor may implement various functions of the task execution system in the hybrid virtualization manner by running or executing the computer program and/or module stored in the memory and invoking data stored in the memory.
The modules/units of the hybrid virtualized task execution system of the present invention, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the above-mentioned methods, or may be implemented by instructing the relevant hardware by a computer program, where the computer program may be stored in a computer readable storage medium, and the computer program may implement the steps of the task execution method of the hybrid virtualization method when executed by a processor.
Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a Read-only memory (ROM), a random access memory (RAM, randomAccessMemory), an electrical carrier signal, a telecommunication signal, a software distribution medium, and so forth.
It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
Examples
As shown in fig. 1, in this embodiment, a single cloud computing cluster includes a control node, a storage node, and a plurality of computing nodes; the control node manages all virtual machines and containers, the storage node stores mirror images of the virtual machines and containers, and the computing node is responsible for the life cycle of the virtual machines and containers.
As shown in fig. 2-4, the present embodiment provides a task execution method in a hybrid virtualization manner, which integrates the advantages and disadvantages of virtual machine virtualization and container virtualization, intelligently selects a virtual machine or container virtualization manner, reduces the overall energy consumption of a cloud computing system, and effectively improves the overall security of the cloud computing system; the method specifically comprises the following steps:
and 1, selecting and creating a virtualization mode.
Step 11, receiving task information by using a control node; the task information comprises a task to be executed and configuration information required by the task; the configuration information required by the task comprises CPU core number, memory size, hard disk size and an operating system.
Step 12, judging a virtualization mode in the task to be executed by using the control node; if the virtual machine is virtualized, executing step 15; if it is a container virtualization, then step 16 is performed; if the virtualization mode is intelligently selected, step 13 is performed.
Step 13, when the intelligent selection of the virtualization modes is adopted, firstly, judging whether the task is applicable to two virtualization modes or not by using a control node; if not, go to step 15; otherwise, step 14 is performed.
Because the container is a resource directly using the physical machine, the operating system kernel of the container is consistent with the operating system kernel of the physical machine, limiting the mirror image that the container can use. For example, when the server uses Linux kernels, the operating system of the container can only select Linux kernels, i.e. Linux operating systems; when the task is not Linux, the server directly selects the virtual machine as a virtualization mode, and step 15 is executed. When the task requires the Linux operating system, the server intelligently selects a virtual machine or a container virtualization mode, and step 14 is executed.
Step 14, intelligently selecting a virtual machine or a container virtualization mode by utilizing a control node according to the overall energy consumption of the cloud computing system;
the present embodiment is proposed based on the following observations: the virtual machine is safer than the container, and the energy consumption of the container is lower than that of the virtual machine; therefore, the easier the virtual machine virtualization mode is selected to be used when the overall power consumption of the server is low, the easier the container virtualization mode is selected to be used when the overall power consumption of the server is high; therefore, a balance point is obtained between the energy consumption and the safety of the cloud computing system, the highest energy consumption of the whole cloud computing system is reduced, and meanwhile, the safety of the whole cloud computing system is effectively improved.
Specific:
step 14a, obtaining an operating system required by a task to be executed, and calculating to obtain the efficiency ratio of the operating system in the virtual machine and the container;
step 14b, obtaining the number of CPU cores and the memory size required by the task to be executed, and calculating the maximum possible power consumption of the CPU, the memory and the hard disk to obtain the power consumption proportion of the CPU, the memory and the hard disk;
step 14c, obtaining the correlation coefficients of the CPU, the memory and the hard disk according to the type of the task to be executed;
step 14d, obtaining the current power consumption of the whole cloud computing system, and obtaining the ratio of the current power consumption to the maximum power consumption;
step 14e, selecting by using a virtualization judgment formula; judging a virtualization mode, and executing step 15 if the virtual machine is virtualized; if it is a container virtualization, then step 16 is performed; the virtualization judgment formula is as follows:
wherein alpha is cpu Is the CPU correlation coefficient; beta cpu The ratio of CPU power consumption to total power consumption of the task to be executed; η (eta) cpu A ratio of speeds at which the CPU executes commands in the virtual machine and the container in the operating system specified for the task to be performed; alpha mem Is the memory correlation coefficient; beta mem The ratio of the memory power consumption to the total power consumption of the task to be executed; η (eta) mem To be executed at willThe ratio of the speeds at which commands are executed in the virtual machine and the container is present in the service-specific operating system; alpha disk Is the correlation coefficient of the hard disk; beta disk The ratio of the power consumption of the hard disk to the total power consumption of the task to be executed; η (eta) disk A ratio of speeds at which the hard disk executes commands in the virtual machine and the container in the operating system specified for the task to be performed; mu is a fixed parameter; θ is the current power consumption ratio of the cloud computing server.
In the present embodiment, η cpu 、η mem η disk Representing the efficiency ratio of the container and the virtual machine, and determining according to an operating system required by an actual task; since the container is fewer than the virtual machine abstraction layer, the task running on the container is to directly use the resources of the physical machine; the virtual machine virtualizes hardware resources, so that the efficiency of the container is higher than that of the virtual machine in CPU, memory and IO reading and writing, and the task calculation time is longer when the task calculation is performed.
β cpu 、β mem Beta and beta disk Respectively representing the power consumption proportion of the CPU, the memory and the hard disk; approximating the CPU power consumption relation as a primary function related to the CPU utilization rate, the memory power consumption relation as a secondary function related to the memory occupancy rate, and the hard disk power consumption as a primary function related to the IO request rate; according to the CPU core number and the memory size required by the task, the maximum possible power consumption of the CPU, the memory and the hard disk can be calculated, and then the power consumption proportion of the CPU, the memory and the hard disk is obtained.
α cpu 、α mem Alpha and alpha disk Respectively representing the correlation coefficients of the CPU, the memory and the hard disk; when the CPU and the memory are the same, the power consumption of the CPU, the memory and the hard disk is definitely different when the task is executed according to different task types; the task types are classified into computation-intensive, memory-intensive and IO-intensive, and different task types have different CPU, memory and hard disk correlation coefficients.
Mu represents the value of the first partial formula obtained when the operating system is the physical machine operating system according to the fact that the power consumption of the CPU, the memory and the hard disk is maximum and the correlation coefficient of the CPU, the memory and the hard disk is 1, namely a fixed value. θ represents the current power consumption ratio of cloud computing, the current total power consumption of the cloud computing can be roughly obtained according to the power consumption relation of the CPU, the memory and the hard disk, and the maximum power consumption of the cloud computing can be divided to achieve the current power consumption ratio of the cloud computing.
The core idea of the embodiment is to design and implement a formula for intelligently selecting a virtual machine or a container virtualization mode; the formula can select a virtualization mode according to the information submitted by the task; the formula is divided into a left part and a right part, and the formula of the first part is alpha cpu β cpu η cpumem β mem η memdisk β disk η disk The second part isAnd selecting a container when the value obtained by the first part is larger than the value obtained by the second part, executing step 16, otherwise selecting a virtual machine, and executing step 15.
Step 15, creating a virtual machine, which specifically comprises the following steps:
15a, the control node selects a computing node according to a virtual machine scheduling algorithm; the scheduling algorithm can be a self-scheduling algorithm of the cloud computing system or a self-defined scheduling algorithm;
step 15b, the computing node pulls the virtual machine image from the storage node to create a virtual machine;
step 15c, the computing node informs the control node that the virtual machine is successfully created, and the step 21 is skipped.
Step 16, creating a container, which specifically comprises the following steps:
16a, the control node selects a computing node according to a container scheduling algorithm; the scheduling algorithm can be a self-scheduling algorithm of the cloud computing system or a self-defined scheduling algorithm;
step 16b, the computing node pulls the container mirror image from the storage node to create a container;
step 16c, the computing node informs the control node that the container creation is successful, and the process jumps to step 21.
Step 2, executing tasks, which specifically comprises the following steps:
step 21, the control node acquires script files required by tasks; the script file comprises the environment configuration and execution steps of the task;
step 22, the control node obtains the configuration information of the virtual machine or the container and establishes connection; the control node obtains configuration information of the virtual machine or the container, wherein the configuration information comprises a user name, a password and an ip address; the control node establishes connection with the virtual machine or the container in the ssh mode.
Step 23, the control node carries out environment configuration on the virtual machine or the container according to the task script;
step 24, the control node checks the environment configuration of the virtual machine or the container according to the task script, if the virtual machine or the container has errors, the step 23 is executed again, otherwise, the step 25 is executed;
step 25, the control node controls the virtual machine or the container to execute the task according to the task script; wherein the executing step is a custom rule;
step 26, after the task execution is completed, the control node acquires a task result file from the virtual machine or the container, and stores and returns the task result file;
step 27, the control node deletes the virtual machine or container on the computing node; the virtual machine or container is not useful at this point, since the task has already been performed.
Compared with the task execution method adopting a single virtual machine virtualization mode, the task execution method and system adopting the hybrid virtualization mode effectively reduce the overall energy consumption of the cloud computing system; because the container is fewer than the abstraction layer of the virtual machine, the task running on the container directly uses the resource of the physical machine, and the virtual machine virtualizes the hardware resource, the container is more efficient than the virtual machine in CPU, memory and IO read-write, and correspondingly the container is lower than the virtual machine in energy consumption. The mixed use of the virtual machine and the container reduces the overall energy consumption of the cloud computing system; compared with task execution in a single-use container virtualization mode, the method and the device improve the overall security of the cloud computing system. Because the virtual machine abstracts the whole operating system, the resource isolation aspect is better than that of a container, an application program in the virtual machine has independent resources, and the loopholes of the application program only affect one virtual machine and basically do not affect other virtual machines and physical machines; the application programs in the container share physical machine resources, and the probability that the loopholes of the application programs affect the physical machines and other application programs is definitely larger than that of the virtual machines; thus, the hybrid use of virtual machines and containers improves the security of the cloud computing as a whole.
The method integrates the advantages and disadvantages of two virtualization modes of the virtual machine and the container, uses the virtual machine when the energy consumption of the whole cloud computing system is low, uses the container when the energy consumption of the whole cloud computing system is high, balances the energy consumption and the safety of the cloud computing system, reduces the energy consumption of the whole cloud computing system, and improves the overall safety of the system.
The above embodiment is only one of the implementation manners capable of implementing the technical solution of the present invention, and the scope of the claimed invention is not limited to the embodiment, but also includes any changes, substitutions and other implementation manners easily recognized by those skilled in the art within the technical scope of the present invention.

Claims (6)

1. The task execution method of the hybrid virtualization mode is characterized by comprising the following steps of:
receiving task information by using a control node;
according to the overall energy consumption of the cloud computing system, selecting a virtualization mode in task execution, and correspondingly creating a virtual machine or a container;
the control node acquires the created virtual machine or container, carries out environment configuration on the virtual machine or container according to the task script, and executes the task; after the task is executed, a task result file is obtained, stored and returned;
the task information received by the control node comprises tasks to be executed and task configuration information; the task configuration information comprises CPU core number, memory size, hard disk size and an operating system;
before a virtualization mode in task execution is selected according to the overall energy consumption of the cloud computing system, judging whether a task to be executed is applicable to two virtualization modes of a virtual machine and a container according to task configuration information;
selecting a virtualization mode process, and selecting by adopting a virtualization judgment formula; the virtualization judgment formula is as follows:
wherein alpha is cpu Is the CPU correlation coefficient; beta cpu The ratio of CPU power consumption to total power consumption of the task to be executed; η (eta) cpu A ratio of speeds at which the CPU executes commands in the virtual machine and the container in the operating system specified for the task to be performed; alpha mem Is the memory correlation coefficient; beta mem The ratio of the memory power consumption to the total power consumption of the task to be executed; η (eta) mem The ratio of speeds at which commands are executed in the virtual machine and the container are present in the operating system specified for the task to be executed; alpha disk Is the correlation coefficient of the hard disk; beta disk The ratio of the power consumption of the hard disk to the total power consumption of the task to be executed; η (eta) disk A ratio of speeds at which the hard disk executes commands in the virtual machine and the container in the operating system specified for the task to be performed; mu is a fixed parameter; θ is the current power consumption ratio of the cloud computing server;
the control node acquires the created virtual machine or container, carries out environment configuration on the virtual machine or container according to the task script, and executes the task, and the specific process is as follows:
the method comprises the steps that a control node is utilized to obtain script files required by tasks to be executed, and virtual machine or container configuration information is obtained;
the control node carries out environment configuration on the virtual machine or the container according to the task script;
checking the environment configuration of the virtual machine or the container according to the task script, re-executing the environment configuration operation if the error exists, and executing the task if the error exists;
the control node controls the virtual machine or the container to execute the task according to the task script.
2. The method for executing tasks in a hybrid virtualization manner according to claim 1, wherein the virtual machine creation process specifically comprises the following steps:
selecting a computing node according to a virtual machine scheduling algorithm by using the control node; and pulling the virtual machine image creation virtual machine from the storage node by the computing node, and informing the control node that the virtual machine creation is successful by the computing node.
3. The method for executing tasks in a hybrid virtualized manner according to claim 1, wherein the container creation process is specifically as follows:
rotating the computing node according to a container scheduling algorithm by using the control node; the computing node pulls the container image from the storage node to create a container; the compute node informs the control node that the container creation was successful.
4. A method for executing tasks in a hybrid virtualized manner as recited in claim 3 wherein the script file comprises environmental configuration and execution steps for the tasks to be executed; the control node obtains configuration information of the virtual machine or the container, wherein the configuration information comprises a user name, a password and an ip address; the control node establishes connection with the virtual machine or the container in the ssh mode.
5. The task execution system of the hybrid virtualization mode is characterized by comprising a virtualization mode selection module and a task execution module;
the virtualization mode selection module is used for receiving task information by using the control node; according to the overall energy consumption of the cloud computing system, selecting a virtualization mode in task execution, and correspondingly creating a virtual machine or a container;
the task execution module is used for controlling the node to acquire the created virtual machine or container, carrying out environment configuration on the virtual machine or container according to the task script, and executing the task; after the task is executed, a task result file is obtained, stored and returned;
the task information received by the control node comprises tasks to be executed and task configuration information; the task configuration information comprises CPU core number, memory size, hard disk size and an operating system;
before a virtualization mode in task execution is selected according to the overall energy consumption of the cloud computing system, judging whether a task to be executed is applicable to two virtualization modes of a virtual machine and a container according to task configuration information;
selecting a virtualization mode process, and selecting by adopting a virtualization judgment formula; the virtualization judgment formula is as follows:
wherein alpha is cpu Is the CPU correlation coefficient; beta cpu The ratio of CPU power consumption to total power consumption of the task to be executed; η (eta) cpu A ratio of speeds at which the CPU executes commands in the virtual machine and the container in the operating system specified for the task to be performed; alpha mem Is the memory correlation coefficient; beta mem The ratio of the memory power consumption to the total power consumption of the task to be executed; η (eta) mem The ratio of speeds at which commands are executed in the virtual machine and the container are present in the operating system specified for the task to be executed; alpha disk Is the correlation coefficient of the hard disk; beta disk The ratio of the power consumption of the hard disk to the total power consumption of the task to be executed; η (eta) disk A ratio of speeds at which the hard disk executes commands in the virtual machine and the container in the operating system specified for the task to be performed; mu is a fixed parameter; θ is the current power consumption ratio of the cloud computing server;
the control node acquires the created virtual machine or container, carries out environment configuration on the virtual machine or container according to the task script, and executes the task, and the specific process is as follows:
the method comprises the steps that a control node is utilized to obtain script files required by tasks to be executed, and virtual machine or container configuration information is obtained;
the control node carries out environment configuration on the virtual machine or the container according to the task script;
checking the environment configuration of the virtual machine or the container according to the task script, re-executing the environment configuration operation if the error exists, and executing the task if the error exists;
the control node controls the virtual machine or the container to execute the task according to the task script.
6. A task execution device in a hybrid virtualization mode, which is characterized by comprising a memory, a processor and executable instructions stored in the memory and capable of running in the processor; the processor, when executing the executable instructions, implements the method of any of claims 1-4.
CN202110299443.5A 2021-03-22 2021-03-22 Task execution method, system and equipment in hybrid virtualization mode Active CN112965788B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110299443.5A CN112965788B (en) 2021-03-22 2021-03-22 Task execution method, system and equipment in hybrid virtualization mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110299443.5A CN112965788B (en) 2021-03-22 2021-03-22 Task execution method, system and equipment in hybrid virtualization mode

Publications (2)

Publication Number Publication Date
CN112965788A CN112965788A (en) 2021-06-15
CN112965788B true CN112965788B (en) 2023-12-22

Family

ID=76277833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110299443.5A Active CN112965788B (en) 2021-03-22 2021-03-22 Task execution method, system and equipment in hybrid virtualization mode

Country Status (1)

Country Link
CN (1) CN112965788B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326102B (en) * 2021-08-02 2021-12-10 中电长城网际安全技术研究院(北京)有限公司 Large-scale virtual machine creating method and device, computer equipment and readable medium
CN114003346A (en) * 2021-11-12 2022-02-01 深圳前海微众银行股份有限公司 Task processing method, device, storage medium and program product

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185928A (en) * 2011-06-01 2011-09-14 广州杰赛科技股份有限公司 Method for creating virtual machine in cloud computing system and cloud computing system
CN103034527A (en) * 2013-01-09 2013-04-10 上海交通大学 Hybrid virtualization cloud computing resource optimal control method and system
CN104657215A (en) * 2013-11-19 2015-05-27 南京鼎盟科技有限公司 Virtualization energy-saving system in Cloud computing
CN105653372A (en) * 2015-12-30 2016-06-08 中电科华云信息技术有限公司 Cloud platform-based method for realizing multi-virtualization hybrid management and scheduling
RU2665246C1 (en) * 2017-11-09 2018-08-28 Российская Федерация, от имени которой выступает Государственная корпорация по космической деятельности "РОСКОСМОС" Hardware computing system of virtualization and resource management in the cloud computing environment
CN109634722A (en) * 2018-12-18 2019-04-16 中电科华云信息技术有限公司 Resource dynamic dispatching method and system are mixed under isomery cloud computing environment
CN109697105A (en) * 2018-12-11 2019-04-30 广东石油化工学院 A kind of container cloud environment physical machine selection method and its system, virtual resource configuration method and moving method
CN109885377A (en) * 2018-11-23 2019-06-14 ***股份有限公司 The method of unified resource scheduling coordinator and its creation virtual machine and/or container, unified resource dispatch system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9575797B2 (en) * 2015-03-20 2017-02-21 International Business Machines Corporation Virtual machine migration between hypervisor virtual machines and containers
EP3304295B1 (en) * 2015-06-05 2024-05-29 Nutanix, Inc. Architecture for managing i/o and storage for a virtualization environment using executable containers and virtual machines
US10050939B2 (en) * 2015-12-15 2018-08-14 Vmware, Inc. Techniques for communication in hybrid cloud system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185928A (en) * 2011-06-01 2011-09-14 广州杰赛科技股份有限公司 Method for creating virtual machine in cloud computing system and cloud computing system
CN103034527A (en) * 2013-01-09 2013-04-10 上海交通大学 Hybrid virtualization cloud computing resource optimal control method and system
CN104657215A (en) * 2013-11-19 2015-05-27 南京鼎盟科技有限公司 Virtualization energy-saving system in Cloud computing
CN105653372A (en) * 2015-12-30 2016-06-08 中电科华云信息技术有限公司 Cloud platform-based method for realizing multi-virtualization hybrid management and scheduling
RU2665246C1 (en) * 2017-11-09 2018-08-28 Российская Федерация, от имени которой выступает Государственная корпорация по космической деятельности "РОСКОСМОС" Hardware computing system of virtualization and resource management in the cloud computing environment
CN109885377A (en) * 2018-11-23 2019-06-14 ***股份有限公司 The method of unified resource scheduling coordinator and its creation virtual machine and/or container, unified resource dispatch system
CN109697105A (en) * 2018-12-11 2019-04-30 广东石油化工学院 A kind of container cloud environment physical machine selection method and its system, virtual resource configuration method and moving method
CN109634722A (en) * 2018-12-18 2019-04-16 中电科华云信息技术有限公司 Resource dynamic dispatching method and system are mixed under isomery cloud computing environment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于容器技术的云计算资源合理调度方法研究;邵海军;;现代电子技术(22) *
服务器虚拟化关键技术探析;唐彦;肖亮;;数字通信(03) *

Also Published As

Publication number Publication date
CN112965788A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
US11327814B2 (en) Semaphores for serverless computing
KR102506605B1 (en) Rack-level scheduling for reducing the long tail latency using high performance ssds
US9413683B2 (en) Managing resources in a distributed system using dynamic clusters
CN113377540A (en) Cluster resource scheduling method and device, electronic equipment and storage medium
US20110307899A1 (en) Computing cluster performance simulation using a genetic algorithm solution
US11029989B2 (en) Distributed notebook kernels in a containerized computing environment
CN112965788B (en) Task execution method, system and equipment in hybrid virtualization mode
Ran et al. SLAs-aware online task scheduling based on deep reinforcement learning method in cloud environment
US10904167B2 (en) Incoming packet processing for a computer system
US11042640B2 (en) Safe-operation-constrained reinforcement-learning-based application manager
US11941496B2 (en) Providing predictions based on a prediction accuracy model using machine learning
EP4113298A1 (en) Task scheduling method, computing device and storage medium
Liu et al. K‐PSO: An improved PSO‐based container scheduling algorithm for big data applications
US11941528B2 (en) Neural network training in a distributed system
US8429218B2 (en) Process restart on a compute node
Singh et al. Efficient resource management technique for performance improvement in cloud computing
CN111459668A (en) Lightweight resource virtualization method and device for server
Al-Masri et al. Enhancing Resource Provisioning Across Edge-based Environments
US20240045711A1 (en) Preempting a quantum program in a quantum computing device
Brahmam et al. An investigation of consolidating virtual servers and data centers based on energy consumptions using various algorithms
US20240062069A1 (en) Intelligent workload routing for microservices
US20210406689A1 (en) Random Action Replay for Reinforcement Learning
Fariz et al. Improving MapReduce process by mobile agents
US11343134B1 (en) System and method for mitigating analytics loads between hardware devices
WO2023159652A1 (en) Ai system, memory access control method, and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant