CN115309502A - Container scheduling method and device - Google Patents

Container scheduling method and device Download PDF

Info

Publication number
CN115309502A
CN115309502A CN202210890099.1A CN202210890099A CN115309502A CN 115309502 A CN115309502 A CN 115309502A CN 202210890099 A CN202210890099 A CN 202210890099A CN 115309502 A CN115309502 A CN 115309502A
Authority
CN
China
Prior art keywords
container
migrated
physical host
determining
containers
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.)
Pending
Application number
CN202210890099.1A
Other languages
Chinese (zh)
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.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud Technology Co Ltd
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 Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202210890099.1A priority Critical patent/CN115309502A/en
Publication of CN115309502A publication Critical patent/CN115309502A/en
Priority to PCT/CN2022/141481 priority patent/WO2024021475A1/en
Pending legal-status Critical Current

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
    • 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
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • 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/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • 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/4557Distribution of virtual machine instances; Migration and load balancing
    • 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 application provides a container scheduling method and a device, wherein the method comprises the following steps: determining a load index of a first physical host, and determining that the first physical host is overloaded according to the load index; determining X containers to be migrated from all containers included in the first physical host, wherein X is an integer greater than 0; and migrating at least one container to be migrated in the X containers to be migrated and the container copy of the at least one container to be migrated to a second physical host. By scheduling the containers on the overload host, based on the load prediction method, the scheduling of the high-load containers can be realized accurately, and meanwhile, the container copies of the containers to be migrated are migrated, so that the energy consumption of the physical machine can be effectively reduced.

Description

