CN117149382A - Virtual machine scheduling method, device, computer equipment and storage medium - Google Patents

Virtual machine scheduling method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117149382A
CN117149382A CN202311040444.3A CN202311040444A CN117149382A CN 117149382 A CN117149382 A CN 117149382A CN 202311040444 A CN202311040444 A CN 202311040444A CN 117149382 A CN117149382 A CN 117149382A
Authority
CN
China
Prior art keywords
task
scheduling
target
server
scheduling task
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
CN202311040444.3A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202311040444.3A priority Critical patent/CN117149382A/en
Publication of CN117149382A publication Critical patent/CN117149382A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

The application relates to a virtual machine scheduling method, a virtual machine scheduling device, computer equipment, a storage medium and a computer program product, and relates to the technical field of cloud computing. The method comprises the following steps: determining a target scheduling task from a task processing queue according to the scheduling task priority; determining a scheduling algorithm corresponding to the target scheduling task based on the task category identification of the target scheduling task; and carrying out scheduling processing on the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task. By adopting the method, the scheduling algorithm corresponding to each scheduling task can be distinguished according to the scheduling task priority and the task category identification of each scheduling task in the task processing queue, so that the processing sequence of each scheduling task is determined according to the scheduling task priority under the condition that multiple requirements exist simultaneously, the priority processing of the scheduling task with relatively higher importance can be preferentially ensured, and the high availability of the cloud computing platform is improved.

Description

