CN114880092A - Application scheduling method, device and equipment - Google Patents

Application scheduling method, device and equipment Download PDF

Info

Publication number
CN114880092A
CN114880092A CN202210489692.5A CN202210489692A CN114880092A CN 114880092 A CN114880092 A CN 114880092A CN 202210489692 A CN202210489692 A CN 202210489692A CN 114880092 A CN114880092 A CN 114880092A
Authority
CN
China
Prior art keywords
host
application
preset
target
migrated
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
CN202210489692.5A
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.)
Hangzhou Dt Dream Technology Co Ltd
Original Assignee
Hangzhou Dt Dream Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dt Dream Technology Co Ltd filed Critical Hangzhou Dt Dream Technology Co Ltd
Priority to CN202210489692.5A priority Critical patent/CN114880092A/en
Publication of CN114880092A publication Critical patent/CN114880092A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3433Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment for load management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • 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)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the specification discloses an application scheduling method, device and equipment. The method comprises the following steps: in the host cluster, monitoring the occupation condition of a host aiming at preset resources; monitoring the occupation condition of the application in the host aiming at the preset resources under the condition that the average occupancy rate of the preset resources of any host in the first preset time is greater than a first preset host threshold value; under the condition that at least two target applications exist in the host computer, determining applications to be migrated in the at least two target applications of the host computer; the average occupancy rate of the target application on preset resources in a second preset duration is greater than a first preset application threshold; and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.

Description