Container scheduling method and device
Technical Field
The embodiment of the invention relates to the technical field of computing, in particular to a container scheduling method and device.
Background
Container technology has been developed and used by most enterprises, and container technology has become an important participant in the field of virtualization. However, when there are many containers on the cloud computing server, a problem of high energy consumption is generated, and how to reduce the energy consumption of the physical machine is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a container scheduling method and device, which are used for reducing the energy consumption of a physical machine.
In a first aspect, an embodiment of the present invention provides a container scheduling method, including:
determining a load index of the first physical host, and determining that the first physical host is overloaded according to the load index;
determining X containers to be migrated from all containers included in a first physical host, wherein X is an integer greater than 0;
and migrating at least one container to be migrated in the X containers to be migrated and the container copy of the at least one container to be migrated to the second physical host.
Among the above-mentioned technical scheme, through schedule the container on the overload host computer, can be comparatively accurate realize the dispatch of high load container, treat the container duplicate of migration container simultaneously and migrate, further effectively reduce the energy consumption of physical machine.
In one possible implementation, the load index of the first physical host includes:
a central processing unit utilization of a first physical host; the memory utilization of the first physical host.
One possible implementation manner, determining a load index of a first physical host, and determining that the first physical host is overloaded according to the load index, includes:
and if the central processing unit utilization rate of the first physical host is greater than or equal to a first threshold value, or the memory utilization rate of the first physical host is greater than or equal to a second threshold value, determining that the first physical host is overloaded.
One possible implementation manner, determining X containers to be migrated from all containers included in the first physical host, includes:
for a container with no container copy in the first physical host, if the load correlation between the container and the first physical host is smaller than a preset threshold value, determining the container as a container to be migrated; for a container with a container copy in the first physical host, determining that the container is a container to be contracted or expanded, and determining the container as a container to be migrated.
In a possible implementation manner, for a container to be scaled and a container to be scaled, the method further includes:
for a container to be contracted, determining the first copy number of the container after the container copy of the container is contracted, and determining the container copies with the first copy number after the container is contracted as the container to be migrated; and for the container to be expanded, determining the second copy number of the expanded container copies of the container, and determining the container copies with the second copy number as the container to be migrated.
By the method, the container with the load similarity smaller than the preset threshold value with the first physical host is determined as the container to be migrated, so that the influence on the physical host is reduced, and meanwhile, the container and the corresponding container copy are determined as the container to be migrated, so that the operability of the system is considered.
One possible implementation manner of migrating at least one container to be migrated and a container copy of at least one container to be migrated from among X containers to be migrated to a second physical host includes:
and for the X containers to be migrated, migrating at least one container to be migrated with the largest load and a container copy of at least one container to be migrated in the X containers to be migrated to a second physical host according to the load of each container to be migrated from large to small.
By the method, the maximum container load placing strategy is adopted, the containers to be migrated are placed from large to small, the energy consumption of the physical host can be reduced as soon as possible, and the efficiency of reducing the energy consumption is improved.
In a second aspect, an embodiment of the present invention provides a container scheduling apparatus, including:
the acquisition unit is used for determining a load index of the first physical host and determining that the first physical host is overloaded according to the load index;
the system comprises a processing unit and a migration unit, wherein the processing unit is used for determining X containers to be migrated from all containers included in a first physical host, and X is an integer larger than 0; and migrating at least one container to be migrated in the X containers to be migrated and the container copy of the at least one container to be migrated to the second physical host.
In a possible implementation manner, the processing unit is specifically configured to:
for a container with no container copy in the first physical host, if the load correlation between the container and the first physical host is smaller than a preset threshold value, determining the container as a container to be migrated; and for the container with the container copy in the first physical host, determining the container as a container to be contracted or expanded, and determining the container as a container to be migrated.
In a possible implementation manner, the processing unit is specifically configured to:
for a container to be contracted, determining the first copy number of the container after the container copy of the container is contracted, and determining the container copies with the first copy number after the container is contracted as the container to be migrated; and for the container to be expanded, determining the second copy number of the expanded container copies of the container, and determining the container copies with the second copy number as the containers to be migrated.
In one possible implementation, the processing unit is specifically configured to:
and for the X containers to be migrated, migrating at least one container to be migrated with the largest load and a container copy of at least one container to be migrated in the X containers to be migrated to a second physical host according to the load of each container to be migrated from large to small.
In a third aspect, an embodiment of the present invention provides a computer-readable non-volatile storage medium, which includes computer-readable instructions, and when the computer-readable instructions are read and executed by a computer, the computer is caused to execute the container scheduling method.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer instructions are stored, and when the computer instructions are executed by a processor, the method provided in the first aspect is performed.
In a fifth aspect, embodiments of the present invention also provide a computer program product including computer-executable instructions for causing a computer to perform the method as provided in the first aspect.
Through the technical solutions in one or more of the above embodiments of the present invention, the embodiments of the present invention have at least the following technical effects:
in the embodiment provided by the invention, the load prediction is carried out on the container and the physical host, so that the scheduling of the high-load container can be accurately realized. In addition, the embodiment of the invention gives consideration to the operability of the whole system, and simultaneously, the embodiment of the invention integrates the maximum container load strategy, so that the embodiment of the invention can realize energy consumption optimization as soon as possible.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of a network architecture according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a container scheduling method according to an embodiment of the present invention;
fig. 3 is a schematic model diagram of a load prediction method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a container scheduling apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. 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 container technology, also called container virtualization technology or container technology virtualization technology, is a virtual technology for improving resource usage, and can improve work efficiency. Compared with the traditional virtualization technology, the container technology can be deployed anywhere and flexibly migrated, the development efficiency is improved, and the workload of deployment is reduced. Container technology has been developed and used in most enterprises to date, and container technology has become an important participant in the field of virtualization.
Due to the rapid development of the container technology, the cloud computing scale is continuously enlarged, and the problem of high energy consumption is increasingly highlighted. When there are many containers on the cloud computing server, a high energy consumption problem occurs, and energy consumption optimization is required at this time. Therefore, the embodiment of the invention provides a container scheduling method and device, which can realize accurate scheduling of a high-load container, simultaneously give consideration to the operability and container copy processing of the whole system, and reduce energy consumption.
As shown in fig. 1, in a container cloud environment, there are multiple physical hosts, with multiple containers and container copies placed on one physical host. One container provides services for one Application (APP), for example, storage and computing resources are provided, and when the amount of resources required by one APP is large, one APP can be configured with multiple container copies corresponding to one container.
Fig. 2 is a flowchart of a container scheduling method according to an embodiment of the present invention, where the flowchart may be executed by a container scheduling apparatus.
As shown in fig. 2, the process specifically includes:
step 201, determining a load index of the first physical host, and determining that the first physical host is overloaded according to the load index.
In this embodiment of the present invention, the load index of the first physical host may include, but is not limited to: central Processing Unit (CPU) utilization; and (4) utilization rate of the memory. Specifically, how to determine the load index of the first physical host, the embodiment of the present invention is not limited, for example, a detection system may be installed on the physical host, and the main detection indexes are: CPU utilization, memory utilization, disk utilization, network inflow, network outflow, and the like.
In the embodiment of the present invention, how to determine that the first physical host is overloaded according to the load index is not limited.
In one implementation, it is determined that the first physical host is overloaded if the observed first physical host CPU utilization is greater than or equal to a first threshold, and/or the observed first physical host memory utilization is greater than or equal to a second threshold.
In one implementation, a load prediction method based on a mechanism with attention is used to predict a CPU utilization of a first physical host and a memory utilization of the first physical host. Determining that the first physical host is overloaded if the predicted first physical host CPU utilization is greater than or equal to a first threshold and/or the predicted first physical host memory utilization is greater than or equal to a second threshold. The first threshold and the second threshold may be set, for example, both the first threshold and the second threshold are set to 0.7.
Step 202, determining X containers to be migrated from all containers included in the first physical host, where X is an integer greater than 0.
There may be multiple implementations for a container how to determine that the container is a container to be migrated.
In one implementation, for a container for which no container copy exists in the first physical host, if the load dependency of the container on the first physical host is smaller than a preset threshold, the container is determined as a container to be migrated.
When a container without a container copy is selected as a container to be migrated, preferentially selecting a container with a load correlation with a first physical host smaller than a preset threshold as the container to be migrated, wherein the container needs to detect data such as a container CPU utilization rate, a memory utilization rate, a disk utilization rate and the like in real time, and a calculation formula of the load correlation can be expressed as follows:
Figure BDA0003767179400000061
Figure BDA0003767179400000062
Figure BDA0003767179400000063
equation (1) for calculating CPU load dependencies between containers and physical hosts
Figure BDA0003767179400000064
Equation (2) is used to calculate the memory load dependency of a container and a physical host
Figure BDA0003767179400000065
mem represents the memory, and equation (3) is used to calculate the total load dependency of the container and the physical host
Figure BDA0003767179400000066
In the formula (1), the first and second groups of the compound,
Figure BDA0003767179400000067
indicating container c a The history of the CPU utilization of the CPU,
Figure BDA0003767179400000068
indicating container c a The average value of the CPU utilization rates of (c),
Figure BDA0003767179400000069
indicating physical host pm a The history of the CPU utilization of the CPU,
Figure BDA00037671794000000610
indicating physical host pm a Is calculated as the CPU utilization average. In the formula (2), the first and second groups,
Figure BDA00037671794000000611
indicating container c a The history of the memory utilization of the memory,
Figure BDA00037671794000000612
indicating container c a The average value of the memory utilization rates of (c),
Figure BDA00037671794000000613
indicating physical host pm a The history of the memory utilization of (a),
Figure BDA00037671794000000614
indicating physical host pm a Average memory utilization of. Total load dependency of containers with physical hosts
Figure BDA00037671794000000615
The size is between 0 and 2. In this embodiment of the present invention, a preset threshold may be set, for example, the preset threshold is set to 0.55, and when the total load correlation between the container and the physical machine is smaller than the preset threshold, it may be considered that the load correlation between the container and the first physical host is small, and the container may be determined as a container to be migrated.
In another implementation manner, for a container in which a container copy exists in the first physical host, a container to be contracted and a container to be expanded are determined, and the container to be contracted and the container to be expanded are determined as a container to be migrated.
When the container to be shrunk and the container to be expanded are determined to be the container to be migrated, whether a container is the container to be shrunk or the container to be expanded can be determined according to comparison between the CPU utilization rate and the memory utilization rate of the container and the current CPU utilization rate and memory utilization rate.
And performing load prediction on the containers on the first physical host, for example, performing load prediction by using a load prediction model with an attention mechanism, and obtaining two load index prediction values of each container, wherein the two load indexes are the CPU utilization rate and the memory utilization rate of the container. When the predicted CPU utilization rate of the container is greater than the current CPU utilization rate of the container and the predicted memory utilization rate of the container is greater than the current memory utilization rate of the container, namely when the predicted CPU utilization rate of the container is greater than the current memory utilization rate of the container
Figure BDA0003767179400000071
Greater than the current value of CPU utilization
Figure BDA0003767179400000072
And memory utilization prediction value
Figure BDA0003767179400000073
Greater than the current value of the memory utilization rate
Figure BDA0003767179400000074
Then, this container may be determined as the container to be expanded.
When the predicted CPU utilization rate of the container is less than the current CPU utilization rate of the container and the predicted memory utilization rate of the container is less than the current memory utilization rate of the container, namely when the predicted CPU utilization rate of the container is less than the current memory utilization rate of the container
Figure BDA0003767179400000075
Less than the current value of CPU utilization
Figure BDA0003767179400000076
And memory utilization prediction value
Figure BDA0003767179400000077
Less than the current value of memory utilization
Figure BDA0003767179400000078
This container may then be identified as the container to be contracted.
In the embodiment of the invention, the container to be expanded and the container to be contracted can be used as containers to be transferred.
For a container to be subjected to capacity reduction, determining the first copy number of the container after the capacity reduction of the container copies of the container, and determining the container copies with the first copy number after the capacity reduction as the container to be migrated.
When the number of copies of the container to be reduced is reduced, the first number of copies is related to the number of copies expected to be reduced, the first number of copies is rounded down for the number of copies expected to be reduced, and the calculation formulas of the number of copies expected to be reduced can be shown as formula (4), formula (5) and formula (6).
Figure BDA0003767179400000079
Figure BDA00037671794000000710
Figure BDA00037671794000000711
Wherein cpu represents a central processing unit, mem represents a memory, and in formula (4),
Figure BDA0003767179400000081
representing the number of scaled-down expected copies, n, calculated from CPU utilization cd The number of the existing copies is indicated,
Figure BDA0003767179400000082
refers to the CPU utilization existing value of the container copy,
Figure BDA0003767179400000083
refers to the CPU utilization prediction for the container copy. In the formula (5), the first and second groups,
Figure BDA0003767179400000084
representing the number of scaled-down expected copies, n, calculated from memory utilization cd The number of the existing copies is indicated,
Figure BDA0003767179400000085
refers to the existing value of memory utilization of the container copy,
Figure BDA0003767179400000086
refers to the memory utilization prediction value of the container copy. Calculating the number of the reduced volume expected copies by the formula (6)
Figure BDA0003767179400000087
Expected number of copies of shrinkage
Figure BDA0003767179400000088
Get the
Figure BDA0003767179400000089
And
Figure BDA00037671794000000810
small values in between.
And for the container to be expanded, determining the second copy number of the expanded container copies of the container, and determining the container copies with the second copy number as the containers to be migrated.
When capacity expansion is performed on container copies needing capacity expansion, the quantity of the second copies is related to the quantity of capacity expansion expected copies, the quantity of the second copies is rounded up for the quantity of the capacity expansion expected copies, and the calculation formula of the capacity expansion expected copy quantity can be shown as a formula (7), a formula (8) and a formula (9).
Figure BDA00037671794000000811
Figure BDA00037671794000000812
Figure BDA00037671794000000813
Wherein cpu represents a central processing unit, mem represents a memory, and in formula (7),
Figure BDA00037671794000000814
representing the number of expected copies of the expansion calculated from the CPU utilization,
Figure BDA00037671794000000815
CPU utilization prediction, n, for container copies cd The number of the existing copies is indicated,
Figure BDA00037671794000000816
refers to the CPU utilization existing value of the container copy. In the case of the formula (8),
Figure BDA00037671794000000817
indicating utilization by memoryThe expected number of copies of the volume expansion calculated by the rate,
Figure BDA00037671794000000818
means memory utilization prediction value, n, of container copy cd The number of the existing copies is indicated,
Figure BDA00037671794000000819
refers to the existing value of memory utilization of the container copy. Calculating the expected number of expansion copies according to the formula (9)
Figure BDA00037671794000000820
Expanding the expected number of copies
Figure BDA00037671794000000821
Get
Figure BDA00037671794000000822
And
Figure BDA00037671794000000823
large values in between.
Step 203, at least one container to be migrated and at least one container copy of the container to be migrated in the X containers to be migrated are migrated to the second physical host.
Specifically, for X containers to be migrated, a maximum container load placement strategy is adopted, and according to the load of each container to be migrated, at least one container to be migrated with the maximum load and a container copy of at least one container to be migrated in the X containers to be migrated are migrated to the second physical host in the descending order. The selection of the container to be migrated and the placement of the container are repeatedly performed until the first physical host is no longer overloaded.
By implementing the method, the overload physical host can not be overloaded any more by effectively scheduling the container, and the energy consumption is reduced.
The embodiment of the invention also provides a container scheduling method which is used for further reducing the energy consumption.
Specifically, Y underloaded third physical hosts are determined from the plurality of physical hosts, wherein Y is an integer greater than 0; and migrating the container and the container copy on the Y underloaded third physical hosts to a fourth physical host, wherein the fourth physical host is one of the plurality of physical hosts except the first physical host.
When migrating the containers and container copies on Y underloaded third physical hosts to a fourth physical host, firstly determining that the third physical host is a physical host except a first physical host and a second physical host in a plurality of physical hosts, performing load prediction on the underloaded third physical host by adopting a load prediction method based on a mechanism with attention, arranging the third physical hosts from small to large according to load prediction results, migrating all the containers on the third physical host with smaller load prediction results, distributing the migrated containers to the fourth physical host according to a placement strategy based on container load from large to small, and closing the underloaded third physical host after the containers on the underloaded third physical host are all distributed.
By scheduling the container on the third physical host that is underloaded, energy consumption can be further reduced.
All the load prediction methods described above use a load prediction method based on a system with attention. And another container is arranged on the physical host and is provided with a prediction model with an attention mechanism for predicting the container load and the physical host load.
Fig. 3 is a model of a load prediction method based on a force-taking mechanism according to an embodiment of the present invention.
As shown in fig. 3, the model specifically includes:
301, pretreatment: preprocessing the CPU utilization rate and the memory utilization rate;
302 input layer: inputting the CPU utilization rate and the memory utilization rate after preprocessing;
303 Convolutional Neural Network (CNN) module: the CNN module mainly comprises a one-dimensional convolutional neural network and a pooling layer. Acquiring the characteristics of the data through a one-dimensional convolutional neural network, and integrating the characteristics obtained after convolutional layer into new characteristics through a pooling layer;
304 feature vector: from CNNThe module outputs to obtain a characteristic vector (u) 1 ,u 2 ,......,u n-1 ,u n )。
305 Long Short-Term Memory network (LSTM) module: the module mainly comprises an LSTM layer and a bilSTM layer, and is used for matching feature vectors (u) 1 ,u 2 ,......,u n-1 ,u n ) Carrying out prediction;
306 Attention mechanism module (Attention Layer): in this module, the results output by the LSTM module are taken as input; exchanging the input dimensionality by using a Permutee function; connecting by using a fully-connected neural network, wherein an activation function is a softmax function; the dimensions are exchanged again by applying the Permute function to obtain a vector (h) 1 ,h 2 ,......,h n-1 ,h n ) (ii) a Will vector (h) 1 ,h 2 ,......,h n-1 ,h n ) Weight coefficient ω of (c) 1 、ω 2 ......ω n-1 、ω n The multiplication is performed, and the value of the weight coefficient is preset, and may also be determined in other manners, which is not limited in the embodiment of the present invention. In the attention mechanism module, an attention mechanism is added based on the time step.
307 output layer: and outputting the result of the attention mechanism module to obtain a load predicted value.
Compared with the existing energy consumption optimization scheme, the embodiment of the invention accurately schedules the high-load container, simultaneously considers the operability of the whole system and the processing of the container copy, and reduces the energy consumption.
The various embodiments described herein may be implemented as stand-alone solutions or combined in accordance with inherent logic and are intended to fall within the scope of the present application.
Based on the same technical concept, an embodiment of the present invention provides a container scheduling apparatus, as shown in fig. 4, the apparatus 400 includes: an acquisition unit 401 and a processing unit 402. The device may execute any method flow in fig. 2 to fig. 3, and the division of the modules in the embodiment of the present application is schematic, and is only one logic function division, and there may be another division manner in actual implementation. In addition, functional modules in the embodiments of the present application may be integrated into one processor, may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The acquisition unit is used for determining a load index of the first physical host and determining that the first physical host is overloaded according to the load index;
the processing unit is used for determining X containers to be migrated from all the containers included in the first physical host, wherein X is an integer larger than 0; and migrating at least one container to be migrated in the X containers to be migrated and the container copy of the at least one container to be migrated to the second physical host.
Based on the same technical concept, an embodiment of the present invention provides a computer device, where the computer device may be a terminal or a server, as shown in fig. 5, the device 500 includes at least one processor 501 and a memory 502 connected to the at least one processor, a specific connection medium between the processor 501 and the memory 502 is not limited in the embodiment of the present invention, and the processor 501 and the memory 502 are connected through a bus in fig. 5 as an example. The bus may be divided into an address bus, a data bus, a control bus, etc. The computer device may perform any of the method flows of fig. 2-3.
In the embodiment of the present invention, the memory 502 stores instructions executable by the at least one processor 501, and the at least one processor 501 may execute the steps included in the method shown in fig. 5 by executing the instructions stored in the memory 502.
The processor 501 is a control center of the computer device, and can connect various parts of the computer device by using various interfaces and lines, and execute or execute the instructions stored in the memory 502 and call up the data stored in the memory 502. Optionally, the processor 501 may include one or more processing units, and the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles an operating system, a user interface, an application program, and the like, and the modem processor mainly handles wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 501. In some embodiments, the processor 501 and the memory 502 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 501 may be a general-purpose processor, such as a Central Processing Unit (CPU), a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, configured to implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present invention. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in a processor.
Memory 502, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 502 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and the like. The memory 502 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 502 of embodiments of the present invention may also be circuitry or any other device capable of performing a storage function to store program instructions and/or data.
Based on the same inventive concept, embodiments of the present invention provide a computer-readable storage medium storing a computer program executable by a computer device, which, when the program runs on the computer device, causes the computer device to perform the steps of the case activity detection method described above.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data transmission apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data transmission apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data transmission apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data transfer apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for scheduling containers, comprising:
determining a load index of a first physical host, and determining that the first physical host is overloaded according to the load index;
determining X containers to be migrated from all the containers included in the first physical host, wherein X is an integer greater than 0;
and migrating at least one container to be migrated in the X containers to be migrated and the container copy of the at least one container to be migrated to a second physical host.
2. The method of claim 1, wherein the load metric of the first physical host comprises:
a central processor utilization of the first physical host;
the memory utilization of the first physical host.
3. The method of claim 2, wherein determining a load metric for the first physical host, and determining that the first physical host is overloaded based on the load metric, comprises:
and if the central processing unit utilization rate of the first physical host is greater than or equal to a first threshold value, and/or the memory utilization rate of the first physical host is greater than or equal to a second threshold value, determining that the first physical host is overloaded.
4. The method of claim 1, wherein determining the container to be migrated comprises:
for a container of which no container copy exists in the first physical host, if the load correlation between the container and the first physical host is less than a preset threshold, determining the container as the container to be migrated;
and for the container with the container copy in the first physical host, determining that the container is a container to be shrunk or a container to be expanded, and determining the container as the container to be migrated.
5. The method of claim 4, further comprising:
for the container to be subjected to capacity reduction, determining the first copy number of the container copies of the container after capacity reduction, and determining the container copies of the first copy number after capacity reduction as the container to be migrated;
and for the container to be expanded, determining the second copy number of the expanded container copies of the container, and determining the container copies of the second copy number as the container to be migrated.
6. The method according to claim 1, wherein the migrating at least one container to be migrated from the X containers to be migrated and a container copy of the at least one container to be migrated to a second physical host comprises:
and for the X containers to be migrated, migrating at least one container to be migrated with the largest load and the container copy of the at least one container to be migrated to the second physical host in the X containers to be migrated according to the load of each container to be migrated from large to small.
7. A container scheduling apparatus, comprising:
the system comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit is used for determining a load index of a first physical host and determining that the first physical host is overloaded according to the load index;
the processing unit is used for determining X containers to be migrated from all the containers included in the first physical host, wherein X is an integer larger than 0; and migrating at least one container to be migrated in the X containers to be migrated and the container copy of the at least one container to be migrated to a second physical host.
8. The apparatus as claimed in claim 7, wherein said processing unit is specifically configured to:
for a container in which no container copy exists in the first physical host, if the load correlation between the container and the first physical host is smaller than a preset threshold, determining the container as the container to be migrated;
and for the container with the container copy in the first physical host, determining that the container is a container to be contracted or expanded, and determining the container as the container to be migrated.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the job scheduling method according to any one of claims 1-6 when executing the computer program.
10. A computer-readable storage medium, characterized in that the storage medium stores computer instructions which, when executed by a processor, implement the method of any one of claims 1 to 6.
CN202210890099.1A 2022-07-27 2022-07-27 Container scheduling method and device Pending CN115309502A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210890099.1A CN115309502A (en) 2022-07-27 2022-07-27 Container scheduling method and device
PCT/CN2022/141481 WO2024021475A1 (en) 2022-07-27 2022-12-23 Container scheduling method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210890099.1A CN115309502A (en) 2022-07-27 2022-07-27 Container scheduling method and device