Virtual machine scheduling method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to a virtual machine scheduling method, apparatus, computer device, storage medium, and computer program product.
Background
With the development of cloud computing technology, the cloud computing platform integrates network resources, computing resources and storage resources by utilizing a virtualization technology, and resource pooling deployment is formed. As a provider of cloud computing platforms, attention must be paid to large-scale hardware deployment capability, high resource utilization, various user demands, and the ability to stably and continuously provide services. Therefore, a cloud resource scheduling system is required to realize scheduling of cloud platform resources according to various demand conditions.
The current resource scheduling management system can determine a scheduling strategy with better adaptability corresponding to each scheduling requirement according to the scheduling requirement of each virtual machine of the cloud computing platform so as to meet all the scheduling requirements.
However, the current scheduling requirements are generally divided into three requirements of HA (High Availability ) scheduling main selection requirements (i.e. server failure back-sparse virtual machine requirements), user resource requirements and load resource optimization requirements, and as the target directions corresponding to different requirements are inconsistent, the new resource requirements are reflected as quick response users; the HA scheduling main selection requirement is reflected in ensuring the quick service recovery; the resource optimization adjustment requirement is reflected in improving the overall resource utilization rate of the cloud computing platform and reducing the energy consumption of the data center, so that when the virtual machine scheduling processing is carried out by adopting the same scheduling strategy, the high availability of the cloud computing platform cannot be realized under the condition that multiple scheduling requirements exist in the cloud computing platform.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a virtual machine scheduling method, apparatus, computer device, computer readable storage medium, and computer program product that can improve the high availability of a cloud computing platform.
In a first aspect, the present application provides a virtual machine scheduling method. The method comprises the following steps:
determining a target scheduling task from a task processing queue according to the scheduling task priority, wherein the task processing queue is used for storing the scheduling task, each scheduling task is provided with a task category identification, and the task category identification is used for determining the scheduling task priority of the scheduling task;
determining a scheduling algorithm corresponding to the target scheduling task based on the task category identification of the target scheduling task;
and carrying out scheduling processing on the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task.
In one embodiment, before determining the target scheduled task from the task processing queue according to the priority of the scheduled task, the method further includes:
receiving a scheduling task sent by each virtual machine task monitoring module, wherein the scheduling task carries a task category identifier corresponding to the virtual machine task monitoring module;
And storing the scheduling task into the task processing queue.
In one embodiment, the storing the scheduled task in the task processing queue includes:
and adding the scheduled tasks to a task processing queue according to the receiving time of the scheduled tasks and the sequence from the early to the late of the receiving time.
In one embodiment, the storing the scheduled task in the task processing queue includes:
determining the scheduling task priority of the scheduling task according to the task category identification of the scheduling task;
determining a storage position of the scheduling task in the task processing queue according to the scheduling task priority of the scheduling task, wherein the scheduling task priority of each scheduling task stored in the task processing queue before the storage position is higher than or equal to the scheduling task priority of the scheduling task, and the scheduling task priority of each scheduling task stored in the task processing queue after the storage position is lower than the scheduling task priority of the scheduling task;
and storing the scheduling task into the task processing queue according to the storage position of the scheduling task in the task processing queue.
In one embodiment, the determining the target scheduled task from the task processing queue according to the priority of the scheduled task includes:
determining a target scheduling task priority from the scheduling task priorities;
traversing the scheduling tasks in the task processing queue from the starting position of the task processing queue until the scheduling tasks corresponding to the target scheduling task priority are traversed, and taking the scheduling tasks corresponding to the target scheduling task priority as target scheduling tasks;
and under the condition that the scheduling task corresponding to the target scheduling task priority is not traversed, determining the next scheduling task priority of the target scheduling task priority from the scheduling task priorities, taking the next scheduling task priority as the target scheduling task priority, and jumping to the step of traversing the scheduling task in the task processing queue from the starting position of the task processing queue.
In one embodiment, the determining the target scheduled task from the task processing queue according to the priority of the scheduled task includes:
and after the scheduling processing of the current scheduling task is completed, taking the scheduling task which is positioned behind the current scheduling task and is adjacent to the current scheduling task in the task processing queue as a target scheduling task.
In one embodiment, the scheduling processing for the target scheduling task according to the scheduling algorithm corresponding to the target scheduling task includes:
under the condition that the target scheduling task is a fault type scheduling task, carrying out load prediction according to the resource load condition of each server at the current moment to obtain the predicted resource load condition of each server at the next moment;
determining a first target server from the servers according to the predicted resource load condition of the servers at the next moment, wherein the predicted resource load condition corresponding to the target server is smaller than a first load threshold;
and dispatching the target virtual machine corresponding to the target dispatching task to the first target server.
In one embodiment, the scheduling processing is performed on the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task, and the method further includes:
under the condition that the first target server does not exist, sequencing all the servers according to the sequence from the big to the small of the resource load condition of the servers at the current moment to obtain a server load sequence;
Determining a second target server in each server according to the predicted resource load condition of each server in the server load sequence at the next moment, wherein the predicted resource load condition of the second target server at the next moment is smaller than a second load threshold;
and dispatching the target virtual machine corresponding to the target dispatching task to the second target server.
In one embodiment, the scheduling processing for the target scheduling task according to the scheduling algorithm corresponding to the target scheduling task includes:
acquiring a resource requirement from the target scheduling task under the condition that the target scheduling task is a scheduling task of a resource type;
determining a target server from all servers according to the resource requirements corresponding to the target scheduling task, wherein the current resource condition of the target server meets the resource requirements corresponding to the target scheduling task;
and responding to the target scheduling task, and creating a target virtual machine corresponding to the target scheduling task in the target server.
In a second aspect, the application further provides a virtual machine scheduling device. The device comprises:
The first determining module is used for determining target scheduling tasks from task processing queues according to the scheduling task priorities, wherein the task processing queues are used for storing the scheduling tasks, each scheduling task is provided with a task category identifier, and the task category identifiers are used for determining the scheduling task priorities of the scheduling tasks;
the second determining module is used for determining a scheduling algorithm corresponding to the target scheduling task based on the task category identification of the target scheduling task;
and the scheduling module is used for scheduling the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task.
In one embodiment, the apparatus further comprises:
the receiving module is used for receiving the scheduling task sent by each virtual machine task monitoring module, wherein the scheduling task carries a task category identifier corresponding to the virtual machine task monitoring module;
and the storage module is used for storing the scheduling task into the task processing queue.
In one embodiment, the storage module is specifically configured to:
and adding the scheduled tasks to a task processing queue according to the receiving time of the scheduled tasks and the sequence from the early to the late of the receiving time.
In one embodiment, the storage module is specifically configured to:
determining the scheduling task priority of the scheduling task according to the task category identification of the scheduling task;
determining a storage position of the scheduling task in the task processing queue according to the scheduling task priority of the scheduling task, wherein the scheduling task priority of each scheduling task stored in the task processing queue before the storage position is higher than or equal to the scheduling task priority of the scheduling task, and the scheduling task priority of each scheduling task stored in the task processing queue after the storage position is lower than the scheduling task priority of the scheduling task;
and storing the scheduling task into the task processing queue according to the storage position of the scheduling task in the task processing queue.
In one embodiment, the first determining module is specifically configured to:
determining a target scheduling task priority from the scheduling task priorities;
traversing the scheduling tasks in the task processing queue from the starting position of the task processing queue until the scheduling tasks corresponding to the target scheduling task priority are traversed, and taking the scheduling tasks corresponding to the target scheduling task priority as target scheduling tasks;
And under the condition that the scheduling task corresponding to the target scheduling task priority is not traversed, determining the next scheduling task priority of the target scheduling task priority from the scheduling task priorities, taking the next scheduling task priority as the target scheduling task priority, and jumping to the step of traversing the scheduling task in the task processing queue from the starting position of the task processing queue.
In one embodiment, the first determining module is specifically configured to:
and after the scheduling processing of the current scheduling task is completed, taking the scheduling task which is positioned behind the current scheduling task and is adjacent to the current scheduling task in the task processing queue as a target scheduling task.
In one embodiment, the scheduling module is specifically configured to:
under the condition that the target scheduling task is a fault type scheduling task, carrying out load prediction according to the resource load condition of each server at the current moment to obtain the predicted resource load condition of each server at the next moment;
determining a first target server from the servers according to the predicted resource load condition of the servers at the next moment, wherein the predicted resource load condition corresponding to the target server is smaller than a first load threshold;
And dispatching the target virtual machine corresponding to the target dispatching task to the first target server.
In one embodiment, the scheduling module is specifically configured to:
under the condition that the first target server does not exist, sequencing all the servers according to the sequence from the big to the small of the resource load condition of the servers at the current moment to obtain a server load sequence;
determining a second target server in each server according to the predicted resource load condition of each server in the server load sequence at the next moment, wherein the predicted resource load condition of the second target server at the next moment is smaller than a second load threshold;
and dispatching the target virtual machine corresponding to the target dispatching task to the second target server.
In one embodiment, the scheduling module is specifically configured to:
acquiring a resource requirement from the target scheduling task under the condition that the target scheduling task is a scheduling task of a resource type;
determining a target server from all servers according to the resource requirements corresponding to the target scheduling task, wherein the current resource condition of the target server meets the resource requirements corresponding to the target scheduling task;
And responding to the target scheduling task, and creating a target virtual machine corresponding to the target scheduling task in the target server.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
determining a target scheduling task from a task processing queue according to the scheduling task priority, wherein the task processing queue is used for storing the scheduling task, each scheduling task is provided with a task category identification, and the task category identification is used for determining the scheduling task priority of the scheduling task;
determining a scheduling algorithm corresponding to the target scheduling task based on the task category identification of the target scheduling task;
and carrying out scheduling processing on the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
determining a target scheduling task from a task processing queue according to the scheduling task priority, wherein the task processing queue is used for storing the scheduling task, each scheduling task is provided with a task category identification, and the task category identification is used for determining the scheduling task priority of the scheduling task;
Determining a scheduling algorithm corresponding to the target scheduling task based on the task category identification of the target scheduling task;
and carrying out scheduling processing on the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
determining a target scheduling task from a task processing queue according to the scheduling task priority, wherein the task processing queue is used for storing the scheduling task, each scheduling task is provided with a task category identification, and the task category identification is used for determining the scheduling task priority of the scheduling task;
determining a scheduling algorithm corresponding to the target scheduling task based on the task category identification of the target scheduling task;
and carrying out scheduling processing on the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task.
The virtual machine scheduling method, the virtual machine scheduling device, the computer equipment, the storage medium and the computer program product determine target scheduling tasks from task processing queues according to scheduling task priorities, wherein the task processing queues are used for storing scheduling tasks, each scheduling task is provided with a task category identifier, and the task category identifiers are used for determining scheduling task priorities of the scheduling tasks; determining a scheduling algorithm corresponding to the target scheduling task based on the task category identification of the target scheduling task; and carrying out scheduling processing on the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task. The scheduling algorithm corresponding to each scheduling task can be distinguished according to the scheduling task priority and the task category identification of each scheduling task in the task processing queue, so that the processing sequence of each scheduling task is determined according to the scheduling task priority under the condition that various demands exist, the priority processing of the scheduling task with relatively higher importance can be preferentially ensured, and the high availability of the cloud computing platform is improved.
Drawings
FIG. 1 is an application environment diagram of a virtual machine scheduling method in one embodiment;
FIG. 2 is a flow diagram of a virtual machine scheduling method in one embodiment;
FIG. 3 is a flow diagram illustrating storing scheduled tasks in a task processing queue in one embodiment;
FIG. 4 is a schematic diagram of a virtual machine task monitoring module commonly disposed in a server cluster in one embodiment;
FIG. 5 is a flow diagram illustrating storing scheduled tasks in a task processing queue in one embodiment;
FIG. 6 is a flow diagram of determining a target scheduled task priority in one embodiment;
FIG. 7 is a schematic flow chart of scheduling a target virtual machine corresponding to a target scheduling task to a first target server in one embodiment;
FIG. 8 is a flow chart of scheduling a target virtual machine corresponding to a target scheduling task to a second target server according to an embodiment;
FIG. 9 is a flow chart of creating a target virtual machine corresponding to a target scheduling task at a target server in one embodiment;
FIG. 10 is a flow diagram of scheduling task generation by a physical resource management monitoring module in one embodiment;
FIG. 11 is a schematic flow diagram of a node running state monitoring module performing scheduling task generation in one embodiment;
FIG. 12 is a flow diagram of scheduling task generation by a user resource request monitoring module in one embodiment;
FIG. 13 is a flow chart illustrating a process of receiving and processing scheduled tasks by the resource integration scheduling module in one embodiment;
FIG. 14 is a flow diagram of determining a first target server and a second target server in one embodiment;
FIG. 15 is a block diagram of a virtual machine scheduler in one embodiment;
fig. 16 is an internal structural view of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The virtual machine scheduling method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, etc. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
At present, the cloud computing platform needs to be capable of simultaneously guaranteeing the actions of quick recovery of a virtual machine on a fault server, quick response of a user resource request, resource optimization deployment and the like, and how to simultaneously meet the requirements under the condition of limited resources is the problem to be solved by the application. Therefore, the embodiment of the application can provide the virtual machine scheduling method capable of dynamically processing the different types of virtual machine demands received by the cloud platform.
In one embodiment, as shown in fig. 2, a virtual machine scheduling method is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
step 202, determining a target scheduling task from the task processing queue according to the scheduling task priority.
The task processing queue is used for storing scheduling tasks, each scheduling task is provided with a task category identifier, and the task category identifiers can comprise fault type identifiers, resource type identifiers and optimization type identifiers. The task category identification is used for determining the scheduling task priority of the scheduling tasks, and each scheduling task is distinguished in the task processing queue according to the task category identification.
In the embodiment of the application, the server can pre-store the dispatching task priority, such as a dispatching priority table, wherein the dispatching task priority is respectively a task type identifier of a fault type, a task type identifier of a resource type and a task type identifier of an optimization type from high to low. The scheduling task priority may be determined specifically by a technician in practical application, and the scheduling task priority provided in the embodiment of the present application is only an example of a scheduling task priority.
Then, the server determines the scheduling task with the highest scheduling priority and the earliest generating time from the task processing queue according to the scheduling task priority as a target scheduling task.
Step 204, determining a scheduling algorithm corresponding to the target scheduling task based on the task category identification of the target scheduling task.
In the embodiment of the application, the mapping relation between the task category identification and the scheduling algorithm can be stored in the server in advance, and then the server determines the scheduling algorithm corresponding to the target scheduling task according to the task category identification of the target scheduling task and the mapping relation between the task category identification and the scheduling algorithm.
And 206, performing scheduling processing on the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task.
The scheduling task may carry virtual machine information corresponding to the virtual machine, where the virtual machine information may include, but is not limited to, a virtual machine number, an IP address (Internet Protocol Address ) of a server where the virtual machine is located, and the like, so that the server performs scheduling processing on the virtual machine according to the virtual machine information. The scheduling process is to migrate the virtual machine from one server to another server, and the application is not limited to a specific implementation process for implementing virtual machine scheduling.
In the embodiment of the application, the mapping relation table of each server and the virtual machine can be prestored in the server, and the mapping relation table is dynamically updated along with migration, addition and extinction of the virtual machine. And the server obtains virtual machine information corresponding to the target virtual machine according to the target scheduling task, and determines the target virtual machine according to the virtual machine information corresponding to the target virtual machine. And then, the server performs scheduling processing on the target virtual machine corresponding to the target scheduling task according to the target virtual machine and a scheduling algorithm corresponding to the target scheduling task.
In the virtual machine scheduling method, the target scheduling task is determined from the task processing queue according to the scheduling task priority, the task processing queue is used for storing the scheduling task, each scheduling task is provided with a task category identifier, and the task category identifier is used for determining the scheduling task priority of the scheduling task; determining a scheduling algorithm corresponding to the target scheduling task based on the task category identification of the target scheduling task; and carrying out scheduling processing on the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task. The scheduling algorithm corresponding to each scheduling task can be distinguished according to the scheduling task priority and the task category identification of each scheduling task in the task processing queue, so that the processing sequence of each scheduling task is determined according to the scheduling task priority under the condition that multiple demands exist simultaneously, the priority processing of the scheduling task with relatively higher importance can be preferentially ensured, and the high availability of the cloud computing platform is improved.
In one embodiment, as shown in fig. 3, before step 202, the method further includes:
and step 302, receiving the scheduling task sent by each virtual machine task monitoring module.
The scheduling task carries a task category identifier corresponding to a virtual machine task monitoring module, and the virtual machine task monitoring module can comprise a node running state monitoring module, a user resource request monitoring module and a physical resource management monitoring module. The node running state monitoring module is used for monitoring running states of all servers in the server cluster, for example, the server can confirm whether all servers in the server cluster run normally or not from multiple angles such as a management side, a service side, a storage side and the like, and the running states of the servers can comprise a normal state or a fault/downtime state; the user resource request monitoring module is used for monitoring a resource request of a user for creating a virtual machine; the physical resource management monitoring module is configured to periodically monitor and count a load condition of the server cluster, where the load condition may include, but is not limited to, a CPU (Central Processing Unit ) usage, a memory usage, a network bandwidth usage, a storage bandwidth usage, and the like.
In the embodiment of the present application, referring to fig. 4, when the task monitoring modules of each virtual machine are commonly disposed in one server of the server cluster, the server may directly receive the scheduling task sent by each task monitoring module of each virtual machine (i.e., the node running state monitoring module, the user resource request monitoring module, and the physical resource management monitoring module) according to the load condition of the server cluster, the node running state of each server, and the resource request of the user-created virtual machine.
When the virtual machine task monitoring modules are arranged on a plurality of servers in the server cluster in a scattered manner, the virtual machine task monitoring modules can respectively send scheduling tasks to the servers based on the servers where the virtual machine task monitoring modules are located according to the load condition of the server cluster, the node running state of each server and the resource request of the virtual machine created by a user. The server then receives the scheduled task.
The virtual machine task monitoring modules can be commonly arranged in one server of the server cluster, or can be arranged on a plurality of servers in the server cluster in a scattered manner, and the setting positions of the virtual machine task monitoring modules are not particularly limited.
Step 304, storing the scheduled task in a task processing queue.
In the embodiment of the application, a server stores a scheduled task into a task processing queue according to a task category identification of the scheduled task and the receiving time of the scheduled task.
In this embodiment, the server may store the scheduled task to the task processing queue based on the task type identifier of the scheduled task and the receiving time of the scheduled task by receiving the scheduled task with the task type identifier sent by the task monitoring module of each virtual machine, so as to facilitate the task type identifier of the scheduled task to be scheduled in the task processing queue, determine the priority of the scheduled task, and further determine the processing order of the scheduled task, thereby realizing high availability of the cloud platform.
In one embodiment, step 304 includes:
and adding the scheduled tasks to the task processing queue according to the receiving time of the scheduled tasks and the sequence from the early to the late of the receiving time.
In the embodiment of the application, when receiving the scheduled tasks sent by the task monitoring modules of the virtual machines, the server can determine the receiving time of the scheduled tasks. And the server sequentially adds the scheduled tasks into the task processing queue according to the receiving time of each scheduled task and the sequence from the early to the late of the receiving time.
Illustratively, the server adds scheduled task A to the task processing queue when scheduled task A is received at 5:21, and adds scheduled task B to the task processing queue when scheduled task B is received at 5:22. Wherein the position of the scheduled task B in the task processing queue is after the position of the scheduled task a in the task processing queue.
In this embodiment, the server may determine, according to the time of receiving the scheduled task, a position of each scheduled task stored in the task processing queue, so as to facilitate subsequent task scheduling according to the position of the task processing queue where each scheduled task is located.
In one embodiment, as shown in FIG. 5, step 204 includes:
Step 502, determining the scheduling task priority of the scheduling task according to the task category identification of the scheduling task.
In the embodiment of the application, the server determines the scheduling task priority of the scheduling task according to the pre-stored scheduling task priority and the scheduling task priority corresponding to the task category identification of the scheduling task.
Step 504, determining the storage position of the scheduled task in the task processing queue according to the priority of the scheduled task.
The task processing queue is used for storing the task scheduling priority of each task scheduling in front of the storage position, wherein the task scheduling priority of each task scheduling in front of the storage position in the task processing queue is higher than or equal to the task scheduling priority of the task scheduling, and the task scheduling priority of each task scheduling in back of the storage position in the task processing queue is lower than the task scheduling priority of the task scheduling.
And the server calculates the storage position of the scheduled task in the task processing queue in advance according to the priority of the scheduled task and the sequence from high to low of the priority of the scheduled task.
For example, in the case that the task scheduling priority is respectively a fault type task category identifier, a resource type task category identifier and an optimization type task category identifier from high to low, the server shall add the task scheduling a to the position 1 in the task processing queue when receiving the task scheduling a with the task category identifier of the resource type at 5:21; when receiving a scheduled task B with a task category identified as a fault type, at 5:22, the scheduled task B should be added to a position 1 in the task processing queue, and the scheduled task A should be moved to a position 2 in the task processing queue. Wherein the position 1 in the task processing queue is before the position 2 in the task processing queue, so that the scheduled task B performs scheduling processing before the scheduled task A.
It will be appreciated that, in the case where the priorities of the plurality of scheduled tasks are identical, for the scheduled task of the priority of the scheduled task, the storage position of each scheduled task in the task processing queue may be determined according to the receiving time of each scheduled task.
And step 506, storing the scheduled task into the task processing queue according to the storage position of the scheduled task in the task processing queue.
In the embodiment of the application, the server sequentially stores each scheduling task into the task processing queue according to the storage position of the pre-calculated scheduling task in the task processing queue.
For example, the server stores the scheduled task B in the position 1 in the task processing queue and the scheduled task a in the position 2 in the task processing queue according to that the pre-calculated storage position of the scheduled task in the task processing queue is the position 1 in the task processing queue corresponding to the scheduled task B, and the scheduled task a corresponds to the position 2 in the task processing queue.
In this embodiment, the server may store the scheduled tasks in the task processing queue according to the priority of the scheduled tasks, so that when the scheduled tasks are processed later, the scheduled tasks are directly scheduled according to the position sequence of the scheduled tasks in the task processing queue, thereby improving the processing efficiency of the scheduled tasks.
In one embodiment, as shown in FIG. 6, step 202 includes:
step 602, determining a target scheduling task priority from the scheduling task priorities.
When there are a server failure recovery requirement, a user resource application requirement and a load resource optimization requirement in a cloud computing platform (i.e., a server cluster), the server failure recovery requirement and the user resource application requirement need to be guaranteed to be completed quickly preferentially, and then load resource optimization requirement management is considered.
In the embodiment of the application, the server takes the scheduling task priority with the highest scheduling task priority as the target scheduling task priority in the scheduling task priorities according to the pre-stored scheduling task priorities.
In the case where the task category identification of the failure type, the task category identification of the resource type, and the task category identification of the optimization type are set from high to low, the server takes the task category identification of the failure type as the target task priority.
Step 604, starting from the starting position of the task processing queue, traversing the scheduled tasks in the task processing queue until traversing to the scheduled task corresponding to the target scheduled task priority, and taking the scheduled task corresponding to the target scheduled task priority as the target scheduled task.
The starting position of the task processing queue is the first position in the task processing queue, which is determined according to the sequence from front to back.
In the embodiment of the application, a server starts from the starting position of a task processing queue, traverses all scheduling tasks in the task processing queue until traversing to the scheduling task corresponding to the target scheduling task priority, and takes the scheduling task corresponding to the target scheduling task priority as a target scheduling task. And the server performs scheduling processing on the virtual machine corresponding to the target scheduling task.
Step 606, determining the next-stage scheduling task priority of the target scheduling task priority from the scheduling task priorities, taking the next-stage task scheduling priority as the target scheduling task priority, and jumping to the step of traversing the scheduling tasks in the task processing queue from the starting position of the task processing queue under the condition that the scheduling tasks corresponding to the target scheduling task priority are not traversed.
In the embodiment of the application, the server determines the next-stage scheduling task priority of the target scheduling task priority from the scheduling task priorities under the condition that the server does not traverse to the scheduling task corresponding to the target scheduling task priority, and takes the next-stage task scheduling priority as the target scheduling task priority.
In an exemplary case that the task scheduling priority is respectively a fault type task category identification, a resource type task category identification and an optimization type task category identification from high to low, when the server does not traverse the task scheduling of the fault type task category identification in the task processing queue, determining the next scheduling task priority of the fault type task category identification, namely the resource type task category identification, according to the pre-stored scheduling task priority, and then taking the resource type task category identification as the target scheduling task priority by the server.
After the server takes the next-stage task scheduling priority as the target scheduling task priority, the server jumps to the step of traversing the scheduling tasks in the task processing queue from the starting position of the task processing queue.
The step of traversing the scheduled task in the task processing queue from the start position of the task processing queue is described in detail in step 604, which is not repeated here.
In this embodiment, the server may traverse each scheduling task in the task processing queue to obtain the target scheduling task with the highest scheduling priority, so as to ensure that the server failure recovery requirement and the user resource application requirement are completed quickly when the server failure recovery requirement, the user resource application requirement and the load resource optimization requirement coexist in the cloud computing platform (i.e., the server cluster), and consider the effect of performing the optimization management of the stock resources, thereby ensuring the high availability of the cloud computing platform.
In one embodiment, step 202 includes:
and after the scheduling processing of the current scheduling task is completed, taking the scheduling task which is positioned behind the current scheduling task and is adjacent to the current scheduling task in the task processing queue as a target scheduling task.
In the embodiment of the application, the server can take the scheduled task which is positioned behind the current scheduled task and is adjacent to the current scheduled task in the task processing queue as a target scheduled task according to the position sequence of each scheduled task in the task processing queue and the sequence from front to back after the scheduled processing of the current scheduled task is completed.
In this embodiment, the server may perform scheduling processing on each scheduled task directly according to the position order of each scheduled task in the task processing queue, thereby improving the processing efficiency of the scheduled task.
In one embodiment, as shown in FIG. 7, step 206 includes:
step 702, in the case that the target scheduling task is a fault type scheduling task, performing load prediction according to the resource load condition of each server at the current moment, so as to obtain the predicted resource load condition of each server at the next moment.
In the embodiment of the application, the server can continuously monitor the running state of each server in the server cluster according to the physical resource management monitoring module, and when judging that a certain server in the server cluster fails, the server presents an migration demand for the virtual machine borne by the server and generates a scheduling task based on the virtual machine borne by the server. The physical resource management monitoring module sends the scheduled task to the task processing queue.
The server can acquire the resource load condition of the virtual resources of each server in the server cluster at the current moment according to the physical resource management monitoring module. The server can also call a resource load condition acquisition interface of the virtual resource to acquire the resource load condition of the virtual resource of each server in the server cluster at the current moment.
The embodiment of the application does not limit the specific mode of acquiring the resource load condition of the virtual resource of each server in the server cluster at the current moment.
And under the condition that the target scheduling task is a fault type scheduling task, the server predicts the load of each server in the server cluster by calling a load prediction algorithm according to the resource load condition of the virtual resource of each server in the server cluster at the current moment, so as to obtain the predicted resource load condition of the virtual resource of each server at the next moment.
Among them, the load prediction algorithm may employ an average value-based algorithm (MA), an exponentially weighted average value-based algorithm (Exponential Weighted Moving Average, EWMA), a time series-based algorithm (such as ARIMA, exponential Smoothing), a deep learning algorithm, such as LSTM (Long Short Term Memory, long and short term memory) and RNN (Recurrent Neural Network ) models, and the like. In the case that the load prediction algorithm is a deep learning algorithm, adam (Adaptive Moment Estimation, an optimizer based on a random gradient descent optimization algorithm), RMSProp (Root Mean Square Prop, a deep learning optimizer), NAdam (a gradient descent optimization algorithm) and other common optimizers can be adopted in model training of the deep learning model, and adaptive adjustment parameters can be dynamically changed, so that the problems of over-fitting, under-fitting and the like are avoided. The selection of the load prediction algorithm in the embodiment of the application is not particularly limited.
Step 704, determining a first target server from the servers according to the predicted resource load condition of the servers at the next moment.
The predicted resource load condition corresponding to the target server is smaller than a first load threshold. The first load threshold may be a preset threshold, and the first load threshold may be determined by a technician in practical applications, which is not limited herein. The resource load condition of the server is smaller than the first load threshold value, which is used for representing that the current running condition of the server is good, the load is lower, and the virtual machine scheduling can be performed on the server.
In the embodiment of the application, a server determines a server with the predicted resource load condition smaller than a first load threshold value from the servers according to the predicted resource load condition and the first load threshold value of each server at the next moment, and takes the server as a first target server.
And step 706, scheduling the target virtual machine corresponding to the target scheduling task to the first target server.
In the embodiment of the application, the server determines virtual machine information corresponding to the target virtual machine according to the target scheduling task, and then determines the target virtual machine according to the virtual machine information corresponding to the target virtual machine. The server may schedule the target virtual machine corresponding to the target scheduling task to the first target server.
In this embodiment, after a server in a server cluster fails, a server can schedule a virtual machine corresponding to a scheduled task to a first target server with a smaller load by performing a task scheduling process on the scheduled task of the failure type, so as to ensure that the virtual machine of the cloud computing platform is continuously available.
In one embodiment, as shown in fig. 8, step 206 further comprises:
step 802, under the condition that the first target server does not exist, sequencing all servers according to the sequence from the big to the small of the resource load condition of all servers at the current moment to obtain a server load sequence.
In the embodiment of the application, under the condition that a first target server does not exist in each server in a server cluster, according to the resource load condition of each server at the current moment, sequencing each server according to the sequence from high to low of the resource load condition of each server at the current moment, so as to obtain a server load sequence.
Step 804, determining a second target server in each server according to the predicted resource load condition of each server in the server load sequence at the next moment.
The predicted resource load condition of the second target server at the next moment is smaller than a second load threshold. The second load threshold may be a preset threshold, and the second load threshold may be determined by a technician in practical applications, which is not limited herein. The resource load condition of the server is larger than or equal to the second load threshold value, which is used for representing that the current load of the server is extremely high, and the server cannot be subjected to virtual machine scheduling any more when the load limit is exceeded. The resource load condition of the server being smaller than the second load threshold is used to characterize that the current load of the server is higher but the load limit is not exceeded, and virtual machine scheduling can be performed on the server.
In the embodiment of the application, the server determines the scheduling sequence of each server according to the server load sequence, and determines whether the predicted resource load condition of each server at the next moment is smaller than the second load threshold for each server in the server cluster. And when the predicted resource load condition of each server at the next moment is smaller than a second load threshold value, the server takes the server as a second target server.
For example, in the case that the server load sequence is server a and server B, the server may first determine whether the predicted resource load condition of server a at the next moment is less than the second load threshold, and in the case that the predicted resource load condition of server a at the next moment is less than the second load threshold, take server a as the second target server; and under the condition that the predicted resource load condition of the server A at the next moment is greater than or equal to a second load threshold, the server judges whether the predicted resource load condition of the server B at the next moment is smaller than the second load threshold, and under the condition that the predicted resource load condition of the server B at the next moment is smaller than the second load threshold, the server B is taken as a second target server.
And step 806, scheduling the target virtual machine corresponding to the target scheduling task to a second target server.
In the embodiment of the application, the server obtains the virtual machine information corresponding to the target virtual machine according to the target scheduling task, and determines the target virtual machine according to the virtual machine information corresponding to the target virtual machine. And then, the server dispatches the target virtual machine corresponding to the target dispatching task to a second target server according to the target virtual machine and a dispatching algorithm corresponding to the target dispatching task.
And under the condition that no server with the predicted resource load condition smaller than the second load threshold value at the next moment exists in the server load sequence, the server sends a wake-up instruction to a power management module in the server cluster, the power management module sends a start-up instruction to one of the servers in a dormant or low-power consumption state, and the server takes the started server as a second target server. Then, the server can determine a preset number of servers from the servers with predicted resource load conditions at the next moment in the server cluster being greater than or equal to the second load threshold, and send the determined preset number of servers to the physical resource management monitoring module.
The physical resource management monitoring module generates scheduling tasks based on virtual machines on the preset number of servers and adds the scheduling tasks to a task processing queue. When the task category of the scheduled task is identified as an optimized type of scheduled task, the server can adopt a virtual machine load balancing algorithm to perform scheduling processing.
Any virtual machine scheduling algorithm capable of realizing load balancing in the server cluster can be applied to the virtual machine load balancing algorithm, and the application is not limited to the virtual machine load balancing algorithm.
It can be understood that the server can take the scheduling task processing process of the preset duration threshold as a round of scheduling tasks, and after the round of scheduling tasks is finished, the server can sleep an idle server which does not perform virtual machine scheduling processing through the power management module or enable the idle server to be in a low-power consumption state so as to wake up the idle server according to the requirement.
In this embodiment, the server may select the second target server to perform target virtual machine scheduling when there is no first target server with a smaller load in the server cluster. And the server can ensure that the server resources are reasonably and efficiently utilized according to a load balancing algorithm, so that the resource utilization rate is improved, and the overall energy consumption of the cloud computing platform is reduced.
In one embodiment, as shown in FIG. 9, step 206 includes:
in step 902, in the case that the target scheduling task is a scheduling task of a resource type, a resource requirement is obtained from the target scheduling task.
The task category identification is that a scheduling task of a resource type contains a virtual machine and resource requirements corresponding to the virtual machine. The resource requirements characterize the requirements of the virtual machines required by the user, e.g., the resource requirements are excellent performance virtual machines.
In the embodiment of the application, a user can propose specific resource configuration information to the server based on the terminal according to the resource configuration template provided by the server. The server may evaluate whether the current server cluster has sufficient provisioning capability through the admission control unit to determine whether to accept or reject the user request. For a receivable user request, the server acquires a resource requirement corresponding to the target virtual machine from the target scheduling task under the condition that the target scheduling task is a scheduling task of a resource type.
Any algorithm with resource requirements and server resource comparison functions may be used to determine the admission control unit, which is not limited in this regard.
And step 904, determining a target server from the servers according to the resource requirements corresponding to the target scheduling task.
The current resource condition of the target server meets the resource requirement corresponding to the target scheduling task.
In the embodiment of the application, the server determines a server which can meet the resource requirement corresponding to the target scheduling task from the servers in each running state in the server cluster according to the resource requirement corresponding to the target scheduling task, and takes the server as a target server. Under the condition that a server capable of meeting the resource requirement corresponding to the target scheduling task is not available in the servers in all running states in the server cluster, the server sends a wake-up instruction to a power management module in the server cluster, the power management module sends a start-up instruction to one of the servers in a dormant or low-power consumption state, and the server takes the started server as a target server.
In step 906, in response to the target scheduling task, a target virtual machine corresponding to the target scheduling task is created at the target server.
In the embodiment of the application, a server responds to a target scheduling task and creates a target virtual machine corresponding to the target scheduling task in the target server according to the target virtual machine corresponding to the target scheduling task.
It can be understood that the server can take the scheduling task processing process of the preset duration threshold as a round of scheduling tasks, and after the round of scheduling tasks is finished, the server can sleep an idle server which does not perform virtual machine scheduling processing through the power management module or enable the idle server to be in a low-power consumption state so as to wake up the idle server according to the requirement.
In this embodiment, the server may process a scheduling task of a resource type corresponding to the target scheduling task, so as to ensure that the response time of the user resource request is controllable and the cloud computing platform is continuously available.
In one embodiment, as shown in fig. 4, a processing procedure example of a virtual machine scheduling method is further provided, which specifically includes:
step A1, counting resource load conditions of virtual resources of all servers in a cloud computing platform, obtaining predicted resource load conditions of the virtual resources of all servers in the cloud computing platform at the next moment through a load prediction algorithm, screening out virtual machines on a high-load server based on a virtual machine screening algorithm, generating scheduling tasks based on the virtual machines on the high-load server, pushing the virtual machine generated scheduling tasks to a first virtual machine queue, and distributing task category identifiers to all scheduling tasks in the first virtual machine queue.
In the embodiment of the application, referring to fig. 10, a physical resource management monitoring module counts the resource load condition of virtual resources of each server in a cloud computing platform, predicts the predicted resource load condition of the virtual resources of each virtual machine at the next moment through a load prediction algorithm, and determines the predicted resource load condition of the virtual resources of each server in the cloud computing platform at the next moment according to the mapping relationship between the virtual machines and the servers. The physical resource management monitoring module screens out virtual machines on the high-load server based on a virtual machine screening algorithm, generates scheduling tasks based on the virtual machines on the high-load server, pushes the scheduling tasks generated by the virtual machines to the first virtual machine queue, and distributes task category identifiers of an optimization type for each scheduling task in the first virtual machine queue.
Any algorithm capable of determining the load of the server where the virtual machine is located according to the virtual resources occupied by the virtual machine can be used in the present application for the virtual machine screening algorithm, which is not limited in the embodiment of the present application.
And step A2, continuously monitoring the running state of each server in the cloud computing platform, generating scheduling tasks based on all virtual machines borne by the servers when monitoring the conditions that the normal running of the virtual machines is influenced by server faults/downtime and the like in the cloud computing platform, pushing the scheduling tasks to a second virtual machine scheduling queue, and distributing task category identifiers to each scheduling task in the second virtual machine queue.
In the embodiment of the present application, as shown in fig. 11, a node running state monitoring module is configured to monitor the running state of each server in a cloud computing platform continuously, and when the condition that the normal running of a virtual machine is affected by a server failure/downtime in the cloud computing platform is monitored, HA main selection scheduling needs to be performed on all virtual machines carried by the server, scheduling tasks are generated based on all virtual machines carried by the server, the scheduling tasks are pushed to a second virtual machine scheduling queue, and task category identifiers of failure types are allocated to each scheduling task in the second virtual machine queue.
And A3, generating virtual machine scheduling tasks based on the user request, pushing the virtual machine scheduling tasks to a third virtual machine scheduling queue, and distributing task category identifiers of fault types to each scheduling task in the third virtual machine queue.
In the embodiment of the application, as shown in fig. 12, a user may propose specific resource configuration information to a user resource request monitoring module based on a terminal where the user is located according to a resource configuration template provided by a server. The user resource request monitoring module can evaluate whether the current server cluster has enough supply capacity through the admission control unit, and judge whether to receive or reject the user request. For receivable user requests, the user resource request monitoring module generates scheduling tasks corresponding to the virtual machines to be created based on the user requests, pushes the virtual machine scheduling tasks to a third virtual machine scheduling queue, and distributes task category identifiers of resource types for each scheduling task in the third virtual machine queue.
And step A4, storing each scheduling task into a task processing queue, determining a scheduling algorithm corresponding to the scheduling task based on the task category identification of each scheduling task, and performing scheduling processing on the scheduling task according to the scheduling algorithm corresponding to the scheduling task.
In the embodiment of the present application, as shown in fig. 13, a resource integration scheduling module acquires scheduling tasks sent by a physical resource management monitoring module, a node running state monitoring module and a user resource request monitoring module from respective corresponding virtual machine scheduling queues, stores each scheduling task into a task processing queue, determines a scheduling algorithm corresponding to the scheduling task based on a task category identifier of each scheduling task, and performs scheduling processing on the scheduling task according to the scheduling algorithm corresponding to the scheduling task.
And step A5, when the task category of the scheduled task is identified as the scheduled task of the fault type, scheduling the scheduled task.
In the embodiment of the present application, as shown in fig. 14, when the task category of the scheduled task is identified as a scheduled task of a failure type, the resource integration scheduling module starts a scheduling algorithm corresponding to the task category identification of the failure type. Specifically, the resource integration scheduling module firstly accesses the physical resource management monitoring module to check whether the predicted resource load condition of the virtual resource at the next moment is lower or not, and if so, selects the server with the lowest predicted resource load condition of the virtual resource at the next moment from the servers with lower predicted resource load conditions (lower than a first load threshold) of the virtual resource at the next moment as a first target server; if the virtual resource load condition exceeds the second load threshold, the resource integration scheduling module sends a wake-up instruction to a power management module in the server cluster, the power management module sends a start instruction to one of the servers in a dormant or low power consumption state, the dormant or low power consumption state is started, the server to be optimized is screened from the servers exceeding the second load threshold, the scheduling task of which the task category is marked as an optimization type is generated based on the virtual machine on the server to be optimized, and the scheduling task queue of the first virtual machine is added.
And step A6, when the task category of the scheduled task is identified as the scheduled task of the resource type, scheduling the scheduled task.
In the embodiment of the application, when the task category identification of the scheduling task is the scheduling task of the resource type, the resource integration scheduling module starts the scheduling algorithm corresponding to the task category identification of the resource type. Specifically, the resource integration scheduling module server determines a server capable of meeting a target virtual machine generating a resource demand corresponding to a scheduling task from servers in each running state in a server cluster according to the resource demand corresponding to the scheduling task, and takes the server as a target server. The resource integration scheduling module sends a wake-up instruction to a power management module in the server cluster under the condition that a server capable of meeting the resource requirement corresponding to a target scheduling task is not available in the servers in each running state in the server cluster, the power management module sends a start-up instruction to one of the servers in a dormant or low-power consumption state, and the started server serves as a target server.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a virtual machine scheduling device for realizing the above-mentioned virtual machine scheduling method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the one or more virtual machine scheduling devices provided below may be referred to the limitation of the virtual machine scheduling method hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 15, there is provided a virtual machine scheduling apparatus 1500, including: a first determination module 1502, a second determination module 1504, and a scheduling module 1506, wherein:
a first determining module 1502 is configured to determine, according to a task priority, a target task from a task processing queue, where the task processing queue is configured to store tasks, each task having a task category identifier, where the task category identifier is configured to determine a task priority of the task.
A second determining module 1504 is configured to determine a scheduling algorithm corresponding to the target scheduling task based on the task category identifier of the target scheduling task.
And the scheduling module 1506 is configured to schedule the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task.
By adopting the virtual machine scheduling device provided by the embodiment of the disclosure, the scheduling algorithm corresponding to each scheduling task can be distinguished according to the scheduling task priority and the task category identification of each scheduling task in the task processing queue, so that the processing sequence of each scheduling task is determined according to the scheduling task priority under the condition that multiple requirements exist simultaneously, the priority processing of the scheduling task with relatively higher importance can be preferentially ensured, and the high availability of the cloud computing platform is improved.
In one embodiment, the apparatus further comprises:
the receiving module is used for receiving the scheduling task sent by each virtual machine task monitoring module, wherein the scheduling task carries a task category identifier corresponding to the virtual machine task monitoring module;
and the storage module is used for storing the scheduling task into the task processing queue.
In one embodiment, the storage module is specifically configured to:
and adding the scheduled tasks to a task processing queue according to the receiving time of the scheduled tasks and the sequence from the early to the late of the receiving time.
In one embodiment, the storage module is specifically configured to:
determining the scheduling task priority of the scheduling task according to the task category identification of the scheduling task;
determining a storage position of the scheduling task in the task processing queue according to the scheduling task priority of the scheduling task, wherein the scheduling task priority of each scheduling task stored in the task processing queue before the storage position is higher than or equal to the scheduling task priority of the scheduling task, and the scheduling task priority of each scheduling task stored in the task processing queue after the storage position is lower than the scheduling task priority of the scheduling task;
And storing the scheduling task into the task processing queue according to the storage position of the scheduling task in the task processing queue.
In one embodiment, the first determining module 1502 is specifically configured to:
determining a target scheduling task priority from the scheduling task priorities;
traversing the scheduling tasks in the task processing queue from the starting position of the task processing queue until the scheduling tasks corresponding to the target scheduling task priority are traversed, and taking the scheduling tasks corresponding to the target scheduling task priority as target scheduling tasks;
and under the condition that the scheduling task corresponding to the target scheduling task priority is not traversed, determining the next scheduling task priority of the target scheduling task priority from the scheduling task priorities, taking the next scheduling task priority as the target scheduling task priority, and jumping to the step of traversing the scheduling task in the task processing queue from the starting position of the task processing queue.
In one embodiment, the first determining module 1502 is specifically configured to:
and after the scheduling processing of the current scheduling task is completed, taking the scheduling task which is positioned behind the current scheduling task and is adjacent to the current scheduling task in the task processing queue as a target scheduling task.
In one embodiment, the scheduling module 1506 is specifically configured to:
under the condition that the target scheduling task is a fault type scheduling task, carrying out load prediction according to the resource load condition of each server at the current moment to obtain the predicted resource load condition of each server at the next moment;
determining a first target server from the servers according to the predicted resource load condition of the servers at the next moment, wherein the predicted resource load condition corresponding to the target server is smaller than a first load threshold;
and dispatching the target virtual machine corresponding to the target dispatching task to the first target server.
In one embodiment, the scheduling module 1506 is specifically configured to:
under the condition that the first target server does not exist, sequencing all the servers according to the sequence from the big to the small of the resource load condition of the servers at the current moment to obtain a server load sequence;
determining a second target server in each server according to the predicted resource load condition of each server in the server load sequence at the next moment, wherein the predicted resource load condition of the second target server at the next moment is smaller than a second load threshold;
And dispatching the target virtual machine corresponding to the target dispatching task to the second target server.
In one embodiment, the scheduling module 1506 is specifically configured to:
acquiring a resource requirement from the target scheduling task under the condition that the target scheduling task is a scheduling task of a resource type;
determining a target server from all servers according to the resource requirements corresponding to the target scheduling task, wherein the current resource condition of the target server meets the resource requirements corresponding to the target scheduling task;
and responding to the target scheduling task, and creating a target virtual machine corresponding to the target scheduling task in the target server.
The modules in the virtual machine scheduling apparatus may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 16. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data associated with each virtual machine scheduling method. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a virtual machine scheduling method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 16 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (13)