Application scheduling method, device and equipment
Technical Field
The embodiment of the specification relates to the technical field of computer application, in particular to an application scheduling method, device and equipment.
Background
Currently, each host in a host cluster may be deployed with multiple applications in order to provide multiple services.
In the related art, in order to balance the occupation situation of the resource on each host, each application may be deployed on each host as evenly as possible according to the static occupation situation of the same resource of each application, in consideration of the fact that different applications occupy the same resource differently, for example, computing resource, storage resource, network interaction resource, and the like.
However, in the actual operation process, dynamic resource occupation often exists. For example, during peak traffic periods, an application may require more network interaction resources; during the low-traffic period, the application needs less network interaction resources.
Due to the fact that actual resource occupation conditions are difficult to predict, the situation that resource occupation among hosts is unbalanced often occurs, and therefore the resource utilization rate of the host cluster is low.
Disclosure of Invention
In order to solve the technical problem, embodiments of the present specification provide an application scheduling method, an application scheduling apparatus, and an application scheduling device. The technical scheme is as follows.
A first aspect of an embodiment of the present specification provides an application scheduling method, which is applied to a scheduling module that interfaces a host cluster; the method comprises the following steps:
in the host cluster, monitoring the occupation condition of a host aiming at preset resources;
monitoring the occupation condition of the application in the host aiming at the preset resources under the condition that the average occupancy rate of the preset resources of any host in the first preset time is greater than a first preset host threshold value;
under the condition that at least two target applications exist in the host computer, determining applications to be migrated in the at least two target applications of the host computer; the average occupancy rate of the target application on preset resources in a second preset duration is greater than a first preset application threshold;
and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
Optionally, determining, in the at least two target applications of the host, an application to be migrated in the case that it is monitored that the at least two target applications exist in the host includes:
under the condition that N target applications exist in the host computer, determining N-1 target applications in the N target applications as applications to be migrated; n is more than or equal to 2.
Optionally, the determining N-1 target applications of the N target applications as applications to be migrated includes:
determining other N-1 target applications except the target application with the highest average occupancy rate of preset resources in the N target applications as applications to be migrated;
the migrating any application to be migrated to any other host without a target application includes:
circularly executing the following steps until a preset circulation stop condition is met: migrating any application to be migrated in the current host to any other host without the target application;
the preset cycle stop condition includes: and completing the migration of all the applications to be migrated, or enabling each current other host in the host cluster to have the target application.
Optionally, the method further comprises:
under the conditions that the target application exists in each other host of the host cluster and the idle host exists in the host cluster, any application to be migrated is migrated to any idle host;
and the average occupancy rate of preset resources of the idle host in a third preset time is less than a second preset host threshold.
Optionally, the method further comprises:
aiming at the hosts in the host cluster, adding a preset label to any application under the condition that the average occupancy rate of preset resources in a second preset time of any application in any host is greater than a first preset application threshold value; the preset tag is used for marking a target application.
Optionally, the method further comprises:
and for the hosts in the host cluster, under the condition that the average occupancy rate of any target application to preset resources within a fourth preset time is monitored to be less than a second preset application threshold value, the target application is determined as a non-target application again.
Optionally, the method further comprises:
and under the condition that any application to be migrated is monitored to be migrated successfully, determining that the application to be migrated cannot be migrated again within a fifth preset time after the current time.
A second aspect of the embodiments of the present specification provides an application scheduling method, which is applied to a scheduling module that interfaces a host cluster; the method comprises the following steps:
monitoring the occupation condition of the application on the host aiming at the preset resource in the host cluster;
under the condition that at least two target applications exist in any host, determining applications to be migrated in the at least two target applications of the host; the average occupancy rate of the target application on preset resources in a second preset duration is greater than a first preset application threshold;
and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
A third aspect of the embodiments of the present specification provides an application scheduling apparatus, which is applied to a scheduling module that interfaces a host cluster; the device comprises:
the host monitoring unit is used for monitoring the occupation condition of the host aiming at the preset resources in the host cluster;
the first application monitoring unit is used for monitoring the occupation condition of the application in the host aiming at the preset resource under the condition that the average occupancy rate of the preset resource of any host in a first preset time length is monitored to be greater than a first preset host threshold value;
the first migration unit is used for determining an application to be migrated from at least two target applications of the host under the condition that the existence of the at least two target applications in the host is monitored; the average occupancy rate of the target application on preset resources in a second preset duration is greater than a first preset application threshold; and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
Optionally, the first application monitoring unit is configured to determine, when it is monitored that N target applications exist in the host, N-1 target applications in the N target applications as applications to be migrated; n is more than or equal to 2.
Optionally, the first application monitoring unit is configured to determine, as applications to be migrated, N-1 other target applications, of the N target applications, that are different from the target application with the highest average occupancy rate of preset resources;
the first migration unit is used for circularly executing the following steps until a preset circulation stop condition is met: migrating any application to be migrated in the current host to any other host without the target application;
the preset cycle stop condition includes: and completing the migration of all the applications to be migrated, or enabling each current other host in the host cluster to have the target application.
Optionally, the first migration unit is further configured to, when it is monitored that a target application exists in each of other hosts of the host cluster and an idle host exists in the host cluster, migrate any application to be migrated to any idle host;
and the average occupancy rate of preset resources of the idle host in a third preset time is less than a second preset host threshold.
Optionally, the apparatus further includes a tag unit, configured to add, for a host in the host cluster, a preset tag to the application when it is monitored that an average occupancy rate of a preset resource in a second preset duration of any application in any host is greater than a first preset application threshold; the preset tag is used for marking a target application.
Optionally, the apparatus further includes an updating unit, configured to, for a host in the host cluster, re-determine, when it is monitored that an average occupancy rate of any target application for a preset resource within a fourth preset duration is smaller than a second preset application threshold, the target application as a non-target application.
Optionally, the first migration unit is further configured to determine that the application to be migrated cannot be migrated again within a fifth preset time period after the current time when it is monitored that any application to be migrated migrates successfully.
A fourth aspect of the embodiments of the present specification provides an application scheduling apparatus, which is applied to a scheduling module that interfaces a host cluster; the device comprises:
the second application monitoring unit is used for monitoring the occupation condition of the application in the host aiming at the preset resource in the host cluster;
the second migration unit is used for determining the application to be migrated in the at least two target applications of any host under the condition that the existence of the at least two target applications in the host is monitored; the average occupancy rate of the target application on preset resources in a second preset duration is greater than a first preset application threshold; and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
A fifth aspect of embodiments herein provides an electronic device, including a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the method of any of the preceding embodiments.
A sixth aspect of the embodiments of the present specification provides a machine-readable storage medium, on which a program is stored, the program, when executed by a processor, implementing a method according to any one of the embodiments described above.
According to the technical scheme, the target application occupying more preset resources is migrated to other hosts without the target application, so that the utilization rate of the preset resources in the host cluster can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present specification, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a schematic flowchart of an application scheduling method provided in an embodiment of the present specification;
fig. 2 is a schematic flowchart of another application scheduling method provided in an embodiment of the present specification;
fig. 3 is a schematic diagram illustrating a variation of CPU utilization of a host according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating a variation of utilization rate of an application CPU according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an application scheduling provided by an embodiment of the present specification;
FIG. 6 is a schematic diagram of another application scheduling provided by an embodiment of the present specification;
fig. 7 is a schematic structural diagram of an application scheduling apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of another application scheduling apparatus provided in an embodiment of the present specification;
fig. 9 is a schematic structural diagram of an apparatus for configuring a method according to an embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present specification, the technical solutions in the embodiments of the present specification will be described in detail below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all the embodiments. All other embodiments derived by one of ordinary skill in the art from the embodiments given herein are intended to fall within the scope of the disclosure.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various objects, this information should not be limited to these terms. These terms are only used to distinguish objects of the same type from each other. For example, a first object may also be referred to as a second object, and similarly, a second object may also be referred to as a first object, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Currently, each host in a host cluster may be deployed with multiple applications in order to provide multiple services.
The host cluster may be a server cluster, so as to provide multiple services to users. Services such as payment services, login services, registration services, query information services, and the like.
In the related art, in order to balance the occupation situation of the resource on each host, each application may be deployed on each host as evenly as possible according to the static occupation situation of the same resource of each application, in consideration of the fact that different applications occupy the same resource differently, for example, computing resource, storage resource, network interaction resource, and the like.
For example, an application that initially occupies more storage resources may often be deployed on the same host as other applications that initially occupy less storage resources.
For another example, for an application that initially occupies more network interaction resources, it may be deployed on the same host as other applications that initially occupy less network interaction resources.
However, in the actual operation process, dynamic resource occupation often exists. For example, during peak traffic periods, an application may require more network interaction resources; during the low-traffic period, the application needs less network interaction resources.
Due to the fact that actual resource occupation conditions are difficult to predict, the situation that resource occupation among hosts is unbalanced often occurs, namely, the situation that part of host resources in a host cluster are in shortage, and the other part of host resources are idle, and therefore the resource utilization rate of the host cluster is low.
For example, for application 1 and application 2 on host 1, application 1 is used to provide bus payment services and application 2 is used to provide meal payment services. The application 1 initially occupies more network interaction resources, and the application 2 initially occupies less network interaction resources, so that the applications are all deployed on the host 1.
However, in the process of actually providing the service by the application, the resource occupied by each application is dynamically changed.
In the morning, since more passengers are on the bus, the application 1 occupies more network interactive resources, and the breakfast is usually provided relatively less, and the application 2 occupies less network interactive resources.
At noon, because fewer passengers take buses, the application 1 occupies fewer network interaction resources, lunch providing situations are usually relatively more, and the application 2 occupies more network interaction resources.
At night, because more passengers take buses to get off duty, the application 1 occupies more network interaction resources, the supper providing condition is usually relatively more, and the application 2 occupies more network interaction resources.
It can be seen that the network interaction resources in the host 1 can be normally processed in the morning and at noon, but in the evening, the application 1 and the application 2 both need to occupy more network interaction resources, so the network interaction resources on the host 1 are in short supply.
While host 2 typically has more spare network interaction resources resulting in a lower utilization of the network interaction resources in host 2.
In order to solve the above technical problem, an embodiment of the present specification provides an application scheduling method.
In the method, the application can be migrated between the hosts, and particularly, the application on the host with insufficient resources can be dispatched to the host with idle resources, so that the resource utilization rate of the host cluster is improved.
Alternatively, the application may be migrated in the form of an application container.
The following explains an application scheduling method provided in an embodiment of the present specification in detail with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of an application scheduling method provided in an embodiment of the present disclosure.
Optionally, the method may be applied to a scheduling module interfacing the host cluster. The scheduling module may be configured to schedule an application on a host in the docked host cluster, and the process of the method is not limited to a specific scheduling manner, and the scheduling module may send a scheduling request to the host, and the host migrates the application to other hosts according to the scheduling request.
In addition, it should be noted that the process of the method is to perform application scheduling on a host resource (i.e., a preset resource), so as to improve the utilization rate of the preset resource. The preset resource may specifically be a storage resource, a computing resource, a network interaction resource, a CPU resource, and the like, and the embodiment of the present specification is not limited as long as the host resource occupied by the application is used.
It can be understood that the method flow may be adopted to perform application scheduling for a plurality of host resources, or for each host resource.
In addition, the process of the method is directed to one host, and the application scheduling on the host is described to other hosts.
The method may include the following steps.
S101: in the host cluster, the occupation condition of the host aiming at the preset resource is monitored.
S102: and under the condition that the average occupancy rate of the preset resources of any host within the first preset time is greater than the first preset host threshold value, monitoring the occupancy condition of the application in the host aiming at the preset resources.
S103: and under the condition that at least two target applications exist in the host, determining the application to be migrated in the at least two target applications of the host.
Optionally, the average occupancy rate of the preset resource in the second preset duration may be greater than the first preset application threshold by the target application. The target application is an application that occupies a large amount of preset resources, and specifically, the target application may be an application that an average occupancy rate of the preset resources is greater than a first preset application threshold within a second preset duration.
S104: and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
The method comprises the steps of scheduling and migrating the target application occupying more preset resources, and migrating the target application to other hosts without the target application. And comparing the other hosts without the target application with the hosts with at least two target applications, wherein the residual preset resources are more.
Therefore, the method and the process can improve the utilization rate of the preset resources in the host cluster.
The respective steps are explained in detail below.
S101: in the host cluster, the occupation condition of the host aiming at the preset resource is monitored.
For the preset resources, the method flow does not limit the specific preset resources, as long as the host resources occupied by the application are used. For example, the application providing service needs to use CPU resources, memory resources, network traffic resources, and the like.
The process flow of the method is also not limited to the specific monitored host.
Optionally, occupancy of one or more hosts in the host cluster for a preset resource may be monitored.
Optionally, occupation of all or part of the hosts in the host cluster with respect to the preset resource may be monitored.
The method and the device have the advantages that the occupation situation of all the hosts in the host cluster aiming at the preset resources is monitored, application scheduling can be accurately carried out in more detail, and the utilization rate of the host cluster aiming at the preset resources is improved.
S102: and under the condition that the average occupancy rate of the preset resources of any host within the first preset time is greater than the first preset host threshold value, monitoring the occupancy condition of the application in the host aiming at the preset resources.
In the monitored hosts, if the occupation situation of the preset resources on any host is monitored to be tense and the preset resources are less remained, the host can be determined to possibly need to be scheduled and applied so as to reduce the occupation situation of the preset resources on the host. Therefore, the monitoring of the occupation of the application in the host for the preset resource can be further started.
Optionally, the occupation condition of the preset resource on the host may be determined by whether the average occupancy rate of the preset resource in the first preset duration of the host is greater than a first preset host threshold.
In addition, optionally, for the first preset duration, since the scheduling module continuously monitors the occupation condition of the preset resource by the host, monitoring that the average occupancy rate of the preset resource of any host in the first preset duration is greater than the first preset host threshold specifically may include: and monitoring the condition that the average occupancy rate of the preset resources of any host in a first preset time before the current moment is greater than a first preset host threshold value.
Optionally, the scheduling module may continuously monitor the occupancy of the host for the preset resource, and specifically, may continuously monitor the occupancy or average occupancy of the host for the preset resource, so as to determine the occupancy of the host for the preset resource.
The monitoring burden of the scheduling module can be reduced by monitoring the preset resource occupation condition of the host, and the host needing to be scheduled can be conveniently and accurately determined by the scheduling module.
The process of the method is also not limited to the application in the host being monitored.
Optionally, occupancy of a preset resource by one or more applications in the host may be monitored.
Optionally, the occupancy of all or part of the applications in the host for the preset resources may be monitored.
The occupation situation of all the applications in the host aiming at the preset resources is monitored, the application scheduling can be accurately carried out in more detail, and the utilization rate of the host cluster aiming at the preset resources is improved.
S103: and under the condition that at least two target applications exist in the host computer, determining the application to be migrated in the at least two target applications of the host computer.
With respect to the target application, optionally, the target application may have an average occupancy rate of the preset resource within the second preset time period greater than the first preset application threshold.
The target application may be an application occupying more preset resources, and specifically, the target application may be an application in which an average occupancy rate of the preset resources is greater than a first preset application threshold within a second preset duration.
Whether the target application exists in the host is monitored, specifically, whether the target application occupying more preset resources exists in the host can be determined by monitoring the occupation condition of the preset resources of the application in the host.
Optionally, for a host in the host cluster, under the condition that it is monitored that the average occupancy rate of the preset resource in the second preset duration of any application is greater than the first preset application threshold, determining the application as the target application.
In addition, optionally, for the second preset duration, since the scheduling module continuously monitors the occupation situation of the preset resource for the application in the host, monitoring that at least two target applications exist in the host may specifically include: and monitoring that at least two applications exist in the host, wherein the average occupancy rate of preset resources in a second preset time before the current time is greater than a first preset application threshold value.
In an alternative embodiment, the target application may be marked by a preset tag, so that each host in the subsequent host cluster may conveniently identify the target application.
Optionally, for the hosts in the host cluster, in the case that it is monitored that the average occupancy rate of the preset resources in the second preset duration of any application in any host is greater than the first preset application threshold, a preset tag may be added for the application; the preset tag may be used to mark the target application.
Accordingly, the target application may also reduce the occupied preset resources in the actual operation, and no longer occupy more preset resources, and may be determined as the non-target application, specifically, the normal application. The preset tag may specifically be deleted.
Therefore, optionally, for the hosts in the host cluster, in a case that it is monitored that the average occupancy rate of any target application for the preset resource within the fourth preset time period is smaller than the second preset application threshold, the target application is determined as the non-target application again. Optionally, when the preset tag is attached to the target application, the determining, by the application server, the target application as a non-target application may specifically include: and deleting the preset label attached to the target application.
Wherein, optionally, the first preset application threshold may be greater than or equal to the second preset application threshold.
In addition, optionally, for the fourth preset duration, since the scheduling module continuously monitors the occupation situation of the application in the host for the preset resource, monitoring that the average occupancy rate of any target application for the preset resource within the fourth preset duration is smaller than the second preset application threshold may specifically include: and monitoring the condition that the average occupancy rate of any target application to the preset resources in a fourth preset time before the current time is less than a second preset application threshold.
In the embodiment, the target application in the host can be accurately updated by monitoring the application, so that the accuracy of the target application is improved, and the subsequent application scheduling is facilitated.
Regarding the scheduling opportunity, optionally, under the condition that it is monitored that at least two target applications exist in the host, it may be determined that a plurality of applications exist in the host, there is contention for a preset resource, and there may be preemption of the preset resource.
In order to reduce contention between different applications in the same host for a preset resource, application scheduling may be performed to schedule the applications to other hosts, thereby reducing contention and improving processing efficiency of the applications.
With respect to the application to be migrated, the embodiments of the present specification do not limit the way in which the application to be migrated is specifically determined.
Alternatively, all target applications may be determined as applications to be migrated.
Optionally, in the case that it is monitored that at least two target applications exist in the host, determining an application to be migrated from the at least two target applications of the host may include: under the condition that N target applications exist in the host computer, determining N-1 target applications in the N target applications as applications to be migrated; n is more than or equal to 2.
In this embodiment, a target application may be reserved in the host without scheduling, so that scheduling difficulty may be reduced, and subsequent application scheduling may be facilitated.
Optionally, the target application occupying the most preset resources can be reserved in the host, so as to reduce the burden of other hosts after the application is scheduled.
Therefore, optionally, determining N-1 target applications of the N target applications as the applications to be migrated may include: and determining other N-1 target applications except the target application with the highest average occupancy rate of preset resources in the N target applications as the applications to be migrated.
S104: and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
With respect to application migration, in an alternative embodiment, the application on the host in the host cluster may be specifically a containerized application, so as to facilitate application migration. The application container in which the application resides may be migrated in particular.
Regarding other hosts migrating into the application, in an optional embodiment, in order to reduce contention for the preset resource among different applications and improve processing efficiency of the application, after determining the application to be migrated, another host that does not have the target application may also be determined as a migration target host, that is, one application to be migrated may be migrated to another host that does not have the target application, so that the possibility that contention for the preset resource occurs in the other host migrated into the application after migrating the application is reduced.
Specifically, after a certain other host without the target application is migrated into one application to be migrated, the other host also has the target application, so that the other application to be migrated is not migrated in the application scheduling, and the possibility of contention for the preset resource by the other host is further reduced.
Optionally, in order to facilitate monitoring whether the target application exists in other hosts of the host cluster, the scheduling module may monitor an occupation situation of the host application in the host cluster for the preset resource, so as to facilitate determining the target application in the host cluster.
Optionally, the occupation situation of each application on each host in the host cluster for the preset resource may be monitored, so as to improve the accuracy and comprehensiveness of the target application.
In an alternative embodiment, migrating any application to be migrated to any other host where no target application exists is described in S104.
It should be noted that, as long as one application to be migrated is migrated to another host that does not have the target application, the utilization rate of the host cluster for the preset resource may be improved, contention of the host for the preset resource in S103 is reduced, and the processing efficiency of the application is improved.
In order to further improve the utilization rate of the host cluster for the preset resource, optionally, the multiple applications to be migrated may be migrated to different other hosts without the target application.
On one hand, due to the fact that the plurality of applications to be migrated are migrated, the situation that the preset resources of the host in the S103 are in short supply can be relieved, and the utilization rate of the host cluster for the preset resources can be improved. On the other hand, different applications to be migrated are respectively migrated to different other hosts without the target application, so that the possibility that the other hosts migrated to the applications to be migrated compete for the preset resources after the applications are migrated can be reduced.
Under the condition of migrating a plurality of applications to be migrated, the flow of the method does not limit the relationship between the migration of different applications to be migrated. Alternatively, the migration may be performed in parallel or in series. For serial migration, the specific migration order is also not limited.
Optionally, when N-1 target applications of the N target applications are determined as applications to be migrated, N-1 other hosts without target applications may be determined in the host cluster for the determined N-1 applications to be migrated, so that the N-1 applications to be migrated may be migrated to different other hosts without target applications, respectively. N is more than or equal to 2.
Therefore, optionally, migrating any application to be migrated to any other host where no target application exists may include: and determining N-1 other hosts without the target application in the host cluster, and respectively migrating the N-1 applications to be migrated to different other hosts without the target application.
Optionally, the applications to be migrated may also be migrated one by one, specifically, migrating any application to be migrated to any other host where the target application does not exist may include: circularly executing the following steps until a preset circulation stop condition is met: and migrating any application to be migrated in the host to any other host without the target application.
After one application to be migrated is migrated each time, the number of the current applications to be migrated of the host can be reduced by one.
Specifically, the loop may be stopped until all the applications to be migrated are migrated, or until the loop is stopped when each of the other hosts in the host cluster currently has the target application. Alternatively, the preset cycle stop condition may include: and all the applications to be migrated are migrated, or target applications exist in each current other host in the host cluster.
Alternatively, in the case of migrating applications to be migrated one by one, the order of migration may be further determined.
Specifically, the current occupancy rate or the average occupancy rate of the preset resource may be determined, so that scheduling is facilitated.
Optionally, migrating any application to be migrated to any other host where the target application does not exist may include: circularly executing the following steps until a preset circulation stop condition is met: and for the application to be migrated in the current host, migrating the application to be migrated with the highest average occupancy rate of the current preset resources to any other host without the current target application.
After one application to be migrated is migrated each time, the number of the current applications to be migrated of the host can be reduced by one.
Specifically, the loop may be stopped until all the applications to be migrated are migrated, or until the loop is stopped when the target application exists in each of the other hosts in the host cluster. Alternatively, the preset cycle stop condition may include: and all the applications to be migrated are migrated, or target applications exist in each current other host in the host cluster.
Since the application to be migrated with the highest average occupancy rate of the preset resources is migrated first, the preset resource load of the host in S103 can be reduced as soon as possible.
Optionally, in each cycle, the application to be migrated with the lowest average occupancy rate of the current preset resources may also be migrated to any other host where the target application does not exist currently.
However, the flow of the method is not limited to a specific determination method with respect to the host to which the application migrates.
Optionally, for other hosts without the target application, before migrating the application to be migrated, one other host without the target application may be randomly selected for migration, one other host without the target application may be selected for migration according to a certain preset order, or one other host without the target application and meeting a preset condition may be selected for migration.
The preset sequence may be, for example, a preset sequence before the host exists in the host cluster, specifically, a preset sequence obtained by sequencing from a maximum to a minimum according to the remaining amount of the preset resource, or a preset sequence obtained by sequencing from a maximum to a minimum according to the total amount of the preset resource.
The preset condition is, for example, that the remaining amount of the preset resource is greater than a preset threshold.
It should be noted that, in the host cluster, there may be a case where a target application exists in each of the other hosts, so that application migration cannot be performed temporarily.
In this case, optionally, application scheduling may not be continued, thereby reducing the possibility of contention for the preset resource.
Optionally, the hosts with more preset resources than the remaining hosts may be further selected for migration, so as to improve the utilization rate of the preset resources.
Optionally, when it is monitored that the target application exists in each of the other hosts of the host cluster and it is monitored that the idle host exists in the host cluster, any application to be migrated is migrated to any idle host.
Optionally, specifically migrating any application to be migrated to any idle host may include migrating one or more applications to be migrated to an idle host.
Since each other host of the host cluster has the target application, the problem of competition for preset resources may not be considered for the moment, that is, a plurality of applications to be migrated may be migrated to the idle host.
Of course, alternatively, a plurality of applications to be migrated may also be migrated to different idle hosts.
For a specific explanation, see above.
Optionally, migrating any application to be migrated to any idle host may include: circularly executing the following steps until a preset circulation stop condition is met: and migrating any application to be migrated in the current host to any idle host.
Optionally, the preset cycle stop condition includes: and all the applications to be migrated are migrated, or target applications exist in each current other host in the host cluster.
In this case, for an idle host, after migrating a certain application to be migrated, the idle host may still be the idle host.
The idle host may be a host with a large remaining preset resource.
Optionally, the average occupancy rate of the preset resources of the idle host within the third preset duration is less than the second preset host threshold. Specifically, the idle host may be a host whose average occupancy rate of the preset resource is less than the second preset host threshold within the third preset duration.
Optionally, for the third preset duration, the idle host may be a host whose average occupancy rate of the preset resource in the third preset duration before the current time is less than the second preset host threshold.
Regarding the second preset host threshold, the second preset host threshold may be dynamically set, and optionally, may be the current occupancy rate or the average occupancy rate of the host for the preset resource in S103. Therefore, as long as the preset resource occupancy rate of any idle host is smaller than that of the host, an application to be migrated can be migrated to the idle host.
Optionally, when the host migrates any application to be migrated, the occupancy rate of the host for the preset resource may be reduced, and accordingly, the second preset host threshold may also be reduced.
Optionally, the second preset host threshold may be less than or equal to the first preset host threshold.
The selection of the specific idle host can be referred to above, and this embodiment is not limited.
In addition, in an alternative embodiment, in order to reduce the migration frequency of the application and reduce the possibility of reducing the processing efficiency caused by the migration of the application, in the case that it is monitored that any application to be migrated is migrated successfully, it is determined that the application to be migrated cannot be migrated again within a fifth preset time period after the current time.
The method comprises the steps of scheduling and migrating the target application occupying more preset resources, and migrating the target application to other hosts without the target application. And comparing the other hosts without the target application with the hosts with at least two target applications, wherein the residual preset resources are more.
Therefore, the method and the process can improve the utilization rate of the preset resources in the host cluster.
In addition, the method and the process can also reduce the competition for the preset resources and improve the processing efficiency of the application by scheduling at least two target applications competing for the preset resources in the host.
The embodiment of the specification also provides another method embodiment. The scheduling module can directly monitor the occupation condition of the application on the host computer for the preset resources.
Fig. 2 is a schematic flowchart of another application scheduling method provided in the embodiment of the present disclosure.
The method can be applied to a scheduling module of a docking host cluster.
The method may include the following steps.
S201: in the host computer cluster, the occupation condition of the application on the host computer aiming at the preset resource is monitored.
S202: under the condition that at least two target applications exist in any host, determining the application to be migrated in the at least two target applications of the host.
Optionally, the average occupancy rate of the preset resource in the second preset duration of the target application is greater than the first preset application threshold.
S203: and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
In the embodiment, the application scheduling can be carried out more comprehensively, accurately and quickly by directly monitoring the preset resource occupation condition of the host application.
Optionally, the occupation situation of one or more applications on one or more hosts for the preset resources may be monitored.
Alternatively, the occupation situation of all applications on all hosts in the host cluster for the preset resource can be monitored.
For further explanation of this embodiment, reference may be made to the above explanation of the method flows of S101 to S104.
For the convenience of understanding, the embodiment of the specification also provides a specific method embodiment.
Kubernetes (k 8s for short) is a container cluster management system opened by Google, and provides a series of complete functions such as deployment and operation, resource scheduling, service discovery, dynamic expansion and contraction and the like for containerized applications on the basis of Docker technology, so that the convenience of large-scale container cluster management is improved.
By default k8s can schedule applications to run on any host node in the host cluster, depending on the host node resource conditions.
Due to different service scenarios of application implementation, requirements for resources are different, for example, a large amount of CPU resources are consumed by a large amount of application computation, more memory is required by some implementation caching mechanisms, and the like, and if k8s schedules a plurality of applications consuming the same type of resources to the same host node, contention of the applications for the resources occurs, and problems such as reduction in processing performance occur.
The method may include the following steps.
A monitoring system is deployed in the k8s cluster, the resource use condition of the application is continuously collected, and the resource indexes of the application, such as CPU use rate, memory use rate, network flow and the like, are mainly concerned.
Defining the judgment standard of the application type, for example, if the average CPU utilization rate in x minutes exceeds y%, defining the application as CPU consumption type; defining the application as a memory consumption type if the average memory usage rate in x minutes exceeds y%; and if the average network flow exceeds y MB/s within x minutes of the application, the application is defined as a network IO consumption type.
And when the application is deployed, the anti-affinity strategy of the container pod can be configured, so that the same type of application is prevented from running on the same host as much as possible.
One application may simultaneously appear in multiple types, and the application type may change continuously with the business process scenario. Therefore, a scheduling module is needed to automatically execute scheduling according to the application type, taking CPU-consuming application scheduling as an example, the steps are as follows:
a. inquiring the resource use conditions of all hosts in the cluster, judging through a monitoring rule, if a host with higher CPU use rate exists, indicating that CPU resource competition possibly exists on the host, and then starting to execute the following scheduling strategy.
Fig. 3 is a schematic diagram illustrating a variation of the usage rate of a host CPU according to an embodiment of the present disclosure. Wherein it is detected at the first moment that host a has been using more than 80% CPU for 15 consecutive minutes.
b. The application currently running on the host is obtained, for example, three applications A1/A2/A3 currently exist.
c. And inquiring the current resource use conditions of all the applications, and determining the type of the application according to the judgment standard defined in 2. For example, the determination condition is that the CPU usage rate exceeds 80% for 15 minutes.
Fig. 4 is a schematic diagram illustrating a variation of usage rate of an application CPU according to an embodiment of the present disclosure. Wherein the CPU usage of applications A1 and A2 was determined at the second time to last more than 80% for 15 minutes, while A3 did not exceed 80%. Therefore, the applications a1 and a2 can be determined to be CPU consuming.
d. For an application determined to be CPU consuming, the tag of the application container Pod, i.e., app _ type _ CPU: "true" indicates that the application is CPU consuming.
e. If there is only one CPU consuming application on host a, and therefore there is no CPU resource contention, as long as there is app _ type _ CPU on application Pod: the "true" tag may also prevent other CPU consuming applications from being scheduled to the host, and may not necessarily trigger application migration.
If there are multiple CPU consuming applications, there may be resource contention between the applications, requiring rescheduling of the applications.
In this case, an application with a low CPU occupancy rate and consuming CPU may be selected for migration, that is, the label configured by the default for updating the application is: app _ type _ cpu: "true".
Updating the deployment tag triggers rescheduling of the application pod, and the scheduled pod also has app _ type _ cpu: the "true" tag.
At this time, the scheduling mechanism of k8s will re-determine the execution host of the application, and since the anti-affinity policy has been configured, k8s will not schedule the pod as far as possible until the application having app _ type _ cpu: and the "true" label is applied on the host computer, so that the competition condition of CPU resources is relieved.
Fig. 5 is a schematic diagram of an application scheduling principle provided in an embodiment of the present specification.
Since the application a1 is migrated and the host a and the host C already run the applications a2 and C2, both having the app _ type _ cpu ═ true tag, according to the anti-affinity policy, k8s does not preferentially select the host a and the host C as the running hosts of the application a1, but preferentially selects the host B for scheduling.
f. In order to avoid frequent migration of applications, after each migration action, at least x minutes are required to perform the next migration action on the same application.
g. A reverse rule may also be configured to cancel the resource type tag of an application, for example, applying CPU usage for x minutes less than y%. After the tag is removed, the application no longer has resource contention with other applications, and k8s reschedules the other resource contention applications to the host on which the application is located.
Fig. 6 is a schematic diagram of another application scheduling provided in the embodiment of the present specification.
Wherein, application a1 may be allowed to reschedule new CPU consuming application C3 from host C to host B for execution since it is no longer a CPU consuming application.
Corresponding to the method embodiment, the embodiment of the present specification also provides a corresponding device embodiment.
Fig. 7 is a schematic structural diagram of an application scheduling apparatus according to an embodiment of the present disclosure.
The apparatus may be applied to a scheduling module that interfaces a host cluster. The apparatus may include the following elements.
A host monitoring unit 701, configured to monitor an occupation situation of a host for a preset resource in the host cluster.
The first application monitoring unit 702 is configured to monitor an occupation situation of an application in a host for a preset resource when it is monitored that an average occupancy rate of the preset resource in a first preset duration of any host is greater than a first preset host threshold.
A first migration unit 703, configured to determine, in the at least two target applications of the host, an application to be migrated, when it is monitored that the at least two target applications exist in the host; the average occupancy rate of the target application on preset resources in a second preset duration is greater than a first preset application threshold; and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
Optionally, the first application monitoring unit 702 is configured to determine, when it is monitored that N target applications exist in the host, N-1 target applications in the N target applications as applications to be migrated; n is more than or equal to 2.
Optionally, the first application monitoring unit 702 is configured to determine, as the application to be migrated, N-1 other target applications, of the N target applications, that are different from the target application with the highest average occupancy rate of preset resources.
The first migration unit 703 is configured to cyclically execute the following steps until a preset cycle stop condition is met: and migrating any application to be migrated in the host to any other host without the target application.
The preset cycle stop condition includes: and completing the migration of all the applications to be migrated, or enabling each current other host in the host cluster to have the target application.
Optionally, the first migration unit 703 is further configured to, when it is monitored that a target application exists in each of other hosts of the host cluster, and it is monitored that an idle host exists in the host cluster, migrate any application to be migrated to any idle host.
And the average occupancy rate of preset resources of the idle host in a third preset time is less than a second preset host threshold.
Optionally, the apparatus further includes a tag unit 704, configured to add, for the hosts in the host cluster, a preset tag for any application in any host when it is monitored that an average occupancy rate of a preset resource in a second preset duration of the application is greater than a first preset application threshold; the preset tag is used for marking a target application.
Optionally, the apparatus further includes an updating unit 705, configured to, for a host in the host cluster, re-determine, when it is monitored that an average occupancy rate of any target application for a preset resource within a fourth preset time period is smaller than a second preset application threshold, the target application as a non-target application.
Optionally, the first migration unit 703 is further configured to determine that the application to be migrated cannot be migrated again within a fifth preset time period after the current time when it is monitored that any application to be migrated is migrated successfully.
For an explanation of embodiments of the apparatus reference is made to the above-described method embodiments.
Fig. 8 is a schematic structural diagram of another application scheduling apparatus provided in the embodiment of the present specification.
The apparatus may be applied to a scheduling module interfacing a host cluster. The apparatus may include the following elements.
A second application monitoring unit 801, configured to monitor, in the host cluster, an occupation situation of an application in the host for a preset resource.
A second migration unit 802, configured to determine, in the at least two target applications of any host, an application to be migrated in a case that it is monitored that the at least two target applications exist in the host; the average occupancy rate of the target application on preset resources in a second preset duration is greater than a first preset application threshold; and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
For an explanation of embodiments of the present apparatus reference is made to the above-described method embodiments.
Embodiments of the present specification also provide a computer device, which at least includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements an application scheduling method when executing the program.
Fig. 9 is a schematic diagram illustrating a more specific hardware structure of a computer device according to an embodiment of the present disclosure, where the computer device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements an application scheduling method.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
From the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present disclosure can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, and the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in one or more software and/or hardware when implementing the embodiments of the present disclosure. And part or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is only a detailed description of the embodiments of the present disclosure, and it should be noted that, for those skilled in the art, many modifications and decorations can be made without departing from the principle of the embodiments of the present disclosure, and these modifications and decorations should also be regarded as protection for the embodiments of the present disclosure.