Publications (1)

Publication Number Publication Date
CN115309502A true CN115309502A (en) 2022-11-08

Family

ID=83858710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210890099.1A Pending CN115309502A (en) 2022-07-27 2022-07-27 Container scheduling method and device

Country Status (2)

Country Link
CN (1) CN115309502A (en)
WO (1) WO2024021475A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024021475A1 (en) * 2022-07-27 2024-02-01 天翼云科技有限公司 Container scheduling method and apparatus

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8826292B2 (en) * 2010-08-06 2014-09-02 Red Hat Israel, Ltd. Migrating virtual machines based on level of resource sharing and expected load per resource on candidate target host machines
CN107547596B (en) * 2016-06-27 2022-01-25 中兴通讯股份有限公司 Cloud platform control method and device based on Docker
CN110347498B (en) * 2019-06-10 2022-12-16 华南理工大学 Load dynamic migration method in container and virtual machine mixed cloud environment
CN114625474A (en) * 2020-12-08 2022-06-14 中移(苏州)软件技术有限公司 Container migration method and device, electronic equipment and storage medium
CN114296867A (en) * 2021-12-17 2022-04-08 山东海量信息技术研究院 Container operation method and system of cloud platform and related device
CN115309502A (en) * 2022-07-27 2022-11-08 天翼云科技有限公司 Container scheduling method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024021475A1 (en) * 2022-07-27 2024-02-01 天翼云科技有限公司 Container scheduling method and apparatus