1. A virtual machine scheduling method, the method comprising:
determining a target scheduling task from a task processing queue according to the scheduling task priority, wherein the task processing queue is used for storing the scheduling task, each scheduling task is provided with a task category identification, and the task category identification is used for determining the scheduling task priority of the scheduling task;
Determining a scheduling algorithm corresponding to the target scheduling task based on the task category identification of the target scheduling task;
and carrying out scheduling processing on the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task.
2. The method of claim 1, wherein prior to determining the target scheduled task from the task processing queue based on the scheduled task priority, further comprising:
receiving a scheduling task sent by each virtual machine task monitoring module, wherein the scheduling task carries a task category identifier corresponding to the virtual machine task monitoring module;
and storing the scheduling task into the task processing queue.
3. The method of claim 2, wherein storing the scheduled task into the task processing queue comprises:
and adding the scheduled tasks to a task processing queue according to the receiving time of the scheduled tasks and the sequence from the early to the late of the receiving time.
4. The method of claim 2, wherein storing the scheduled task into the task processing queue comprises:
determining the scheduling task priority of the scheduling task according to the task category identification of the scheduling task;
Determining a storage position of the scheduling task in the task processing queue according to the scheduling task priority of the scheduling task, wherein the scheduling task priority of each scheduling task stored in the task processing queue before the storage position is higher than or equal to the scheduling task priority of the scheduling task, and the scheduling task priority of each scheduling task stored in the task processing queue after the storage position is lower than the scheduling task priority of the scheduling task;
and storing the scheduling task into the task processing queue according to the storage position of the scheduling task in the task processing queue.
5. A method according to claim 3, wherein determining the target scheduled task from the task processing queue based on the scheduled task priority comprises:
determining a target scheduling task priority from the scheduling task priorities;
traversing the scheduling tasks in the task processing queue from the starting position of the task processing queue until the scheduling tasks corresponding to the target scheduling task priority are traversed, and taking the scheduling tasks corresponding to the target scheduling task priority as target scheduling tasks;
And under the condition that the scheduling task corresponding to the target scheduling task priority is not traversed, determining the next scheduling task priority of the target scheduling task priority from the scheduling task priorities, taking the next scheduling task priority as the target scheduling task priority, and jumping to the step of traversing the scheduling task in the task processing queue from the starting position of the task processing queue.
6. The method of claim 4, wherein determining the target scheduled task from the task processing queue based on the scheduled task priority comprises:
and after the scheduling processing of the current scheduling task is completed, taking the scheduling task which is positioned behind the current scheduling task and is adjacent to the current scheduling task in the task processing queue as a target scheduling task.
7. The method according to claim 1, wherein the scheduling the target scheduling task according to the scheduling algorithm corresponding to the target scheduling task includes:
under the condition that the target scheduling task is a fault type scheduling task, carrying out load prediction according to the resource load condition of each server at the current moment to obtain the predicted resource load condition of each server at the next moment;
Determining a first target server from the servers according to the predicted resource load condition of the servers at the next moment, wherein the predicted resource load condition corresponding to the target server is smaller than a first load threshold;
and dispatching the target virtual machine corresponding to the target dispatching task to the first target server.
8. The method of claim 7, wherein the scheduling the target scheduled task according to the scheduling algorithm corresponding to the target scheduled task further comprises:
under the condition that the first target server does not exist, sequencing all the servers according to the sequence from the big to the small of the resource load condition of the servers at the current moment to obtain a server load sequence;
determining a second target server in each server according to the predicted resource load condition of each server in the server load sequence at the next moment, wherein the predicted resource load condition of the second target server at the next moment is smaller than a second load threshold;
and dispatching the target virtual machine corresponding to the target dispatching task to the second target server.
9. The method according to claim 1 or 7, wherein the scheduling the target scheduling task according to the scheduling algorithm corresponding to the target scheduling task includes:
acquiring a resource requirement from the target scheduling task under the condition that the target scheduling task is a scheduling task of a resource type;
determining a target server from all servers according to the resource requirements corresponding to the target scheduling task, wherein the current resource condition of the target server meets the resource requirements corresponding to the target scheduling task;
and responding to the target scheduling task, and creating a target virtual machine corresponding to the target scheduling task in the target server.
10. A virtual machine scheduling apparatus, the apparatus comprising:
the first determining module is used for determining target scheduling tasks from task processing queues according to the scheduling task priorities, wherein the task processing queues are used for storing the scheduling tasks, each scheduling task is provided with a task category identifier, and the task category identifiers are used for determining the scheduling task priorities of the scheduling tasks;
the second determining module is used for determining a scheduling algorithm corresponding to the target scheduling task based on the task category identification of the target scheduling task;
And the scheduling module is used for scheduling the target scheduling task according to a scheduling algorithm corresponding to the target scheduling task.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 9 when the computer program is executed.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 9.
13. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 9.
CN202311040444.3A 2023-08-17 2023-08-17 Virtual machine scheduling method, device, computer equipment and storage medium Pending CN117149382A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311040444.3A CN117149382A (en) 2023-08-17 2023-08-17 Virtual machine scheduling method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311040444.3A CN117149382A (en) 2023-08-17 2023-08-17 Virtual machine scheduling method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117149382A true CN117149382A (en) 2023-12-01