Claims (12)

1. An application scheduling method is applied to a scheduling module of a docking host cluster; the method comprises the following steps:
in the host cluster, monitoring the occupation condition of a host aiming at preset resources;
monitoring the occupation condition of the application in the host aiming at the preset resource under the condition that the average occupancy rate of the preset resource of any host in the first preset time is monitored to be greater than a first preset host threshold value;
under the condition that at least two target applications exist in the host computer, determining applications to be migrated in the at least two target applications of the host computer; the average occupancy rate of the target application on preset resources in a second preset duration is greater than a first preset application threshold;
and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
2. The method according to claim 1, wherein determining, in the case that it is monitored that there are at least two target applications in the host, an application to be migrated in the at least two target applications of the host comprises:
under the condition that N target applications exist in the host computer, determining N-1 target applications in the N target applications as applications to be migrated; n is more than or equal to 2.
3. The method of claim 2, the determining N-1 of the N target applications as applications to migrate, comprising:
determining other N-1 target applications except the target application with the highest average occupancy rate of preset resources in the N target applications as applications to be migrated;
the migrating any application to be migrated to any other host without a target application includes:
circularly executing the following steps until a preset circulation stop condition is met: migrating any application to be migrated in the current host to any other host without the target application;
the preset cycle stop condition includes: and completing the migration of all the applications to be migrated, or enabling each current other host in the host cluster to have the target application.
4. The method of claim 1, further comprising:
under the conditions that the target application exists in each other host of the host cluster and the idle host exists in the host cluster, any application to be migrated is migrated to any idle host;
and the average occupancy rate of preset resources of the idle host in a third preset time is less than a second preset host threshold.
5. The method of claim 1, further comprising:
aiming at the hosts in the host cluster, adding a preset label to any application under the condition that the average occupancy rate of preset resources in a second preset time of any application in any host is greater than a first preset application threshold value; the preset label is used for marking the target application.
6. The method of claim 1, further comprising:
and for the hosts in the host cluster, under the condition that the average occupancy rate of any target application to the preset resources within a fourth preset time is smaller than a second preset application threshold value, re-determining the target application as a non-target application.
7. The method of claim 1, further comprising:
and under the condition that any application to be migrated is monitored to be migrated successfully, determining that the application to be migrated cannot be migrated again within a fifth preset time after the current time.
8. An application scheduling method is applied to a scheduling module of a docking host cluster; the method comprises the following steps:
in the host computer cluster, monitoring the occupation condition of an application on a host computer aiming at preset resources;
under the condition that at least two target applications exist in any host, determining applications to be migrated in the at least two target applications of the host; the average occupancy rate of the target application on preset resources in a second preset duration is greater than a first preset application threshold;
and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
9. An application scheduling device is applied to a scheduling module of a docking host cluster; the device comprises:
the host monitoring unit is used for monitoring the occupation condition of the host aiming at the preset resources in the host cluster;
the first application monitoring unit is used for monitoring the occupation condition of the application in the host aiming at the preset resource under the condition that the average occupancy rate of the preset resource of any host in a first preset time length is monitored to be greater than a first preset host threshold value;
the first migration unit is used for determining an application to be migrated from at least two target applications of the host under the condition that the existence of the at least two target applications in the host is monitored; the average occupancy rate of the target application on preset resources in a second preset duration is greater than a first preset application threshold; and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
10. An application scheduling device is applied to a scheduling module of a docking host cluster; the device comprises:
the second application monitoring unit is used for monitoring the occupation condition of the application in the host aiming at the preset resource in the host cluster;
the second migration unit is used for determining the application to be migrated in the at least two target applications of any host under the condition that the existence of the at least two target applications in the host is monitored; the average occupancy rate of the target application on preset resources in a second preset duration is greater than a first preset application threshold; and under the condition that it is monitored that the target application does not exist in any other host of the host cluster, migrating any application to be migrated to any other host without the target application.
11. An electronic device comprising a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the method of any of claims 1 to 8.
12. A machine readable storage medium having stored thereon a program which, when executed by a processor, carries out the method of any one of claims 1 to 8.
CN202210489692.5A 2022-05-06 2022-05-06 Application scheduling method, device and equipment Pending CN114880092A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210489692.5A CN114880092A (en) 2022-05-06 2022-05-06 Application scheduling method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210489692.5A CN114880092A (en) 2022-05-06 2022-05-06 Application scheduling method, device and equipment

