CN112965788A - 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
CN112965788A
CN112965788A CN202110299443.5A CN202110299443A CN112965788A CN 112965788 A CN112965788 A CN 112965788A CN 202110299443 A CN202110299443 A CN 202110299443A CN 112965788 A CN112965788 A CN 112965788A
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.)
Granted
Application number
CN202110299443.5A
Other languages
Chinese (zh)
Other versions
CN112965788B (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

Images

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

Abstract

The invention provides a task execution method, a system and equipment in a hybrid virtualization mode, which comprises the steps of receiving task information by using 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, performs environment configuration on the virtual machine or container according to the task script, and executes the task; after the task is executed, acquiring a task result file, storing and returning; according to the overall energy consumption of the cloud computing system, a virtualization mode of a cloud computing process in task execution is selected, and tasks in the cloud computing system are intelligently selected by a virtual machine or a container; the virtual machine is used when the overall energy consumption of the cloud computing is low, and the container is used when the overall energy consumption of the cloud computing is high, so that balance between the energy consumption and the safety of the cloud computing system is realized, the overall energy consumption of the cloud computing system is reduced, the overall 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 task execution method, system and device in a hybrid virtualization mode.
Background
Cloud computing can be roughly divided into three types in terms of functions, including infrastructure as a service (IaaS), platform service (PaaS) and software service (SaaS); specifically, IaaS provides infrastructure services that provide individuals or businesses with virtualized computing resources such as virtual machines, storage, networks, and operating systems; PaaS provides platform service, which provides a required development environment for developers; SaaS provides software services that host applications and open access rights for applications.
Task execution is regarded as an important function of the 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, the user does not need to purchase required equipment for one-time task execution, and unnecessary cost is greatly reduced; the cloud computing system uses a virtualization technology to integrate and centrally manage server resources and allocate required computing resources such as a CPU, a memory, network resources and the like for executing tasks. The current virtualization mode of a computing system mainly comprises a virtual machine and a container; the virtual machine uses an independent operating system, is an abstraction of a physical layer and is provided with a virtualized CPU, a memory, an IO device and the like; the container is an abstraction of an application layer and directly uses a CPU, a memory, an IO device and the like of a physical machine; thus, the virtual machine is more secure with respect to the container, and the container is more efficient with respect to the virtual machine.
At present, for task execution, most of the existing cloud computing systems focus attention on task scheduling, i.e., various purposes such as realizing load balancing of servers, reducing energy consumption of servers and accelerating computing speed of tasks by using a scheduling algorithm; one of the single uses of the virtualization modes is to select a virtual machine or a container to complete the execution of the task; the virtual machine virtualization mode is singly used, so that the overall energy consumption of the cloud computing system is high; and the cloud computing system has lower overall security by singly using the container virtualization mode.
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, and aims to solve the technical problem that the overall energy consumption of a cloud computing system is higher or the overall safety is lower due to the fact that a single virtualization mode is adopted in the existing task execution process.
In order to achieve the purpose, the invention adopts the technical scheme that:
the invention provides a task execution method in a hybrid virtualization mode, which comprises the following steps:
receiving task information by using a control node;
selecting a virtualization mode in task execution according to the overall energy consumption of the cloud computing system, and correspondingly creating a virtual machine or a container;
the control node acquires the created virtual machine or container, performs 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, storing and returning.
Further, the task information received by the control node includes a task to be executed and task configuration information; the task configuration information includes the number of CPU cores, the size of the memory, the size of the hard disk and the operating system.
Further, before a virtualization mode in task execution is selected according to the overall energy consumption of the cloud computing system, whether the task to be executed is suitable for two virtualization modes, namely a virtual machine and a container, is judged according to task configuration information.
Further, a virtualization mode process is selected, and a virtualization judgment formula is adopted for selection; wherein, the virtualization judging formula is as follows:
Figure BDA0002985860610000021
wherein alpha iscpuIs the CPU correlation coefficient; beta is acpuIs the ratio of the CPU power consumption of the task to be executed to the total power consumption; etacpuThe ratio of the speed of executing commands in the virtual machine and the container by the CPU in the operating system specified for the task to be executed; alpha is alphamemIs a memory correlation coefficient; beta is amemThe ratio of the memory power consumption of the task to be executed to the total power consumption; etamemThe ratio of the speed at which commands are executed in the virtual machine and the container within the operating system specified for the task to be executed; alpha is alphadiskThe hard disk correlation coefficient; beta is adiskThe ratio of the hard disk power consumption of the task to be executed to the total power consumption; etadiskThe ratio of the speed of executing commands in the virtual machine and the container for the hard disk in the operating system specified by the task to be executed; mu is a fixed parameter; and theta is the current power consumption ratio of the cloud computing server.
Further, the virtual machine creation process is specifically as follows:
selecting a computing node according to a virtual machine scheduling algorithm by using a control node; and pulling the virtual machine image from the storage node through the computing node to create the virtual machine, and informing the control node of successful creation of the virtual machine by the computing node.
Further, the container creation process is as follows:
rotating the computing node according to a container scheduling algorithm by using the control node; the computing node pulls a container mirror image from the storage node to create a container; and the computing node informs the control node that the container is successfully created.
Further, the control node acquires the created virtual machine or container, performs environment configuration on the virtual machine or container according to the task script, and executes the task, and the specific process is as follows:
acquiring a script file required by a task to be executed by using a control node, and acquiring configuration information of a virtual machine or a container;
the control node performs 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, if an error exists, re-executing the environment configuration operation, otherwise, executing the task;
and the control node controls the virtual machine or the container to execute the task according to the task script.
Further, the script file comprises the environment configuration and execution steps of the task to be executed; the control node acquires configuration information of a virtual machine or a container, wherein the configuration information comprises a user name, a password and an ip address; and the control node establishes connection with the virtual machine or the container in an ssh mode.
The invention also provides a task execution system with a 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; selecting a virtualization mode in task execution according to the overall energy consumption of the cloud computing system, 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, performing 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, storing and returning.
The invention also provides a task execution device 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 when the processor executes the executable instruction, the task execution method of the hybrid virtualization mode is realized.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a task execution method, a system and equipment in 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 a virtual machine or a container can be intelligently selected to execute tasks in the cloud computing system; the virtual machine is used when the overall energy consumption of the cloud computing is low, and the container is used when the overall energy consumption of the cloud computing is high, so that balance between the energy consumption and the safety of the cloud computing system is realized, the overall energy consumption of the cloud computing system is reduced, the overall safety of the system is improved, and the task operation efficiency is improved.
Compared with the task execution in a single virtual machine virtualization mode, the task execution method in the hybrid virtualization mode reduces the overall energy consumption of the cloud computing system; because the containers are fewer than the abstract layers of the virtual machine, the tasks running on the containers directly use the resources of the physical machine, and the virtual machine virtualizes the hardware resources, the containers have higher efficiency than the virtual machine on the reading and writing of a CPU, a memory and an IO, and correspondingly, the containers have lower energy consumption than the virtual machine; therefore, the hybrid use of the virtual machines and the containers reduces the overall energy consumption of the cloud computing system; compared with the task execution in a single container virtualization mode, the overall safety of the cloud computing system is improved; because the whole operating system is abstracted out by the virtual machine, the resource isolation is better than that of a container, an application program in the virtual machine has independent resources, a vulnerability of the application program can only affect one virtual machine, and other virtual machines and physical machines can not be affected basically; the application programs in the container share the physical machine resources, and the probability that the vulnerability of the application programs affects the physical machine and other application programs is definitely greater than that of the virtual machine; thus, the hybrid use of virtual machines and containers improves the overall security of the cloud computing system.
Drawings
FIG. 1 is a single cloud computing cluster architecture diagram of the present invention;
FIG. 2 is a general flow chart of the present invention;
FIG. 3 is a select virtualization approach sub-flow diagram of the present invention;
FIG. 4 is a task execution sub-flow diagram of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects of the present invention more apparent, the following embodiments further describe the present invention in detail. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a task execution method in 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 virtualization mode in task execution is selected by a user independently or intelligently 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 a task to be executed and task configuration information; the task configuration information comprises the number of CPU cores, the size of a memory, the size of a hard disk and an operating system;
according to the invention, before the virtualization mode in task execution is intelligently selected according to the overall energy consumption of the cloud computing system, whether the task to be executed is suitable for 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 virtual machine virtualization, and executing virtual machine creation.
And when the task to be executed is suitable for two virtualization methods, namely a virtual machine and a container, and the virtualization mode is judged to be intelligently selected, executing the virtualization mode of the virtual machine or the container 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; wherein, the virtualization judging formula is as follows:
Figure BDA0002985860610000051
wherein alpha iscpuIs the CPU correlation coefficient; beta is acpuIs the ratio of the CPU power consumption of the task to be executed to the total power consumption; etacpuThe ratio of the speed of executing commands in the virtual machine and the container by the CPU in the operating system specified for the task to be executed; alpha is alphamemIs a memory correlation coefficient; beta is amemThe ratio of the memory power consumption of the task to be executed to the total power consumption; etamemThe ratio of the speed at which commands are executed in the virtual machine and the container within the operating system specified for the task to be executed; alpha is alphadiskThe hard disk correlation coefficient; beta is adiskThe ratio of the hard disk power consumption of the task to be executed to the total power consumption; etadiskThe ratio of the speed of executing commands in the virtual machine and the container for the hard disk in the operating system specified by the task to be executed; mu is a fixed parameter; theta is cloud computingCurrent power consumption ratio of the 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 a control node; and pulling the virtual machine image from the storage node through the computing node to create the virtual machine, and informing the control node of successful creation of the virtual machine by the computing node.
Step 3, creating a container
The container creation process is as follows:
rotating the computing node according to a container scheduling algorithm by using the control node; the computing node pulls a container mirror image from the storage node to create a container; and the computing node informs the control node that the container is successfully created.
Step 4, the control node acquires the created virtual machine or container, performs environment configuration on the virtual machine or container according to the task script, and executes the task; the specific process is as follows:
acquiring a script file required by a task to be executed by using a control node, and acquiring configuration information of a virtual machine or a container; the script file comprises the steps of environment configuration and execution of a task to be executed; the control node acquires configuration information of a virtual machine or a container, wherein the configuration information comprises a user name, a password and an ip address; and the control node establishes connection with the virtual machine or the container in an ssh mode.
The control node performs 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, if an error exists, re-executing the environment configuration operation, otherwise, executing the task;
and the control node controls the virtual machine or the container to execute the task according to the task script.
And 5, after the task is executed, acquiring a task result file, storing and returning.
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 because the task has already been performed to completion.
The invention also provides a task execution system with a 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; selecting a virtualization mode in task execution according to the overall energy consumption of the cloud computing system, 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, performing 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, storing and returning.
The invention also provides a task execution device in a hybrid 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; selecting a virtualization mode in task execution according to the overall energy consumption of the cloud computing system, and correspondingly creating a virtual machine or a container; the control node acquires the created virtual machine or container, performs 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, storing and returning.
Or, when the processor executes the computer program, the processor realizes the functions of each module in the task execution system in the hybrid virtualization manner; for example: the virtualization mode selection module is used for receiving task information by using the control node; selecting a virtualization mode in task execution according to the overall energy consumption of the cloud computing system, 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, performing 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, storing and returning.
The computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the 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 hybrid virtualization type task execution device may include, but is not limited to, a processor and a memory.
The processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the task execution system in the hybrid virtualization manner by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory.
The integrated module/unit of the task execution system in the hybrid virtualization mode can be stored in a computer readable storage medium if the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product. Based on such understanding, all or part of the processes in the method may be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the task execution method in the hybrid virtualization manner.
Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer memory, Read-only memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc.
It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
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 the virtual machines and containers, the storage node stores mirror images of the virtual machines and the containers, and the computing node is responsible for the life cycles of the virtual machines and the containers.
As shown in fig. 2 to 4, the embodiment provides a task execution method in a hybrid virtualization manner, which integrates advantages and disadvantages of virtual machine virtualization and container virtualization, intelligently selects a virtual machine or container virtualization manner, reduces overall energy consumption of a cloud computing system, and effectively improves overall security of the cloud computing system; the method specifically comprises the following steps:
step 1, selection and creation of 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 includes the number of CPU cores, the size of a memory, the size of a hard disk and an operating system.
Step 12, judging a virtualization mode in a task to be executed by using a control node; if the virtual machine virtualization is adopted, executing the step 15; if it is container virtualization, go to step 16; if the virtualization mode is intelligently selected, step 13 is executed.
Step 13, when the intelligent selection virtualization mode is adopted, firstly, the control node is utilized to judge whether the task is suitable for two virtualization modes; if not, go to step 15; otherwise step 14 is performed.
Because the container is a resource that directly uses the physical machine, the operating system kernel of the container is consistent with the operating system kernel of the physical machine, which limits the images that the container can use. For example, when the servers all use Linux kernels, the operating system of the container can only select the Linux kernels, namely the Linux operating system; when the task needs no Linux, the server directly selects a 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 container virtualization mode and executes step 14.
Step 14, intelligently selecting a virtual machine or container virtualization mode by using 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 relative to the container, and the container is lower in energy consumption relative to the virtual machine; therefore, the virtual machine virtualization method is easier to select and use when the overall power consumption of the server is low, and the container virtualization method is easier to select and use 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 overall highest energy consumption of the cloud computing system is reduced, and the overall safety of the cloud computing is effectively improved.
Specifically, the method comprises the following steps:
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 a virtual machine to a container;
step 14b, obtaining the number of CPU cores and the size of the memory 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 relevant coefficients of the CPU, the memory and the hard disk according to the type of the task to be executed;
step 14d, obtaining the overall current power consumption of the 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 the virtualization mode, and if the virtualization mode is virtual machine virtualization, executing the step 15; if it is container virtualization, go to step 16; wherein, the virtualization judging formula is as follows:
Figure BDA0002985860610000101
wherein alpha iscpuIs the CPU correlation coefficient; beta is acpuIs the ratio of the CPU power consumption of the task to be executed to the total power consumption; etacpuThe ratio of the speed of executing commands in the virtual machine and the container by the CPU in the operating system specified for the task to be executed; alpha is alphamemIs a memory correlation coefficient; beta is amemThe ratio of the memory power consumption of the task to be executed to the total power consumption; etamemThe ratio of the speed at which commands are executed in the virtual machine and the container within the operating system specified for the task to be executed; alpha is alphadiskThe hard disk correlation coefficient; beta is adiskThe ratio of the hard disk power consumption of the task to be executed to the total power consumption; etadiskThe ratio of the speed of executing commands in the virtual machine and the container for the hard disk in the operating system specified by the task to be executed; mu is a fixed parameter; and theta is the current power consumption ratio of the cloud computing server.
In this embodiment, ηcpu、ηmemAnd etadiskThe efficiency ratio of the representative container and the virtual machine is determined according to an operating system required by an actual task; because the container is less relative to the virtual machine abstraction layer, the task running on the container is to directly use the resources of the physical machine; and the virtual machine virtualizes hardware resources, so that the efficiency of the container on CPU, memory and IO read-write is higher than that of the virtual machine, and the task calculation consumes longer time when the task calculation is carried out.
βcpu、βmemAnd betadiskRespectively representing the power consumption proportions of the CPU, the memory and the hard disk; approximating the relation of CPU power consumption to a linear function related to the utilization rate of the CPU, approximating the relation of memory power consumption to a quadratic function related to the memory occupancy rate, and approximating the power consumption of the hard disk to a linear function related to the IO request rate; according to the number of CPU cores and the size of the memory required by the task, the maximum possible power consumption of the CPU, the memory and the hard disk can be calculated, and further the power consumption proportion of the CPU, the memory and the hard disk can be obtained.
αcpu、αmemAnd alphadiskRespectively representing the correlation coefficients of the CPU, the memory and the hard disk; when the CPU core number and the memory size are the same, the power consumption of the CPU, the memory and the hard disk is definitely different when the task is executed under the condition of the same CPU and the same memory according to different task types; the task types are divided into a calculation intensive type, a memory intensive type and an IO intensive type, and different task types have different correlation coefficients of a CPU, a memory and a hard disk.
Mu represents the value of the first part of formula obtained when the operating system is the operating system of the physical machine, namely a fixed value, according to the condition that the power consumption of the CPU, the memory and the hard disk is maximum, the correlation coefficients of the CPU, the memory and the hard disk are all 1. Theta 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 current power consumption ratio of the cloud computing can be achieved by dividing the current total power consumption by the maximum power consumption of the cloud computing.
The core idea of the embodiment is to design and realize a formula for intelligently selecting a virtual machine or container virtualization mode; the formula can select a virtualization mode according to the information submitted by the tasks; the formula is divided into a left part and a right part, the first part is acpuβcpuηcpumemβmemηmemdiskβdiskηdiskThe second part is
Figure BDA0002985860610000111
When the first part is greater than the second part, a container is selected, step 16 is performed, otherwise a virtual machine is selected, step 15 is performed.
Step 15, creating a virtual machine, specifically as follows:
step 15a, the control node selects a computing node according to a virtual machine scheduling algorithm; the scheduling algorithm can be the own scheduling algorithm of the cloud computing system, and can also be a self-defined scheduling algorithm;
step 15b, the computing node pulls the virtual machine mirror image from the storage node to create a virtual machine;
and 15c, the computing node informs the control node that the virtual machine is successfully established, and the step 21 is skipped.
Step 16, creating a container, specifically as follows:
step 16a, the control node selects a calculation node according to a container scheduling algorithm; the scheduling algorithm can be the own scheduling algorithm of the cloud computing system, and can also be a self-defined scheduling algorithm;
step 16b, the computing node pulls the container mirror image from the storage node to create a container;
and step 16c, the computing node informs the control node that the container is successfully created, and the step 21 is skipped.
Step 2, executing the task, specifically comprising the following steps:
step 21, the control node acquires a script file required by the task; wherein, the script file comprises the environment configuration and execution steps of the task;
step 22, the control node acquires configuration information of the virtual machine or the container and establishes connection; the control node acquires configuration information of the virtual machine or the container, wherein the configuration information comprises a user name, a password and an ip address; and the control node establishes connection with the virtual machine or the container in an ssh mode.
Step 23, the control node performs 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 an error exists, 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 execution step is a self-defined rule;
step 26, after the task is executed, 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 because the task has already been performed to completion.
Compared with the task execution in a single virtual machine virtualization mode, the task execution method and the task execution system in a hybrid virtualization mode effectively reduce the overall energy consumption of a cloud computing system; because the containers are fewer than the abstract layers of the virtual machine, the tasks running on the containers directly use the resources of the physical machine, and the virtual machine virtualizes the hardware resources, the containers have higher efficiency than the virtual machine on the reading and writing of a CPU, a memory and an IO, and correspondingly, the containers have lower energy consumption than the virtual machine. Therefore, the hybrid use of the virtual machines and the containers reduces the overall energy consumption of the cloud computing system; compared with the task execution in a single container virtualization mode, the method and the system improve the overall safety of the cloud computing system. Because the whole operating system is abstracted out by the virtual machine, the resource isolation is better than that of a container, an application program in the virtual machine has independent resources, a vulnerability of the application program can only affect one virtual machine, and other virtual machines and physical machines can not be affected basically; the application programs in the container share the physical machine resources, and the probability that the vulnerability of the application programs affects the physical machine and other application programs is definitely greater than that of the virtual machine; therefore, the hybrid use of virtual machines and containers improves the security of the cloud computing as a whole.
The invention integrates the advantages and the disadvantages of two virtualization modes of the virtual machine and the container, uses the virtual machine when the overall energy consumption of the cloud computing is low, uses the container when the overall energy consumption of the cloud computing is high, balances the energy consumption and the safety of the cloud computing system, reduces the overall energy consumption of the cloud computing system, and improves the overall safety of the system.
The above-described embodiment is only one of the embodiments that can implement the technical solution of the present invention, and the scope of the present invention is not limited by the embodiment, but includes any variations, substitutions and other embodiments that can be easily conceived by those skilled in the art within the technical scope of the present invention disclosed.

Claims (10)

1. A task execution method in a hybrid virtualization mode is characterized by comprising the following steps:
receiving task information by using a control node;
selecting a virtualization mode in task execution according to the overall energy consumption of the cloud computing system, and correspondingly creating a virtual machine or a container;
the control node acquires the created virtual machine or container, performs 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, storing and returning.
2. The task execution method of a hybrid virtualization manner according to claim 1, wherein the task information received by the control node includes a task to be executed and task configuration information; the task configuration information includes the number of CPU cores, the size of the memory, the size of the hard disk and the operating system.
3. The task execution method of claim 2, wherein before the virtualization mode in task execution is selected according to the overall energy consumption of the cloud computing system, whether the to-be-executed task is suitable for both the virtual machine virtualization mode and the container virtualization mode is determined according to the task configuration information.
4. The task execution method of a hybrid virtualization mode according to claim 1, wherein the virtualization mode process is selected by using a virtualization judgment formula; wherein, the virtualization judging formula is as follows:
Figure FDA0002985860600000011
wherein alpha iscpuIs the CPU correlation coefficient; beta is acpuIs the ratio of the CPU power consumption of the task to be executed to the total power consumption; etacpuThe ratio of the speed of executing commands in the virtual machine and the container by the CPU in the operating system specified for the task to be executed; alpha is alphamemIs a memory correlation coefficient; beta is amemThe ratio of the memory power consumption of the task to be executed to the total power consumption; etamemThe ratio of the speed at which commands are executed in the virtual machine and the container within the operating system specified for the task to be executed; alpha is alphadiskThe hard disk correlation coefficient; beta is adiskThe ratio of the hard disk power consumption of the task to be executed to the total power consumption; etadiskThe ratio of the speed of executing commands in the virtual machine and the container for the hard disk in the operating system specified by the task to be executed; mu is a fixed parameter; and theta is the current power consumption ratio of the cloud computing server.
5. The task execution method of a hybrid virtualization manner according to claim 1, wherein a virtual machine creation process is specifically as follows:
selecting a computing node according to a virtual machine scheduling algorithm by using a control node; and pulling the virtual machine image from the storage node through the computing node to create the virtual machine, and informing the control node of successful creation of the virtual machine by the computing node.
6. The task execution method of a hybrid virtualization 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 a container mirror image from the storage node to create a container; and the computing node informs the control node that the container is successfully created.
7. The task execution method of the hybrid virtualization manner according to claim 1, wherein the control node acquires the created virtual machine or container, performs environment configuration on the virtual machine or container according to the task script, and executes the task, and the specific process is as follows:
acquiring a script file required by a task to be executed by using a control node, and acquiring configuration information of a virtual machine or a container;
the control node performs 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, if an error exists, re-executing the environment configuration operation, otherwise, executing the task;
and the control node controls the virtual machine or the container to execute the task according to the task script.
8. The task execution method of a hybrid virtualization manner according to claim 7, wherein the script file includes an environment configuration and execution step of a task to be executed; the control node acquires configuration information of a virtual machine or a container, wherein the configuration information comprises a user name, a password and an ip address; and the control node establishes connection with the virtual machine or the container in an ssh mode.
9. A task execution system with a 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; selecting a virtualization mode in task execution according to the overall energy consumption of the cloud computing system, 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, performing 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, storing and returning.
10. A hybrid virtualization type task execution device 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-8.
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 true CN112965788A (en) 2021-06-15
CN112965788B 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)