Also Published As

Publication number Publication date
WO2024021475A1 (en) 2024-02-01

Similar Documents

Publication Publication Date Title
EP3480749B1 (en) Exploiting sparsity in a neural network
CN102053817B (en) For performing equipment and the method for multiplication accumulating operation
Yu et al. A parameterisable FPGA-tailored architecture for YOLOv3-tiny
CN105022670A (en) Heterogeneous distributed task processing system and processing method in cloud computing platform
CN111695672A (en) Method for improving AI engine MAC utilization rate
CN112236784A (en) Modifying machine learning models to improve locality
GB2568102A (en) Exploiting sparsity in a neural network
CN111767986A (en) Operation method and device based on neural network
CN113313247B (en) Operation method of sparse neural network based on data flow architecture
CN109213587B (en) Multi-Stream parallel DAG graph task mapping strategy under GPU platform
TWI775210B (en) Data dividing method and processor for convolution operation
CN103019855A (en) Method for forecasting executive time of Map Reduce operation
CN115309502A (en) Container scheduling method and device
CN116560968A (en) Simulation calculation time prediction method, system and equipment based on machine learning
CN114021733B (en) Model training optimization method, device, computer equipment and storage medium
Metz et al. Towards neural hardware search: Power estimation of cnns for gpgpus with dynamic frequency scaling
CN114490002A (en) Data processing system, task scheduling method, device, chip and electronic equipment
CN113591031A (en) Low-power-consumption matrix operation method and device
CN110046024A (en) Method for data center's storage appraisal framework emulation
CN111061513B (en) Method for accelerating modeling of computing device, electronic device and readable storage medium
CN111506384B (en) Simulation operation method and simulator
Hogg et al. New parallel sparse direct solvers for engineering applications
TW202328905A (en) General-purpose graphics processor core function configuration setting prediction system and method having a set screening module, a resource occupancy screening module, an execution module, a training data extraction module, and a modeling module
CN117972380A (en) Method and device for generating model input vector, storage medium and electronic equipment
Luo et al. A Cloud Computing User Experience Focused Load Balancing Method Based on Modified CMA-ES Algorithm

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