Family

ID=88899870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311040444.3A Pending CN117149382A (en) 2023-08-17 2023-08-17 Virtual machine scheduling method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117149382A (en)

Similar Documents

Publication Publication Date Title
CN112162865B (en) Scheduling method and device of server and server
CN103593242B (en) Resource sharing control system based on Yarn frameworks
CN111818159B (en) Management method, device, equipment and storage medium of data processing node
CN115328663B (en) Method, device, equipment and storage medium for scheduling resources based on PaaS platform
CN108182105B (en) Local dynamic migration method and control system based on Docker container technology
CN110221920B (en) Deployment method, device, storage medium and system
US11838384B2 (en) Intelligent scheduling apparatus and method
WO2022188578A1 (en) Method and system for multiple services to share same gpu, and device and medium
Adhikary et al. Quality of service aware cloud resource provisioning for social multimedia services and applications
CN111464659A (en) Node scheduling method, node pre-selection processing method, device, equipment and medium
CN106528288A (en) Resource management method, device and system
WO2021143590A1 (en) Distributed container image construction scheduling system and method
CN115334082A (en) Load balancing method, device, computer equipment, storage medium and product
CN117076133B (en) Cloud game platform heterogeneous resource allocation method, computer device and storage medium
Garg et al. Optimal virtual machine scheduling in virtualized cloud environment using VIKOR method
CN113742059B (en) Task allocation method, device, computer equipment and storage medium
WO2022151951A1 (en) Task scheduling method and management system
CN114003238B (en) Container deployment method, device, equipment and storage medium based on transcoding card
CN117149382A (en) Virtual machine scheduling method, device, computer equipment and storage medium
CN111556126B (en) Model management method, system, computer device and storage medium
US10992517B1 (en) Dynamic distributed execution budget management system
CN114489978A (en) Resource scheduling method, device, equipment and storage medium
CN112860442A (en) Resource quota adjusting method and device, computer equipment and storage medium
Wei et al. A novel scheduling mechanism for hybrid cloud systems
Skulysh et al. Management of multiple stage queuing systems

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