Publications (1)

Publication Number Publication Date
CN114880092A true CN114880092A (en) 2022-08-09

Family

ID=82672862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210489692.5A Pending CN114880092A (en) 2022-05-06 2022-05-06 Application scheduling method, device and equipment

Country Status (1)

Country Link
CN (1) CN114880092A (en)

Similar Documents

Publication Publication Date Title
US10754704B2 (en) Cluster load balancing based on assessment of future loading
JP6241300B2 (en) Job scheduling apparatus, job scheduling method, and job scheduling program
US9319281B2 (en) Resource management method, resource management device, and program product
US9477460B2 (en) Non-transitory computer-readable storage medium for selective application of update programs dependent upon a load of a virtual machine and related apparatus and method
CN111104227B (en) Resource control method and device of K8s platform and related components
RU2697700C2 (en) Equitable division of system resources in execution of working process
CN109960575B (en) Computing capacity sharing method, system and related equipment
CN111553699B (en) Resource scheduling method and device
CN109739627B (en) Task scheduling method, electronic device and medium
CN114579271A (en) Task scheduling method, distributed system and storage medium
CN110020383B (en) Page data request processing method and device
CN113886069A (en) Resource allocation method and device, electronic equipment and storage medium
CN114327881A (en) Task scheduling method and device
CN114625533A (en) Distributed task scheduling method and device, electronic equipment and storage medium
CN114629960B (en) Resource scheduling method, device, system, equipment, medium and program product
CN112214288B (en) Pod scheduling method, device, equipment and medium based on Kubernetes cluster
CN111930516B (en) Load balancing method and related device
CN113032119A (en) Task scheduling method and device, storage medium and electronic equipment
CN114880092A (en) Application scheduling method, device and equipment
US9705985B1 (en) Systems and methods for cross protocol automatic sub-operation scheduling
CN113485838A (en) Server distribution method and device, electronic equipment and computer readable storage medium
CN113127289A (en) Resource management method based on YARN cluster, computer equipment and storage medium
CN116719632B (en) Task scheduling method, device, equipment and medium
EP2975516B1 (en) Intelligent application back stack management
CN113722079B (en) Task scheduling distribution method, device, equipment and medium based on target application

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