Cited By (2)

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

Citations (11)

* 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
US20160274928A1 (en) * 2015-03-20 2016-09-22 International Business Machines Corporation Virtual machine migration between hypervisor virtual machines and containers
US20160359955A1 (en) * 2015-06-05 2016-12-08 Nutanix, Inc. Architecture for managing i/o and storage for a virtualization environment using executable containers and virtual machines
US20170171157A1 (en) * 2015-12-15 2017-06-15 Vmware, Inc. Techniques for communication in hybrid cloud system
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

Patent Citations (11)

* 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
US20160274928A1 (en) * 2015-03-20 2016-09-22 International Business Machines Corporation Virtual machine migration between hypervisor virtual machines and containers
US20160359955A1 (en) * 2015-06-05 2016-12-08 Nutanix, Inc. Architecture for managing i/o and storage for a virtualization environment using executable containers and virtual machines
US20170171157A1 (en) * 2015-12-15 2017-06-15 Vmware, Inc. Techniques for communication in hybrid cloud system
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
唐彦;肖亮;: "服务器虚拟化关键技术探析", 数字通信, no. 03 *
邵海军;: "基于容器技术的云计算资源合理调度方法研究", 现代电子技术, no. 22 *

Cited By (2)

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

Also Published As

Publication number Publication date
CN112965788B (en) 2023-12-22

