CN111124657B - Resource management method, device, electronic equipment and storage medium - Google Patents

Resource management method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111124657B
CN111124657B CN201811288988.0A CN201811288988A CN111124657B CN 111124657 B CN111124657 B CN 111124657B CN 201811288988 A CN201811288988 A CN 201811288988A CN 111124657 B CN111124657 B CN 111124657B
Authority
CN
China
Prior art keywords
server
overstock
ratio
target
specified
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811288988.0A
Other languages
Chinese (zh)
Other versions
CN111124657A (en
Inventor
张鸣奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201811288988.0A priority Critical patent/CN111124657B/en
Publication of CN111124657A publication Critical patent/CN111124657A/en
Application granted granted Critical
Publication of CN111124657B publication Critical patent/CN111124657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5022Workload threshold
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/508Monitor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention provides a resource management method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: when the specified load meets a preset isolation condition, aiming at the specified application service in the specified service cluster, acquiring the specified overstock ratio of the specified application service; the method comprises the steps of obtaining a server meeting a first target condition as a target server, wherein the first target condition is that the actual overstock ratio of the server loaded with the appointed application service is not more than the appointed overstock ratio; the specified application service is loaded into the target server, and the overstock ratio of the target server is set to the specified overstock ratio. In the resource management method of the embodiment of the invention, the appointed application service is migrated to the target server, and the overstock ratio of the target server loading the appointed application service is set to be the appointed overstock ratio, so that the overstock ratio of the target server is not more than the appointed overstock ratio, and the service quality of the appointed application service can be improved.

Description

Resource management method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for resource management, an electronic device, and a storage medium.
Background
The network resource selling system is provided with an independent resource management system, and the resource management aims at managing and distributing the network resources which can be sold and realizing the balance of the network resources. The resource management mainly refers to unified management of network resources based on the quantity of the network resources in stock.
In the existing network resource selling system, when the computing resources of each server in the service cluster are sold, the sold computing resources are the computing resources used when the application service of the client is full. However, in the actual running process, the application service of each client will not reach full load in many cases, and there may be application services that are not actually enabled, so in order to more reasonably use the computing resources of each server, the operator may overstock the computing resources of each server in each service cluster according to a preset overstock ratio for each service cluster. The overstock ratio is the ratio of the part of the sold computing resources, which exceeds the actual computing resources of the server, to the actual computing resources of the server. For example, assuming that the computing resource of a server is 100 and the computing resource sold in the server is 150, the overstock ratio of the server is (150-100)/100=50%.
However, for the overstocked service clusters, there may be a situation that the computing resources are insufficient during the access peak period, so that some special types of application services, such as application services with high real-time requirements, may be seriously affected.
Disclosure of Invention
The embodiment of the invention aims to provide a resource management method, a device, electronic equipment and a storage medium, so as to improve the service quality of a specified application service. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a resource management method, where the method includes:
when the specified load meets a preset isolation condition, aiming at specified application service in a specified service cluster, acquiring a specified overstock ratio of the specified application service, wherein the specified overstock ratio is smaller than the preset overstock ratio of the specified service cluster;
obtaining a server meeting a first target condition as a target server, wherein the first target condition is that the actual overstock ratio of the server after loading the appointed application service is not greater than the appointed overstock ratio;
and loading the appointed application service into the target server, and setting the maximum overstock ratio of the target server as the appointed overstock ratio.
Optionally, in the resource management method according to the embodiment of the present invention, the preset isolation condition is: the actual average load of the designated service cluster is greater than a preset first load threshold.
Optionally, in the resource management method according to the embodiment of the present invention, the preset isolation condition is: the actual load of the server loading the specified application service in the specified service cluster is larger than a preset second load threshold.
Optionally, in the resource management method of the embodiment of the present invention, the obtaining a server that meets a first target condition, as a target server, includes:
judging whether a server meeting a first target condition exists in the appointed service cluster or not;
and if the server meeting the first target condition exists, selecting the server meeting the first target condition as a target server.
Optionally, in the resource management method according to the embodiment of the present invention, after the determining whether the server satisfying the first target condition exists in the specified service cluster, the method further includes:
if the server meeting the first target condition does not exist, judging whether a server meeting a second target condition exists in the appointed service cluster, wherein the second target condition is that the server meets the first target condition after migrating the application service to be migrated, and the actual overstock ratio of the server loading the application service to be migrated is not larger than the preset overstock ratio;
And if the server meeting the second target condition exists, migrating the application service to be migrated of the server meeting the second target condition to the load server to obtain a target server.
Optionally, in the resource management method according to the embodiment of the present invention, after the determining whether the server satisfying the second target condition exists in the specified service cluster, the method further includes:
and if the server meeting the second target condition does not exist, selecting the server from the reserved service cluster and dividing the server into the designated service cluster to obtain the target server.
Optionally, in the resource management method according to the embodiment of the present invention, after the loading of the specified application service into the target server and setting the maximum overstock ratio of the target server to the specified overstock ratio, the method further includes:
and setting the maximum overstock ratio of the target server as the preset overstock ratio when the specified load meets the preset release condition.
Optionally, in the resource management method according to the embodiment of the present invention, the preset release condition is that an actual average load of the specified service cluster is smaller than a preset third load threshold.
Optionally, in the resource management method according to the embodiment of the present invention, the preset release condition is that an actual load of the target server is smaller than a preset fourth load threshold.
In a second aspect, an embodiment of the present invention provides a resource management apparatus, including:
the isolation triggering module is used for acquiring the appointed overstock ratio of the appointed application service aiming at the appointed application service in the appointed service cluster when the appointed load meets the preset isolation condition, wherein the appointed overstock ratio is smaller than the preset overstock ratio of the appointed service cluster;
the target host selecting module is used for acquiring a server meeting a first target condition as a target server, wherein the first target condition is that the actual overstock ratio of the server after loading the appointed application service is not greater than the appointed overstock ratio;
and the service migration module is used for loading the appointed application service into the target server and setting the maximum overstock ratio of the target server as the appointed overstock ratio.
Optionally, in the resource management device of the embodiment of the present invention, the isolation triggering module is specifically configured to:
and when the actual average load of the specified service cluster is larger than a preset first load threshold, acquiring the specified overstock ratio of the specified application service aiming at the specified application service in the specified service cluster.
Optionally, in the resource management device of the embodiment of the present invention, the isolation triggering module is specifically configured to:
and when the actual load of the server loading the specified application service is larger than a preset second load threshold, acquiring the specified overstock ratio of the specified application service aiming at the specified application service in the specified service cluster.
Optionally, in the resource management device of the embodiment of the present invention, the target host selection module includes:
the first judging submodule is used for judging whether a server meeting a first target condition exists in the appointed service cluster or not;
the first selecting sub-module is used for selecting the server meeting the first target condition as the target server if the server meeting the first target condition exists.
Optionally, in the resource management device of the embodiment of the present invention, the target host selection module further includes:
the second judging sub-module is used for judging whether a server meeting a second target condition exists in the appointed service cluster or not if the server meeting the first target condition does not exist, wherein the second target condition is that after the server migrates the application service to be migrated, the first target condition is met, and the actual overstock ratio of the server loaded with the application service to be migrated is not greater than the preset overstock ratio;
And the second selecting sub-module is used for migrating the application service to be migrated of the server meeting the second target condition to the load server if the server meeting the second target condition exists, so as to obtain the target server.
Optionally, in the resource management device of the embodiment of the present invention, the target host selection module further includes:
and the third selecting sub-module is used for selecting the server from the reserved service cluster to divide the server into the appointed service cluster if the server meeting the second target condition does not exist, so as to obtain the target server.
Optionally, in the resource management device of the embodiment of the present invention, the device further includes:
and the overstock ratio release module is used for setting the maximum overstock ratio of the target server as the preset overstock ratio when the specified load meets the preset release condition.
Optionally, in the resource management device of the embodiment of the present invention, the overstock ratio release module is specifically configured to:
and setting the maximum overstock ratio of the target server as the preset overstock ratio when the actual average load of the designated service cluster is smaller than a preset third load threshold.
Optionally, in the resource management device of the embodiment of the present invention, the overstock ratio release module is specifically configured to:
And setting the maximum overstock ratio of the target server as the preset overstock ratio when the actual load of the target server is smaller than a preset fourth load threshold.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement any one of the resource management methods described in the first aspect when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, in which a computer program is stored, the computer program implementing the resource management method according to any one of the first aspects when being executed by a processor.
When a specified load meets a preset isolation condition, acquiring a specified overstock ratio of a specified application service in a specified service cluster according to the specified application service, wherein the specified overstock ratio is smaller than the preset overstock ratio of the specified service cluster; the method comprises the steps of obtaining a server meeting a first target condition as a target server, wherein the first target condition is that the actual overstock ratio of the server loaded with the appointed application service is not more than the appointed overstock ratio; the specified application service is loaded into the target server and the maximum overstock ratio of the target server is set to the specified overstock ratio. The specified application service is migrated to the target server, and the maximum overstock ratio of the target server loaded with the specified application service is set to be the specified overstock ratio, so that the maximum overstock ratio of the target server is not more than the specified overstock ratio, and the service quality of the specified application service can be improved. Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario according to an embodiment of the present invention;
FIG. 2 is a first flowchart of a resource management method according to an embodiment of the present invention;
FIG. 3 is a second flowchart of a resource management method according to an embodiment of the present invention;
FIG. 4 is a third flow chart of a resource management method according to an embodiment of the present invention;
FIG. 5 is a fourth flowchart of a resource management method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a resource management device according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a resource management device according to an embodiment of the present invention;
fig. 8 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to ensure efficient and reasonable operation of the network resource selling platform, resource management is particularly important. For public cloud network resource selling platforms, the structure of the public cloud network resource selling platform is shown in fig. 1, a network resource selling system is divided into a plurality of available areas according to geographic areas, each available area comprises a plurality of service clusters, and each service cluster comprises a plurality of servers which are used for providing application services.
In the existing resource management method, when computing resources of each server in a service cluster are sold for each service cluster, the sold computing resources are computing resources used when application services of clients are fully loaded. However, in the actual running process, the application service of each client will not reach full load in many cases, and there may be application services that are not actually enabled, so in order to more reasonably use the computing resources of each server, the operator may overstock the computing resources of each server in each service cluster according to a preset maximum overstock ratio for each service cluster.
However, for the overstocked service clusters, there may be a situation that the computing resources are insufficient during the access peak period, so that some special types of application services, such as application services with high real-time requirements, may be seriously affected.
In view of this, an embodiment of the present invention provides a resource management method, referring to fig. 2, including:
s201, when the specified load meets the preset isolation condition, aiming at the specified application service in the specified service cluster, acquiring the specified overstock ratio of the specified application service, wherein the specified overstock ratio is smaller than the preset overstock ratio of the specified service cluster.
The resource management method in the embodiment of the invention can be realized through a resource management system, and the resource management system is any system capable of realizing the resource management method in the embodiment of the invention. For example:
the resource management system may be an electronic device comprising: a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface are connected through a bus and complete communication; the memory stores executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for executing the resource management method of the embodiment of the present invention.
The resource management system may also be an application for executing the resource management method of the embodiment of the present invention at runtime.
The resource management system may also be a storage medium for storing executable code for performing the resource management method of the embodiment of the present invention.
The service cluster is designated as a service cluster in a network resource vending system. The preset isolation condition is used for representing the running condition of the appointed application service, and can be set according to the actual condition.
Optionally, the preset isolation condition is: the actual average load of the designated service cluster is greater than a preset first load threshold.
The actual average load of the designated service cluster is the average value of the loads of all servers in the designated service cluster, for example, the designated service cluster comprises n servers, the actual load values of all servers are A1, A2 and A3 … … An in sequence, and the actual average load of the designated service cluster is (a1+a2+a3+ … … +an)/n. And when the actual average load of the specified service cluster is larger than a preset first load threshold, acquiring the specified overstock ratio of the specified application service aiming at the specified application service in the specified service cluster.
The resource management system monitors the actual average load of each server in the appointed service cluster, and judges that the preset isolation condition is met when the actual average load of each server in the appointed service cluster is larger than a preset first load threshold. The resource management system obtains a specified overstock ratio for a specified application service in a specified service cluster. The preset first load threshold and the appointed overstock ratio can be set according to actual conditions. For example, the preset first load threshold is set to 90%,95% or 99%, or the like. The specified overstock ratio may be a numerical value specified by the system, or may be set according to the requirements of the user, for example, when the overstock ratio of the server where the user requires the specified application service cannot exceed 50%, the specified overstock ratio of the specified service is set to 50%, or when the overstock ratio of the server where the user requires the specified application service cannot exceed 100%, the specified overstock ratio of the specified service is set to 100%, or the like.
The designated application service is the selected application service requiring the guarantee of service quality, for example, for the important client, the application service of the important client is set as the designated application service when the application service of the important client is created in the designated service cluster.
Optionally, the preset isolation condition is: the actual load of the server loading the specified application service in the specified service cluster is larger than a preset second load threshold.
And when the actual load of the server loading the specified application service is larger than a preset second load threshold, acquiring the specified overstock ratio of the specified application service aiming at the specified application service in the specified service cluster. The resource management system monitors the load of each server in the appointed service cluster, and judges that the preset isolation condition is met when the load of the server loading the appointed application service in the appointed service cluster is larger than a preset second load threshold. The resource management system obtains a specified overstock ratio for a specified application service in a specified service cluster. The preset second load threshold and the appointed overstock ratio can be set according to actual conditions. For example, the preset second load threshold is set to 85%,90%, 95%, or the like.
S202, acquiring a server meeting a first target condition as a target server, wherein the first target condition is that the actual overstock ratio of the server after loading the specified application service is not greater than the specified overstock ratio.
The server meeting the first target condition is a server with an actual overstock ratio after loading the specified application service not greater than the specified overstock ratio. The resource management system selects a server meeting a first target condition from the servers with the actual overstock ratio smaller than the appointed overstock ratio as a target server. For the appointed application service which can be executed concurrently, the number of the target servers can be multiple, when the number of the target servers is multiple, the first target condition is that the appointed application service is divided into multiple service processes, the service processes are respectively migrated to each target server, each target server operates each service process to further realize the appointed application service, and the actual overstock ratio of each target server is not greater than the appointed overstock ratio after the corresponding service process is loaded.
S203, loading the appointed application service into the target server, and setting the overstock ratio of the target server as the appointed overstock ratio.
And finishing migration of the specified application service, loading the specified application service into the target server, and changing the maximum allowed overstock ratio of the target server into the specified overstock ratio. In order to ensure that each application service is not affected in the process of loading the specified application service to the target server, a thermomigration method may be adopted.
In order to prevent the situation that the overstock ratio of the target server cannot be determined due to migration of a plurality of specified services to one target server, optionally, after loading the specified application service into the target server and setting the overstock ratio of the target server to the specified overstock ratio, the method further includes:
the target server is set to a migration locking state, wherein the target server in the migration locking state cannot be used as a migration object of the specified application service.
In the embodiment of the invention, the appointed application service is migrated to the target server, and the overstock ratio of the target server loaded with the appointed application service is set to be the appointed overstock ratio, so that the overstock ratio of the target server is not more than the appointed overstock ratio, and the service quality of the appointed application service can be improved.
Optionally, referring to fig. 3, the obtaining, as the target server, a server that meets the first target condition includes:
s2021, judging whether a server meeting the first target condition exists in the specified service cluster.
If there is a server satisfying the first target condition, S2022 selects the server satisfying the first target condition as the target server.
Optionally, referring to fig. 3, after determining whether a server satisfying the first target condition exists in the specified service cluster, the method further includes:
and S2023, if no server meeting the first target condition exists, judging whether a server meeting a second target condition exists in the specified service cluster, wherein the second target condition is that the server meets the first target condition after migrating the application service to be migrated, and the actual overstock ratio of the server loading the application service to be migrated is not greater than the preset overstock ratio.
For the servers in the designated service cluster, the server meeting the second target condition refers to selecting the application service to be migrated from the servers, and after migrating the application service to be migrated of the server to other servers, the server meets the first target condition, and the actual overstock ratio of the other servers loading the application service to be migrated is not greater than the preset overstock ratio.
For example, for the server 1, first, the server 1 does not meet the first target condition, after the application service a to be migrated in the server 1 is migrated into the server 2, the server 1 meets the first target condition, and at this time, after the server 2 loads the application service a, the actual overstock ratio of the server 2 is not greater than the preset overstock ratio, and then it is determined that the server 1 meets the second target condition.
Of course, there may be multiple application services to be migrated, for example, for the server 1, first, the server 1 does not meet the first target condition, after migrating the application service a to be migrated in the server 1 to the server 2 and migrating the application service B to be migrated in the server 1 to the server 3, the server 1 meets the first target condition, and at this time, after loading the application service a by the server 2 and loading the application service B by the server 3, the actual overstock ratio of the server 2 and the server 3 is not greater than the preset overstock ratio, and then it is determined that the server 1 meets the second target condition.
When selecting the application service to be migrated, an application service with low requirement on instantaneity, such as a video service or a web service, can be selected first, and the application service to be migrated is used as the application service to be migrated, so that the influence on the application service to be migrated caused by service migration is reduced.
And S2024, if the server meeting the second target condition exists, migrating the application service to be migrated of the server meeting the second target condition to the load server to obtain the target server.
In the embodiment of the invention, when the server meeting the first target condition does not exist, the migration of the appointed application service is completed by selecting the server meeting the second target condition, and the overstock ratio of the target server is not more than the appointed overstock ratio, so that the service quality of the appointed application service can be ensured.
Optionally, referring to fig. 3, after determining whether a server satisfying the second target condition exists in the specified service cluster, the method further includes:
and S2025, if the server meeting the second target condition does not exist, selecting the server from the reserved service clusters, and dividing the server into the designated service clusters to obtain the target server.
If the overstock ratio of each server in the designated service cluster is higher, the server meeting the first target condition and the second target condition does not exist, and the resource management system selects the server from the reserved service clusters and loads the server into the designated service cluster to serve as the target server. The servers in the reserved service cluster can execute the appointed application service, and the overstock ratio of the servers in the reserved service cluster is 0, namely the servers in the reserved service cluster do not load the application service.
In the embodiment of the invention, when the server meeting the first target condition does not exist, the migration of the appointed application service is completed by selecting the server meeting the second target condition, and the overstock ratio of the target server is not more than the appointed overstock ratio, so that the service quality of the appointed application service can be ensured.
Optionally, referring to fig. 4, after loading the specified application service into the target server and setting the overstock ratio of the target server to the specified overstock ratio, the method further includes:
s204, setting the overstock ratio of the target server to be the preset overstock ratio when the specified load meets the preset release condition.
The preset release condition is used for representing the running condition of the appointed application service, and can be set according to the actual condition. Optionally, the preset release condition is that an actual average load of the specified service cluster is smaller than a preset third load threshold.
And setting the overstock ratio of the target server to be the preset overstock ratio when the actual average load of each server in the designated service cluster is smaller than a preset third load threshold. The resource management system monitors the actual average load of each server in the appointed service cluster, and judges that the preset release condition is met when the actual average load of each server in the appointed service cluster is smaller than a preset third load threshold. The resource management system changes the overstock ratio of the target server from the specified overstock ratio to a preset overstock ratio. The preset third load threshold may be set according to practical situations, for example, to 70%,80%, 90%, or the like. In order to prevent overstock ratio of the target server from being repeatedly configured when the load fluctuates, the third load threshold should be smaller than the first load threshold, and the lock time may be set, that is, S204 is not performed within a preset time threshold after S203 is performed, and S204 is performed again after the preset time threshold is exceeded.
Optionally, the preset release condition is that an actual load of the target server is smaller than a preset fourth load threshold.
And setting the overstock ratio of the target server to be the preset overstock ratio when the actual load of the target server is smaller than a preset fourth load threshold. The resource management system monitors the actual load of the target server in the appointed service cluster, and judges that the preset release condition is met when the actual load of the target server is smaller than a preset fourth load threshold. The resource management system changes the overstock ratio of the target server from the specified overstock ratio to a preset overstock ratio. The preset fourth load threshold may be set according to practical situations, for example, set to 60%,70%, 80%, or the like. In order to prevent overstock ratio of the target server from being repeatedly configured when the load fluctuates, the fourth load threshold should be smaller than the second load threshold, and the lock time may be set, that is, S204 is not performed within a preset time threshold after S203 is performed, and S204 is performed again after the preset time threshold is exceeded.
In the embodiment of the present invention, when a preset release condition is satisfied, for example, when the actual average load of each server in the specified service cluster is smaller than a preset third load threshold, or when the actual load of the target server is smaller than a preset fourth load threshold, the overstock ratio of the target server is set to be a preset overstock ratio, so that more computing resources can be sold while the service specification of the specified application service is ensured, thereby improving the profit of the provider.
Fig. 5 shows another flow chart of a resource management method according to an embodiment of the present invention, including:
s501, when a preset isolation condition is met, acquiring a specified overstock ratio of the specified application service aiming at the specified application service in a specified service cluster, wherein the specified overstock ratio is smaller than the preset overstock ratio of the specified service cluster.
The preset isolation condition may be set according to an actual situation, for example, when an actual average load of each server in the specified service cluster is greater than a preset first load threshold, it is determined that the preset isolation condition is satisfied. Or when the actual load of the server loading the appointed application service is larger than a preset second load threshold value, judging that the preset isolation condition is met.
S502, judging whether a server meeting a first target condition exists in each server of which the specified service cluster is not in a migration locking state, wherein the first target condition is that the actual overstock ratio of the server after loading the specified application service is not larger than the specified overstock ratio.
If there is a server satisfying the first target condition, S503, selecting the server satisfying the first target condition as the target server.
And S504, judging whether a server meeting a second target condition exists in the appointed service cluster if the server meeting the first target condition does not exist, wherein the second target condition is that the server meets the first target condition after migrating the application service to be migrated, and the actual overstock ratio of the server loading the application service to be migrated is not larger than the preset overstock ratio.
And S505, if the server meeting the second target condition exists, migrating the application service to be migrated of the server meeting the second target condition to the load server to obtain the target server.
S506, if the server meeting the second target condition does not exist, selecting the server from the reserved service clusters, dividing the server into the designated service clusters, and obtaining the target server.
S507, loading the appointed application service into the target server, and setting the maximum overstock ratio of the target server as the appointed overstock ratio.
And S508, setting the target server to be in a migration locking state, wherein the target server in the migration locking state cannot serve as a migration target of the specified application service.
After the specified application service is migrated to the target server and the maximum overstock ratio of the target server is configured as the specified overstock ratio, the target server is set to be in a migration locking state, and the target server in the migration locking state is not used as a migration target of other specified application services.
S509, setting the maximum overstock ratio of the target server to the preset overstock ratio when the preset release condition is met, and canceling the locking state of the target server.
The preset release condition may be set according to an actual situation, for example, when an actual average load of each server in the specified service cluster is smaller than a preset third load threshold, it is determined that the preset release condition is satisfied. Or when the actual load of the target server is smaller than a preset fourth load threshold value, judging that the preset release condition is met. When the preset release condition is met, setting the maximum overstock ratio of the target server as the preset overstock ratio, and allowing more computing resources to be sold; and canceling the locking state of the target server, and allowing the target server to serve as a migration target of the application service to be migrated.
In the embodiment of the invention, the appointed application service is migrated to the target server, and the maximum overstock ratio of the target server loaded with the appointed application service is set to be the appointed overstock ratio, so that the maximum overstock ratio of the target server is not more than the appointed overstock ratio, and the service quality of the appointed application service can be improved.
The embodiment of the invention also provides a resource management device, referring to fig. 6, the device comprises:
the isolation triggering module 601 is configured to obtain, for a specified application service in a specified service cluster, a specified overstock ratio of the specified application service when a specified load meets a preset isolation condition, where the specified overstock ratio is smaller than a preset overstock ratio of the specified service cluster;
the target host selecting module 602 is configured to obtain, as a target server, a server that meets a first target condition, where the first target condition is that an actual overstock ratio of the server after loading the specified application service is not greater than the specified overstock ratio;
and a service migration module 603, configured to load the specified application service into the target server, and set a maximum overstock ratio of the target server to the specified overstock ratio.
In the embodiment of the invention, the appointed application service is migrated to the target server, and the maximum overstock ratio of the target server loaded with the appointed application service is set to be the appointed overstock ratio, so that the maximum overstock ratio of the target server is not more than the appointed overstock ratio, and the service quality of the appointed application service can be improved.
Optionally, in the resource management device of the embodiment of the present invention, the device further includes:
and the migration locking module is used for setting the target server into a migration locking state, wherein the target server in the migration locking state cannot be used as a migration object of the designated application service.
Optionally, in the resource management device according to the embodiment of the present invention, the isolation triggering module 601 is specifically configured to:
and when the actual average load of the specified service cluster is larger than a preset first load threshold, acquiring the specified overstock ratio of the specified application service aiming at the specified application service in the specified service cluster.
Optionally, in the resource management device according to the embodiment of the present invention, the isolation triggering module 601 is specifically configured to:
and when the actual load of the server loading the specified application service is larger than a preset second load threshold, acquiring the specified overstock ratio of the specified application service aiming at the specified application service in the specified service cluster.
Optionally, in the resource management device according to the embodiment of the present invention, the target host selection module 602 includes:
the first judging submodule is used for judging whether a server meeting a first target condition exists in the appointed service cluster or not;
The first selecting sub-module is used for selecting the server meeting the first target condition as the target server if the server meeting the first target condition exists.
Optionally, in the resource management device according to the embodiment of the present invention, the target host selection module 602 further includes:
the second judging sub-module is used for judging whether a server meeting a second target condition exists in the appointed service cluster or not if the server meeting the first target condition does not exist, wherein the second target condition is that the server meets the first target condition after migrating the application service to be migrated, and the actual overstock ratio of the server loading the application service to be migrated is not greater than the preset overstock ratio;
and the second selecting sub-module is used for migrating the application service to be migrated of the server meeting the second target condition to the load server if the server meeting the second target condition exists, so as to obtain the target server.
In the embodiment of the invention, when the server meeting the first target condition does not exist, the migration of the appointed application service is completed by selecting the server meeting the second target condition, and the overstock ratio of the target server is not more than the appointed overstock ratio, so that the service quality of the appointed application service can be ensured.
Optionally, in the resource management device of the embodiment of the present invention, the target host selection module further includes:
and the third selecting sub-module is used for selecting the server from the reserved service cluster to divide the server into the specified service cluster if the server meeting the second target condition does not exist, so as to obtain the target server.
In the embodiment of the invention, when the server meeting the first target condition does not exist, the migration of the appointed application service is completed by selecting the server meeting the second target condition, and the overstock ratio of the target server is not more than the appointed overstock ratio, so that the service quality of the appointed application service can be ensured.
Optionally, in the resource management device according to the embodiment of the present invention, referring to fig. 7, the device further includes:
and a overstock ratio releasing module 604, configured to set the maximum overstock ratio of the target server to the preset overstock ratio when the specified load meets the preset releasing condition.
In the embodiment of the invention, when the preset release condition is met, the maximum overstock ratio of the target server is set to be the preset overstock ratio, so that more computing resources can be sold while service specification of the specified application service is ensured, and the profit of a provider is improved.
Optionally, in the resource management device according to the embodiment of the present invention, the overstock ratio release module 604 is specifically configured to:
and setting the maximum overstock ratio of the target server as the preset overstock ratio when the actual average load of the designated service cluster is smaller than a preset third load threshold.
In the embodiment of the invention, when the actual average load of each server in the specified service cluster is smaller than the preset third load threshold, the maximum overstock ratio of the target server is set to be the preset overstock ratio, so that more computing resources can be sold while the service specification of the specified application service is ensured, and the profit of the provider is improved.
Optionally, in the resource management device according to the embodiment of the present invention, the overstock ratio release module 604 is specifically configured to:
and setting the maximum overstock ratio of the target server as the preset overstock ratio when the actual load of the target server is smaller than a preset fourth load threshold.
In the embodiment of the invention, when the actual load of the target server is smaller than the preset fourth load threshold, the maximum overstock ratio of the target server is set to be the preset overstock ratio, so that more computing resources can be sold while service assignment of the assigned application service is ensured, and the profit of the provider is improved.
The embodiment of the present invention further provides an electronic device, as shown in fig. 8, including a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete communication with each other through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801, when executing the program stored in the memory 803, implements the following steps:
when the specified load meets a preset isolation condition, aiming at the specified application service in the specified service cluster, acquiring the specified overstock ratio of the specified application service, wherein the specified overstock ratio is smaller than the preset overstock ratio of the specified service cluster;
obtaining a server meeting a first target condition as a target server, wherein the first target condition is that the actual overstock ratio of the server after loading the specified application service is not greater than the specified overstock ratio;
and loading the specified application service into the target server, and setting the maximum overstock ratio of the target server as the specified overstock ratio.
In the embodiment of the invention, the appointed application service is migrated to the target server, and the maximum overstock ratio of the target server loaded with the appointed application service is set to be the appointed overstock ratio, so that the overstock ratio of the target server is not more than the appointed overstock ratio, and the service quality of the appointed application service can be improved.
Optionally, the processor 801 is configured to execute a program stored in the memory 803, and may further implement any of the resource management methods described above.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the following steps when being executed by a processor:
when the specified load meets a preset isolation condition, aiming at the specified application service in the specified service cluster, acquiring the specified overstock ratio of the specified application service, wherein the specified overstock ratio is smaller than the preset overstock ratio of the specified service cluster;
obtaining a server meeting a first target condition as a target server, wherein the first target condition is that the actual overstock ratio of the server after loading the specified application service is not greater than the specified overstock ratio;
and loading the specified application service into the target server, and setting the maximum overstock ratio of the target server as the specified overstock ratio.
In the embodiment of the invention, the appointed application service is migrated to the target server, and the maximum overstock ratio of the target server loaded with the appointed application service is set to be the appointed overstock ratio, so that the overstock ratio of the target server is not more than the appointed overstock ratio, and the service quality of the appointed application service can be improved.
Optionally, when the computer program is executed by the processor, any of the resource management methods described above can be implemented.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for embodiments of the apparatus, electronic device and storage medium, the description is relatively simple as it is substantially similar to the method embodiments, where relevant see the section description of the method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (18)

1. A method of resource management, the method comprising:
when the specified load meets a preset isolation condition, aiming at specified application service in a specified service cluster, acquiring a specified overstock ratio of the specified application service, wherein the specified overstock ratio is smaller than the preset overstock ratio of the specified service cluster; the overstock ratio is the ratio of the part of the sold computing resources, which exceeds the actual computing resources of the server, to the actual computing resources of the server;
obtaining a server meeting a first target condition as a target server, wherein the first target condition is that the actual overstock ratio of the server after loading the appointed application service is not greater than the appointed overstock ratio;
loading the appointed application service into the target server, and setting the maximum overstock ratio of the target server as the appointed overstock ratio;
the obtaining, as a target server, a server that satisfies a first target condition includes:
Judging whether a server meeting a first target condition exists in the appointed service cluster or not;
if the server meeting the first target condition does not exist, judging whether a server meeting a second target condition exists in the appointed service cluster, wherein the second target condition is that the server meets the first target condition after migrating the application service to be migrated, and the actual overstock ratio of the server loading the application service to be migrated is not larger than the preset overstock ratio;
and if the server meeting the second target condition exists, migrating the application service to be migrated of the server meeting the second target condition to the load server to obtain a target server.
2. The method of claim 1, wherein the predetermined isolation conditions are: the actual average load of the designated service cluster is greater than a preset first load threshold.
3. The method of claim 1, wherein the predetermined isolation conditions are: the actual load of the server loading the specified application service in the specified service cluster is larger than a preset second load threshold.
4. The method according to claim 1, wherein the obtaining a server that satisfies the first target condition as the target server includes:
And if the server meeting the first target condition exists, selecting the server meeting the first target condition as a target server.
5. The method of claim 1, wherein after said determining whether a server exists in the specified service cluster that satisfies a second target condition, the method further comprises:
and if the server meeting the second target condition does not exist, selecting the server from the reserved service cluster and dividing the server into the designated service cluster to obtain the target server.
6. The method of claim 1, wherein after the loading the specified application service into the target server and setting the maximum overstock ratio of the target server to the specified overstock ratio, the method further comprises:
and setting the maximum overstock ratio of the target server as the preset overstock ratio when the specified load meets the preset release condition.
7. The method of claim 6, wherein the predetermined release condition is that an actual average load of the designated service cluster is less than a predetermined third load threshold.
8. The method of claim 6, wherein the predetermined release condition is that an actual load of the target server is less than a predetermined fourth load threshold.
9. A resource management apparatus, the apparatus comprising:
the isolation triggering module is used for acquiring the appointed overstock ratio of the appointed application service aiming at the appointed application service in the appointed service cluster when the appointed load meets the preset isolation condition, wherein the appointed overstock ratio is smaller than the preset overstock ratio of the appointed service cluster; the overstock ratio is the ratio of the part of the sold computing resources, which exceeds the actual computing resources of the server, to the actual computing resources of the server;
the target host selecting module is used for acquiring a server meeting a first target condition as a target server, wherein the first target condition is that the actual overstock ratio of the server after loading the appointed application service is not greater than the appointed overstock ratio;
the service migration module is used for loading the appointed application service into the target server and setting the maximum overstock ratio of the target server as the appointed overstock ratio;
wherein, the target host selecting module includes:
the first judging submodule is used for judging whether a server meeting a first target condition exists in the appointed service cluster or not;
the second judging sub-module is used for judging whether a server meeting a second target condition exists in the appointed service cluster or not if the server meeting the first target condition does not exist, wherein the second target condition is that after the server migrates the application service to be migrated, the first target condition is met, and the actual overstock ratio of the server loaded with the application service to be migrated is not greater than the preset overstock ratio;
And the second selecting sub-module is used for migrating the application service to be migrated of the server meeting the second target condition to the load server if the server meeting the second target condition exists, so as to obtain the target server.
10. The device according to claim 9, wherein the isolation triggering module is specifically configured to:
and when the actual average load of the specified service cluster is larger than a preset first load threshold, acquiring the specified overstock ratio of the specified application service aiming at the specified application service in the specified service cluster.
11. The device according to claim 9, wherein the isolation triggering module is specifically configured to:
and when the actual load of the server loading the specified application service is larger than a preset second load threshold, acquiring the specified overstock ratio of the specified application service aiming at the specified application service in the specified service cluster.
12. The apparatus of claim 9, wherein the target host selection module comprises:
the first selecting sub-module is used for selecting the server meeting the first target condition as the target server if the server meeting the first target condition exists.
13. The apparatus of claim 9, wherein the target host selection module further comprises:
and the third selecting sub-module is used for selecting the server from the reserved service cluster to divide the server into the appointed service cluster if the server meeting the second target condition does not exist, so as to obtain the target server.
14. The apparatus of claim 9, wherein the apparatus further comprises:
and the overstock ratio release module is used for setting the maximum overstock ratio of the target server as the preset overstock ratio when the specified load meets the preset release condition.
15. The device according to claim 14, wherein the overstock ratio release module is specifically configured to:
and setting the maximum overstock ratio of the target server as the preset overstock ratio when the actual average load of the designated service cluster is smaller than a preset third load threshold.
16. The device according to claim 14, wherein the overstock ratio release module is specifically configured to:
and setting the maximum overstock ratio of the target server as the preset overstock ratio when the actual load of the target server is smaller than a preset fourth load threshold.
17. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are in communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method steps of any of claims 1-8 when executing a program stored on the memory.
18. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-8.
CN201811288988.0A 2018-10-31 2018-10-31 Resource management method, device, electronic equipment and storage medium Active CN111124657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811288988.0A CN111124657B (en) 2018-10-31 2018-10-31 Resource management method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811288988.0A CN111124657B (en) 2018-10-31 2018-10-31 Resource management method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111124657A CN111124657A (en) 2020-05-08
CN111124657B true CN111124657B (en) 2024-03-08

Family

ID=70485610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811288988.0A Active CN111124657B (en) 2018-10-31 2018-10-31 Resource management method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111124657B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5828847A (en) * 1996-04-19 1998-10-27 Storage Technology Corporation Dynamic server switching for maximum server availability and load balancing
CN102521052A (en) * 2011-12-06 2012-06-27 北京航空航天大学 Resource allocation method of virtualized data center and virtual machine monitor
CN105939389A (en) * 2016-06-29 2016-09-14 乐视控股(北京)有限公司 Load balancing method and device
CN107872402A (en) * 2017-11-15 2018-04-03 北京奇艺世纪科技有限公司 The method, apparatus and electronic equipment of global traffic scheduling

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7962915B2 (en) * 2005-03-18 2011-06-14 International Business Machines Corporation System and method for preserving state for a cluster of data servers in the presence of load-balancing, failover, and fail-back events
JP2015141473A (en) * 2014-01-27 2015-08-03 キヤノン株式会社 Server system, method for controlling server system, and program
CN106445677A (en) * 2015-08-06 2017-02-22 阿里巴巴集团控股有限公司 Load balancing method and device
US9699244B2 (en) * 2015-11-11 2017-07-04 Weka.IO Ltd. Load balanced network file accesses

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5828847A (en) * 1996-04-19 1998-10-27 Storage Technology Corporation Dynamic server switching for maximum server availability and load balancing
CN102521052A (en) * 2011-12-06 2012-06-27 北京航空航天大学 Resource allocation method of virtualized data center and virtual machine monitor
CN105939389A (en) * 2016-06-29 2016-09-14 乐视控股(北京)有限公司 Load balancing method and device
CN107872402A (en) * 2017-11-15 2018-04-03 北京奇艺世纪科技有限公司 The method, apparatus and electronic equipment of global traffic scheduling

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
多实例云计算资源市场下超额预订决策方法;陈冬林;姚梦迪;邓国华;;计算机应用;20160110(第01期);全文 *

Also Published As

Publication number Publication date
CN111124657A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
WO2017166643A1 (en) Method and device for quantifying task resources
CN112269641B (en) Scheduling method, scheduling device, electronic equipment and storage medium
CN111104227B (en) Resource control method and device of K8s platform and related components
CN108306874B (en) Service interface access current limiting method and device
CN107343023B (en) Resource allocation method and device in Mesos management cluster and electronic equipment
CN104239150B (en) A kind of method and device of hardware resource adjustment
CN113127192B (en) Method, system, device and medium for sharing same GPU by multiple services
CN113886069A (en) Resource allocation method and device, electronic equipment and storage medium
CN113835865A (en) Task deployment method and device, electronic equipment and storage medium
CN111176833A (en) Task allocation method and system for multiprocessing nodes
CN111124657B (en) Resource management method, device, electronic equipment and storage medium
CN113347249A (en) Operation loading method, device and equipment
CN111443999A (en) Data parallel processing method, actuator, computer device and storage medium
US8683477B2 (en) Performance degradation based at least on computing application priority and in a relative manner that is known and predictable beforehand
CN112860387A (en) Distributed task scheduling method and device, computer equipment and storage medium
CN114756380A (en) Cloud server deployment method and device, electronic equipment and storage medium
CN113138772B (en) Construction method and device of data processing platform, electronic equipment and storage medium
CN110727400A (en) Flow control method, apparatus, device and medium for distributed storage system
CN113127289A (en) Resource management method based on YARN cluster, computer equipment and storage medium
CN116847113B (en) Video live broadcast transfer method, device, equipment and medium based on cloud architecture module
CN111079390A (en) Method and device for determining selection state of check box list
CN112579281B (en) Resource allocation method, device, electronic equipment and storage medium
CN115168057B (en) Resource scheduling method and device based on k8s cluster
CN116431327B (en) Task current limiting processing method and fort machine
CN106027581B (en) Method and system for realizing gray scale release based on load balance

Legal Events

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