Similar Documents

Publication Publication Date Title
US11204793B2 (en) Determining an optimal computing environment for running an image
US10896064B2 (en) Coordinated, topology-aware CPU-GPU-memory scheduling for containerized workloads
US9785472B2 (en) Computing cluster performance simulation using a genetic algorithm solution
US9413683B2 (en) Managing resources in a distributed system using dynamic clusters
US10241841B2 (en) Controlling virtual machine density and placement distribution in a converged infrastructure resource pool
US8418177B2 (en) Virtual machine and/or multi-level scheduling support on systems with asymmetric processor cores
US8793377B2 (en) Identifying optimal virtual machine images in a networked computing environment
US9250944B2 (en) Selection of virtual machines from pools of pre-provisioned virtual machines in a networked computing environment
US9317321B2 (en) Determining virtual machine image pattern distributions in a networked computing environment
US10109030B1 (en) Queue-based GPU virtualization and management system
US9875124B2 (en) Data assignment and data scheduling for physical machine in a virtual machine environment
US9317337B2 (en) Utilizing software component metadata to provision virtual machines in a networked computing environment
US9367359B2 (en) Optimized resource management for map/reduce computing
US11029989B2 (en) Distributed notebook kernels in a containerized computing environment
US20120102572A1 (en) Node controller for an endpoint in a cloud computing environment
US9229777B2 (en) Dynamically relocating workloads in a networked computing environment
US10802753B2 (en) Distributed compute array in a storage system
US9858110B2 (en) Virtual credential adapter for use with virtual machines
CN112965788B (en) Task execution method, system and equipment in hybrid virtualization mode
CN103118073A (en) Virtual machine data persistence storage system and method in cloud environment
US9438466B1 (en) Migrating virtual machines between oversubscribed and undersubscribed compute devices
CN114900699A (en) Video coding and decoding card virtualization method and device, storage medium and terminal
US11481255B2 (en) Management of memory pages for a set of non-consecutive work elements in work queue designated by a sliding window for execution on a coherent accelerator
CN114610485A (en) Resource processing system and method
US20220108030A1 (en) Software defined data security layer

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