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

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

Info

Publication number
CN117608823A
CN117608823A CN202311418446.1A CN202311418446A CN117608823A CN 117608823 A CN117608823 A CN 117608823A CN 202311418446 A CN202311418446 A CN 202311418446A CN 117608823 A CN117608823 A CN 117608823A
Authority
CN
China
Prior art keywords
information
configuration information
resource
cloud server
server instance
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
CN202311418446.1A
Other languages
Chinese (zh)
Inventor
李卓彧
陈煜东
王鑫彤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202311418446.1A priority Critical patent/CN117608823A/en
Publication of CN117608823A publication Critical patent/CN117608823A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/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/5061Partitioning or combining of resources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application belongs to the technical field of cloud computing, and in particular relates to a resource management method, device, equipment and storage medium, which can be applied to various scenes such as cloud technology, artificial intelligence, map field, intelligent traffic, auxiliary driving, vehicle-mounted and the like, and the method comprises the following steps: acquiring task information to be processed and resource configuration information in a computing cluster; the task information to be processed comprises tasks to be processed and resource demand information; matching each resource configuration information with resource demand information respectively to obtain a matching result of each resource configuration information; according to the matching result, determining target resource configuration information with the difference degree with the resource demand information meeting the preset condition from at least one resource configuration information; creating a target cloud server instance based on the target resource configuration information. According to the scheme, the cloud server instance in the computing cluster is automatically expanded by utilizing the resource requirement corresponding to the task to be processed, so that the task queuing situation can be reduced, and the task processing efficiency is improved.

Description

Resource management method, device, equipment and storage medium
Technical Field
The application belongs to the technical field of cloud computing, and particularly relates to a resource management method, a device, equipment and a storage medium.
Background
Cloud technology (Cloud technology) refers to a hosting technology for integrating hardware, software, network and other series resources in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. In cloud technology, a management and control side on the cloud can perform elastic expansion management on cloud server instances in a cluster according to client needs, so that the cloud server instances can be used elastically.
In the related art, when performing elastic expansion management on cloud server instances in a cluster, the expansion management operation is generally performed on cloud server instances in the cluster on the cloud according to detection indexes of the cloud servers, such as a central processing unit (Central Processing Unit, CPU) utilization rate, a memory utilization rate, an access bandwidth, and the like, in combination with a set threshold. However, because the management manner expands the cloud server instance according to the created cloud server instance resource utilization rate and the corresponding threshold value, the cloud server instance in the cluster is not expanded by the cloud management side under the condition that the task load of normal running is not high and the task in the cluster is queued. This may result in too long queuing time for the task and low resource utilization.
Disclosure of Invention
In order to solve the technical problems, the application provides a resource management method, a device, equipment and a storage medium.
In one aspect, an embodiment of the present application provides a resource management method, where the method includes:
acquiring task information to be processed and cloud server instance configuration information in a computing cluster; the task information to be processed comprises the task to be processed with the waiting time exceeding a time threshold and resource demand information corresponding to the task to be processed; the cloud server instance configuration information comprises at least one resource configuration information corresponding to a preset cloud server instance;
matching each resource configuration information with resource demand information respectively to obtain a matching result of each resource configuration information; the matching result comprises the difference degree of each resource configuration information and resource demand information;
according to the matching result, determining target resource configuration information with the difference degree with the resource demand information meeting the preset condition from at least one resource configuration information;
creating a target cloud server instance based on the target resource configuration information; the target cloud server instance is used for processing the task to be processed.
On the other hand, the embodiment of the application also provides a resource management device, which comprises:
The acquisition module is used for acquiring task information to be processed and cloud server instance configuration information in the computing cluster; the task information to be processed comprises the task to be processed with the waiting time exceeding a time threshold and resource demand information corresponding to the task to be processed; the cloud server instance configuration information comprises at least one resource configuration information corresponding to a preset cloud server instance;
the matching module is used for respectively matching each resource configuration information with the resource demand information to obtain a matching result of each resource configuration information; the matching result comprises the difference degree of each resource configuration information and resource demand information;
the target resource allocation information determining module is used for determining target resource allocation information, the degree of difference of which and the resource demand information meets the preset condition, from at least one resource allocation information according to the matching result;
the target cloud server instance creation module is used for creating a target cloud server instance based on the target resource configuration information; the target cloud server instance is used for processing the task to be processed.
In another aspect, an embodiment of the present application further provides an electronic device for resource management, where the electronic device includes a processor and a memory, and at least one instruction or at least one program is stored in the memory, where the at least one instruction or at least one program is loaded and executed by the processor to implement a resource management method as described above.
In another aspect, embodiments of the present application further provide a computer readable storage medium having at least one instruction or at least one program stored therein, where the at least one instruction or the at least one program is loaded and executed by a processor to implement a resource management method as described above.
In another aspect, embodiments of the present application further provide a computer program product, where the computer program when executed by a processor implements a resource management method as described above.
According to the resource management method, the device, the electronic equipment and the storage medium, the waiting time of the waiting task exceeding the time threshold value in the computing cluster and the resource demand information corresponding to the waiting task are obtained and matched with the resource configuration information corresponding to at least one preset cloud server instance to determine the target resource configuration information which meets the preset condition according to the difference degree of the resource demand information, and then the target cloud server instance corresponding to the waiting task is created based on the target resource configuration information, so that the waiting task can be processed by using the target cloud server instance. According to the scheme, the cloud server instance in the computing cluster is subjected to capacity expansion and contraction management by utilizing the resource requirements corresponding to the task to be processed, so that the task queuing situation can be reduced, and the task processing efficiency is improved. And the resource demand information is matched with the resource configuration information corresponding to the preset cloud server instance, so that the resource waste of the cloud server instance can be reduced while the task processing requirement is met, and the cloud resource utilization rate is improved.
Drawings
In order to more clearly illustrate the technical solutions and advantages of embodiments of the present application or of the prior art, the following description will briefly introduce the drawings that are required to be used in the embodiments or the prior art descriptions, it is obvious that the drawings in the following description are only some embodiments of the present application, and 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 illustrating an implementation environment for a resource management method, according to an example embodiment.
Fig. 2 is a flow diagram illustrating a method of resource management in accordance with an exemplary embodiment.
Fig. 3 is a flow diagram illustrating a process for matching each resource configuration information with resource requirement information, respectively, according to an exemplary embodiment.
FIG. 4 is a flow diagram illustrating a process for expanding a computing cluster according to an example embodiment.
Fig. 5 is a block diagram of a resource management device, according to an example embodiment.
Fig. 6 is a hardware configuration block diagram of a server of a resource management method according to an exemplary embodiment.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that the terms "first," "second," and the like in the description and the claims of the embodiments of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In order to make the objects, technical solutions and advantages disclosed in the embodiments of the present application more apparent, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the present application embodiments and are not intended to limit the present application embodiments.
It should be appreciated that the resource management method provided in the present application is applicable to a cloud service scenario, where cloud services are an addition, use and interaction mode of related services based on the internet, and generally involve providing dynamically extensible and often virtualized resources through the internet. Cloud services are services implemented based on cloud technology. The cloud technology is a generic term of network technology, information technology, integration technology, management platform technology, application technology and the like based on cloud computing business model application, can form a resource pool, and is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing (closed computing).
The cloud computing is a computing mode, and distributes computing tasks on a resource pool formed by a large number of computers, so that various application systems can acquire computing power, storage space and information service according to requirements. The network that provides the resources is referred to as the "cloud". Resources in the cloud are infinitely expandable in the sense of users, and can be acquired at any time, used as needed, expanded at any time and paid for use as needed.
As a basic capability provider of cloud computing, a cloud computing resource pool (cloud platform for short, generally referred to as infrastructure as a service (Infrastructure as a Service, iaaS)) platform is established, and multiple types of virtual resources are deployed in the resource pool for external clients to select for use. The cloud computing resource pool mainly comprises: computing devices (which are virtualized machines, including operating systems), storage devices, network devices. According to the logic function division, a platform service (Platform as a Service, paaS) layer can be deployed on an infrastructure service layer, software service (Software as a Service, saaS) can be deployed on the PaaS layer, and the SaaS can be directly deployed on the IaaS. PaaS is a platform on which software runs, such as a database, web container, etc. SaaS is a wide variety of business software such as web portals, sms mass senders, etc.
In the related art, an elastic expansion technology is adopted to manage cloud server instances. However, since the elastic expansion technology can only expand the cloud server instance according to the established utilization rate of the instance resources on the cloud and the threshold value, the expansion of the cloud server instance cannot be performed according to the resources required by the tasks in the computing cluster. For the situation that the task in the computing cluster is queued, but the normal running task load is not high, the capacity expansion cannot be realized by the scheme, so that the problems of overlong task queuing time, resource waste on the cloud and the like can occur.
In view of this, an embodiment of the present application proposes a method, an apparatus, an electronic device, and a storage medium for resource management, by acquiring a task to be processed with a waiting duration exceeding a time threshold in a computing cluster and resource requirement information corresponding to the task to be processed, matching the task to be processed with resource configuration information corresponding to at least one preset cloud server instance, so as to determine target resource configuration information with a degree of difference between the resource requirement information meeting a preset condition, and then creating a target cloud server instance corresponding to the task to be processed based on the target resource configuration information, so that the task to be processed can be processed by using the target cloud server instance. According to the scheme, the cloud server instance in the computing cluster is subjected to capacity expansion and contraction management by utilizing the resource requirements corresponding to the task to be processed, so that the task queuing situation can be reduced, and the task processing efficiency is improved. And the resource demand information is matched with the resource configuration information corresponding to the preset cloud server instance, so that the resource waste of the cloud server instance can be reduced while the task processing requirement is met, and the cloud resource utilization rate is improved.
FIG. 1 is a schematic diagram illustrating an implementation environment for a resource management method, according to an example embodiment. As shown in fig. 1, the implementation environment may include at least a terminal device 01 and a server 02.
In this embodiment of the present application, the server 02 may provide a required resource for at least one terminal device 01, all cloud services may run on the server side, the server 02 transfers the running data to the terminal device 01 through the network, and the terminal device may execute the corresponding service through the client deployed on the terminal device 01 without requiring hardware such as a high-end processor or a graphics card. Optionally, the server 02 may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal device 01 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart voice interaction device, a smart home appliance, a smart watch, a vehicle-mounted terminal, an aircraft, etc. The terminal device 01 and the server 02 may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
It should be noted that fig. 1 is only an example. In other scenarios, other implementation environments may also be included.
Fig. 2 is a flow diagram illustrating a method of resource management in accordance with an exemplary embodiment. The method may be used in the implementation environment of fig. 1. The present specification provides method operational steps as described in the examples or flowcharts, but may include more or fewer operational steps based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented in a real system or server product, the methods illustrated in the embodiments or figures may be performed sequentially or in parallel (e.g., in a parallel processor or multithreaded environment). As shown in fig. 2, the method may include:
s101: acquiring task information to be processed and cloud server instance configuration information in a computing cluster; the task information to be processed comprises the task to be processed with the waiting time exceeding a time threshold and resource demand information corresponding to the task to be processed; the cloud server instance configuration information comprises at least one resource configuration information corresponding to a preset cloud server instance.
In the embodiment of the application, in the cloud platform, a computing cluster and a console may be generally included. When the cloud platform is used, different terminal objects correspond to different computing clusters. One or more management nodes are typically disposed in the computing cluster, where the management nodes are cloud server instances in the computing cluster that establish contact with the terminal objects. In general, the management node is not involved in processing a specific computing task, and is only responsible for managing other cloud server instances in the computing cluster. Specifically, the management node needs to maintain the state of the cloud server instance, the state of the task, and the corresponding relation between the task and the cloud server instance in the computing cluster, and meanwhile, the management node can also ensure the availability of the computing cluster as a whole, such as collecting the related information of the cloud server instance in the computing cluster, automatically reconnecting the cloud server instance, distributing the computing task to the cloud server instance, and the like. In the process of distributing computing tasks to cloud server instances in a cluster, a management node is required to manage and maintain available resources in the cloud server instances, so that normal operation of the tasks is ensured. The management node can be provided with a scheduler, the terminal object can deliver the calculation task to the scheduler in the management node, and when the resources of the cloud server instance in the calculation cluster meet the operation conditions of the task, the management node can distribute the calculation task to the cloud server instance for operation. Alternatively, the number of cloud server instances in the computing cluster that handle the computing tasks may be 0, 1, or other numbers. The number of cloud server instances in the computing cluster can be dynamically created or destroyed according to the computing task, so that the utilization rate of resources on the cloud is improved, and the cost of using the computing cluster by the terminal object is reduced.
The management and control console can automatically perform elastic capacity expansion or capacity contraction on the computing clusters. The management and control console is required to meet certain preconditions when performing elastic expansion or contraction on the computing clusters. Specifically, the precondition is that the terminal object configures an automatic capacity expansion or automatic capacity reduction option when configuring management information of the computing cluster, and cloud server instance configuration information during capacity expansion is preset. The cloud server instance configuration information refers to a cloud server instance type which can be selected by the created cloud server instance and a resource configuration specification corresponding to each cloud server instance when the computing cluster is automatically expanded. Table 1 is a cloud server instance configuration information table, and as shown in table 1, three types of preset cloud server instances are shown in the table, wherein the cloud server instance of type a corresponds to a resource configuration specification of 2-core CPU and 8G memory. And the cloud server example of the type B corresponds to the resource allocation specification of 4-core CPU and 16G memory. And C-type cloud server examples, wherein the corresponding resource allocation specification is 16-core CPU and 32G memory.
Table 1 cloud server instance configuration information table
Typically, after a computing task is delivered to a scheduler in a management node, the scheduler issues the computing task to a cloud server instance in a computing cluster for processing according to a preset rule. When the cloud server instance is busy, the computing task needs to be queued according to a set queuing rule, such as a first-in first-out rule, to wait for processing.
In the embodiment of the present invention, in order to improve the processing efficiency of the task, the console may acquire a task to be processed in which the waiting duration exceeds the time threshold in the computing cluster, and expand a cloud server instance corresponding to the task to be processed for the task to be processed in the computing cluster, so as to process the task to be processed in which the waiting duration exceeds the time threshold.
Specifically, a data acquisition application program is arranged in each cloud server instance in the computing cluster, the application program is a resident program in the cloud server instance, and the application program can acquire task information to be processed in the corresponding cloud server instance and cloud server instance state information in real time or at regular time. After the data acquisition application program acquires the task information to be processed and the cloud server instance state information in the corresponding cloud server instance, the task information to be processed and the cloud server instance state information can be reported to the management node, and the management node sends the task information to be processed and the cloud server instance state information in each cloud server instance to the management console, so that the management console can process the task information and the cloud server instance state information. In some embodiments, after the data acquisition application program acquires the task information to be processed in the corresponding cloud server instance and the cloud server instance state information, the task information and the cloud server instance state information can also be directly reported to the management and control console. The management and control console judges whether the computing cluster meets the capacity expansion or contraction conditions according to the task information to be processed in each cloud server instance or the cloud server instance state information, and if so, automatic capacity expansion or automatic capacity contraction processing is carried out.
For automatic capacity expansion, when judging whether the computing cluster meets the capacity expansion condition, the console first needs to determine whether the terminal object configures an automatic capacity expansion option for the computing cluster, and if the terminal object does not configure the automatic capacity expansion option for the computing cluster, the console cannot automatically expand the computing cluster. If the terminal object configures an automatic capacity expansion option for the computing cluster, the management and control console can automatically expand the computing cluster, and in this case, the management and control console can continuously judge whether a task to be processed with the waiting time exceeding a time threshold exists according to the task information to be processed in each cloud server instance. The console may have a variety of implementations in determining whether there are tasks to be processed for which the waiting time period exceeds the time threshold.
As an optional implementation manner, the information of the task to be processed of any cloud server instance may include the identification of each task to be processed, the current task state of each task to be processed, the task submission time of each task to be processed, and so on. The console may determine a waiting time for each task to be processed by obtaining a current time and according to a task submission time and the current time of each task to be processed. And then comparing the waiting time of each task to be processed with a time threshold, and if the waiting time of a certain task to be processed exceeds the time threshold, expanding a cloud server instance corresponding to the task to be processed in the computing cluster to process the cloud server instance. Optionally, the time threshold is set by the console according to the actual service requirement, for example, 120S.
As another optional implementation manner, when the data acquisition application program in the cloud server instance reports the acquired information of the task to be processed, the waiting duration of each task to be processed can be calculated according to the task submitting time of each task to be processed in the information to be processed, and then the waiting duration of each task to be processed is reported to the management node or the management console. After the management and control console obtains the waiting time of each task to be processed, the waiting time of each task to be processed can be compared with the time threshold, so that the task to be processed, of which the waiting time exceeds the time threshold, is determined.
As another optional implementation manner, after the data acquisition application program in the cloud server instance reports the acquired information of the tasks to be processed to the management node, the management node calculates the waiting duration of each task to be processed according to the task submitting time of each task to be processed in the information to be processed, and then reports the waiting duration of each task to be processed to the management console. After the management and control console obtains the waiting time of each task to be processed, the waiting time of each task to be processed can be compared with the time threshold, so that the task to be processed, of which the waiting time exceeds the time threshold, is determined.
In the embodiment of the present application, when judging whether the capacity expansion condition is satisfied, if the terminal object configures an automatic capacity expansion option and there is a task to be processed with a waiting duration exceeding a time threshold, the console further needs to judge whether the terminal object configures cloud server instance configuration information for the computing cluster, and if not, the console cannot automatically expand the capacity of the computing cluster. If the terminal object configures cloud server instance configuration information for the computing cluster, the management and control console can acquire the cloud server instance configuration information corresponding to the computing cluster, so that the computing cluster is expanded. The cloud server instance configuration information comprises resource configuration information corresponding to one or more types of preset cloud server instances, the preset cloud server instances can be regarded as cloud server instances waiting to be created, and when the corresponding resource configuration information is determined to be target resource configuration information, the cloud server instances are created by a management console and added into a computing cluster. When the management and control console expands the computing cluster, target resource configuration information corresponding to the task to be processed can be screened out from resource configuration information corresponding to a plurality of preset cloud server instances, and then the target cloud server instance corresponding to the task to be processed is created according to the target resource configuration information. It should be noted that, the to-be-processed task refers to a to-be-processed task whose waiting time period exceeds a time threshold, and for convenience of text, the to-be-processed tasks appearing hereinafter refer to-be-processed tasks whose waiting time period exceeds a time threshold.
S103: matching each resource configuration information with resource demand information respectively to obtain a matching result of each resource configuration information; the matching result includes the degree of difference between each resource configuration information and the resource demand information.
In the embodiment of the present application, when determining that the computing cluster satisfies the capacity expansion condition, the console may automatically expand a corresponding target cloud server instance for each task to be processed, and add the expanded target cloud server instance to the computing cluster, so as to process the corresponding task to be processed. When the management and control console expands the target cloud server instance, the resource requirement information of the task to be processed is required to be matched with the resource configuration information corresponding to the preset cloud server instance preset by the terminal object, so that the target resource configuration information meeting the preset condition is determined, and then the target cloud server instance for processing the task to be processed can be created according to the target resource configuration information. The resource requirement information of the task to be processed can be content included in the task to be processed, and the content can be reported to the management console by a management node or a cloud server instance in the computing cluster.
The resource requirement information corresponding to the task to be processed may include processor requirement information, memory requirement information, and the number of cloud server instances required for completing the task to be processed. Table 2 is a resource requirement information table corresponding to a task to be processed, which is shown in table 2, and shows resource requirement information corresponding to each of four tasks to be processed, where the resource requirement information corresponding to task to be processed 1 is a 2-core CPU, a 6G memory, and a cloud server instance. The resource demand information corresponding to the task 2 to be processed is a 2-core CPU, an 8G memory and a cloud server instance. The resource demand information corresponding to the task 3 to be processed is 16-core CPU, 286G memory and two cloud server instances. The resource requirement information corresponding to the task to be processed 4 is 64-core CPU, 128G memory and a cloud server instance.
TABLE 2 resource requirement information Table corresponding to task to be processed
In the embodiment of the present application, the resource configuration information may include processor configuration information and memory configuration information. As shown in table 1, each preset cloud server instance set by the terminal object corresponds to corresponding processor configuration information and memory configuration information. Therefore, when the resource requirement information of the task to be processed is matched with the resource configuration information corresponding to the preset cloud server instance set by the terminal object, the processor requirement information in the resource requirement information can be respectively matched with the processor configuration information in the resource configuration information corresponding to each preset cloud server instance, and meanwhile, the memory requirement information in the resource requirement information is matched with the memory configuration information in the resource configuration information corresponding to each preset cloud server instance. Specifically, fig. 3 is a schematic flow chart illustrating matching each resource configuration information with resource requirement information, respectively, according to an exemplary embodiment. As shown in fig. 3, the matching of the resource configuration information corresponding to each preset cloud server instance with the resource requirement information may include:
S1031: matching each processor configuration information with the processor demand information respectively, and matching each memory configuration information with the memory demand information respectively to obtain initial matching resource configuration information; processor configuration information of the initial matching resource configuration information is matched with processor demand information, and memory configuration information of the initial matching resource configuration information is matched with memory demand information.
S1033: and calculating the difference degree based on the resource demand information and the initial matching resource configuration information to obtain a matching result.
In the steps S1031 to S1033, by matching each processor configuration information with the processor requirement information, and matching each memory configuration information with the memory requirement information, the matching efficiency can be improved, and the accuracy of the matching result can be ensured.
In step S1031, for the resource configuration information corresponding to different preset cloud server instances, the processor configuration information and the processor requirement information contained in the resource configuration information may be matched, and the memory configuration information and the memory requirement information contained in the resource configuration information may be matched. Specifically, when each type of processor configuration information is respectively matched with the processor requirement information, and each type of memory configuration information is respectively matched with the memory requirement information, a plurality of matching modes can be adopted.
In an alternative implementation manner, the processor configuration information in each resource configuration information can be respectively matched with the processor requirement information, so that initial matched processor configuration information matched with the processor requirement information can be obtained. And matching the memory configuration information in each resource configuration information with the memory demand information respectively to obtain initial matching memory configuration information matched with the memory demand information. And then, screening the obtained resource configuration information according to the initial matching processor configuration information and the initial matching memory configuration information, thereby obtaining the initial matching resource configuration information. Processor configuration information of the initial matching resource configuration information is matched with processor demand information, and memory configuration information of the initial matching resource configuration information is matched with memory demand information.
In another alternative implementation manner, the processor configuration information in each resource configuration information may be first matched with the processor requirement information, so that the resource configuration information is screened out, and the processor configuration information is matched with the resource configuration information of the processor requirement information. And then matching the memory demand information with the memory configuration information in the screened resource configuration information to further obtain the initial matching resource configuration information of the processor configuration information and the processor demand information, wherein the memory configuration information and the memory demand information are matched.
In the step S1033, after the initial matching resource configuration information is screened out from the resource configuration information, the degree of difference between each initial matching resource configuration information and the resource requirement information may be calculated, so as to obtain a matching result. When the difference degree calculation is performed based on the resource requirement information and the initial matching resource configuration information, the difference calculation can be performed based on the processor requirement information and the processor configuration information in the initial matching resource configuration information, so as to obtain the processor difference information. And performing difference calculation based on the memory demand information and the memory configuration information in the initial matching resource configuration information to obtain memory difference information. And then determining the matching result based on the processor difference information and the memory difference information. The matching result is determined by respectively calculating the processor difference information and the memory difference information, so that the difference between the resource configuration corresponding to different preset cloud server examples and the resource requirement required by the task to be processed can be accurately measured, the target resource configuration information meeting the preset condition with the difference degree of the resource requirement information can be accurately and efficiently screened from the matching result, and the capacity expansion efficiency of the computing cluster is improved.
S105: and according to the matching result, determining target resource configuration information, of which the difference degree with the resource demand information meets the preset condition, from at least one resource configuration information.
In the embodiment of the application, when the matching result is determined, the processor difference information and the memory difference information can be directly used as the matching result. In addition, only the initial matching resource configuration information is matched with the resource demand information in the resource configuration information corresponding to the preset cloud server instance, so that in order to improve the determination efficiency of the target resource configuration information, the matching result only comprises the difference between each initial matching resource configuration information and the resource demand information.
In the embodiment of the present application, the target resource configuration information may be determined from the initial matching resource configuration information. The target resource allocation information is resource allocation information which is matched with the resource demand information, the difference degree meets the preset condition, and the difference degree meets the preset condition to be minimum. When determining the target resource configuration information with the difference degree with the resource demand information meeting the preset condition, determining the resource configuration information with the processor difference information meeting the preset condition in the initial matching resource configuration information according to the processor difference information to obtain the target matching resource configuration information. And under the condition that the target matching resource allocation information is not unique, determining the resource allocation information of which the memory difference information meets the preset condition in the target matching resource allocation information according to the memory difference information, and obtaining the target resource allocation information. And taking the target matching resource configuration information as target resource configuration information under the condition that the target matching resource configuration information is unique. The resource configuration information of which the processor difference information meets the preset condition is determined in the initial matching resource configuration information to obtain target matching resource configuration information, and then the target resource configuration information is determined according to the target matching resource configuration information, so that the obtained target resource configuration information and the resource demand information have the smallest resource difference, the resource waste of a server is avoided, the resource utilization rate is improved, and the cost of using a cloud server instance by a terminal object can be reduced.
In practical application, after obtaining the tasks to be processed in each cloud server instance in the computing cluster, the console may determine the resource requirement information (as shown in table 2) corresponding to each task to be processed. Then, the resource configuration information (shown in table 1) corresponding to a plurality of preset cloud server instances set by the terminal object when the computing cluster is configured is utilized to match corresponding target resource configuration information for each task to be processed with the waiting time exceeding the time threshold, so that the resource specification and the number of the cloud server instances needing to be expanded in the computing cluster are determined. When matching is performed, the matching rule is the Best Fit (Best Fit) rule, namely the preset cloud server instance corresponding to the target resource configuration information, when the corresponding task to be processed is operated after being created, the left resource amount is the least, and at the moment, the cloud server instance expanded according to the target resource configuration information can be considered as the cloud server instance with the resource specification most suitable for the corresponding task to be processed.
Specifically, for any task to be processed, when the corresponding resource requirement information is matched with the resource configuration information corresponding to the preset cloud server instances, the specifications of the processor and the other heterogeneous resources in the initial matched resource configuration information are required to be greater than or equal to those of the processor and the other heterogeneous resources required by the task to be processed. The memory resources in the initial matching resource configuration information need to be larger than the memory specification required by the task to be processed.
For a certain task to be processed, if multiple initial matching resource configuration information is matched, the degree of difference between different initial matching resource configuration information and resource requirement information can be determined according to the difference between each resource configuration in certain initial matching resource configuration information and the corresponding resource requirement of the task to be processed. Generally, the smaller the difference between the resource specification in the initial matching resource configuration information and the resource demand of the task to be processed, the higher the matching degree between the initial matching resource configuration information and the resource demand information of the task to be processed. Therefore, the initial matching resource configuration information with the smallest degree of difference can be regarded as the target resource configuration information.
When the resource specification of the same type in the plurality of initial matching resource configuration information is out of phase with the resource demand difference of the task to be processed, the difference of other types of resources can be compared. When comparing, a differential comparison priority may be set for different types of resources, e.g., the comparison priority for a resource differential may be processor > memory > other heterogeneous resources. Other heterogeneous resources may include, among other things, network bandwidth, operating systems of cloud server instances, and so forth. For example, a certain task to be processed has a resource requirement of a 2-core processor and a 6G memory, and two kinds of initial matching resource configuration information are provided, wherein the first kind of initial matching resource configuration information corresponds to a resource specification of a 4-core CPU and an 8G memory, and the second kind of initial matching resource configuration information corresponds to a resource specification of the 4-core CPU and the 16G memory. Since the two kinds of initial matching resource allocation information have the same processor specification as the difference of the processor requirements of the task to be processed, the difference of the memory specification and the memory requirements of the task to be processed can be compared. Because the difference between the memory and the memory requirement of the task to be processed in the first initial matching resource configuration information is small, the first initial matching resource configuration information can be used as target resource configuration information.
As an example, according to the resource configuration information shown in table 1 and the resource requirement information of the task to be processed shown in table 2, after the two information are matched, the target resource configuration information corresponding to each task to be processed can be obtained, and then the preset cloud server instance type corresponding to the target resource configuration information and the number of target cloud server instances required to expand the corresponding preset cloud server instance type are obtained. Table 3 is a cloud server instance expansion information table of a task to be processed, which is shown in an exemplary embodiment, and as shown in table 3, the expansion information of cloud server instances corresponding to four tasks to be processed is shown in the table, wherein the expansion information of cloud server instances corresponding to task 1 to be processed is a preset cloud server instance of type a, and the number of required expansion cloud server instances is 1. The expansion information of the cloud server instance corresponding to the task 2 to be processed is a preset cloud server instance of type B, and the number of the cloud server instances to be expanded is 1. The expansion information of the cloud server instance corresponding to the task to be processed 3 is a preset cloud server instance of the C type, and the number of the cloud server instances to be expanded is 2.
Table 3 pending task cloud server instance expansion information table
However, when the resource requirement information of the task to be processed is matched with the resource configuration information corresponding to the multiple preset cloud server instances, not all the resource requirements of the task to be processed can be matched to obtain the corresponding target resource configuration information. When a certain task to be processed is not matched to obtain target resource configuration information, the condition that the resource configuration information set by a terminal object for a computing cluster cannot meet the capacity expansion requirement is indicated, and at the moment, a management console can send a prompt to the computing cluster. In particular, in the absence of target resource configuration information, a configuration change request may be sent to the computing cluster to cause the computing cluster to change cloud server instance configuration information in response to the configuration change request. In practical application, if the target resource configuration information does not exist, it indicates that the resource configuration information of the preset cloud server instance set by the terminal object cannot meet the capacity expansion requirement of the task to be processed, at this time, the management console may send a configuration change request to the management node in the computing cluster, after the terminal object receives the configuration change request through the management node, the terminal object may reset the resource configuration information of the preset cloud server instance configured during capacity expansion of the computing cluster, or set the task to be processed, which is not matched with the target resource configuration information, to continue waiting, so as to wait for the cloud server instance where the terminal object is located to process the task. Under the condition that the target resource configuration information does not exist, a configuration change request is sent to the computing cluster to remind the terminal object to change the cloud server instance configuration information in the computing cluster, so that the expandability of the computing cluster is improved, the terminal is convenient to use the computing cluster by using the object, and the experience of using the cloud platform by using the object by the terminal is improved.
As an example, for the task 4 to be processed in table 2, since the resource requirement information corresponding to the task 4 to be processed is a 64-core CPU, 128G memory, and one cloud server instance, the resource allocation specifications of the three preset cloud server instances in table 1 set by the terminal object cannot meet the resource requirement of the task 4 to be processed. As shown in table 3, the pending task 4 does not have corresponding target resource configuration information, in which case a configuration change request may be sent to the computing cluster.
S107: creating a target cloud server instance based on the target resource configuration information; the target cloud server instance is used for processing the task to be processed.
In the embodiment of the application, after the target resource configuration information is determined, the target cloud server instance can be created according to the target resource configuration information, and a corresponding number of target cloud server instances can be expanded according to the expansion information of the cloud server instance, so that the task to be processed can be processed. Specifically, the console may invoke other IaaS services, such as computing, storing, and network, to manage the basic resources, create a cloud server instance according to the resource configuration in the target resource configuration information, and configure the basic environments such as the mounted storage, and the network.
After the target cloud server instance is created, the newly created target cloud server instance also needs to be added into the computing cluster, so that the target cloud server instance can be managed by a management node in the computing cluster. Specifically, a communication link between the target cloud server instance and the management node in the computing cluster is established, so that the management node in the computing cluster issues a task to be processed to the target cloud server instance for processing based on the communication link. By establishing a communication link between the target cloud server instance and the management node in the computing cluster, the target cloud server instance is added into the computing cluster, so that the management node can issue a task to be processed to the target cloud server instance for processing, the capacity expansion of the computing cluster is realized, the waiting time of the task to be processed is reduced, and the task processing efficiency is improved.
In practical applications, the communication link between the target cloud server instance and the management node in the computing cluster may be established by installing a management application program, such as a scheduler, in the target cloud server instance, and establishing a connection relationship between the management application program installed in the target cloud server instance and the management application program in the management node. In some embodiments, the management application installed in the management node may be a manager application and the management application installed in the target cloud server instance may be a manager application.
FIG. 4 is a flow diagram illustrating a process for expanding a computing cluster according to an example embodiment. As shown in fig. 4, a data acquisition application program in a cloud server instance in a computing cluster acquires task information to be processed in the corresponding cloud server instance, and reports the acquired data to a management console. The access layer of the management and control console can receive the task information to be processed reported by the computing cluster, then route the received task information to the management and control side corresponding to the computing cluster for processing, when the management and control layer determines that a certain task to be processed meets the capacity expansion condition, the management and control layer can call other resources corresponding to IssS service management, such as basic services of computing, storage, network and the like, to create a target cloud server instance corresponding to the task to be processed, and finally add the newly created target cloud server instance into the computing cluster.
In the embodiment of the application, in order to avoid that the idle cloud server instance in the computing cluster continuously occupies resources on the cloud and continuously charges, the management and control console can also perform capacity reduction processing on the computing cluster, so that the idle cloud server instance in the computing cluster is cleared, and the idle cloud server instance is prevented from continuously occupying the resources on the cloud.
For automatic capacity reduction, when the management and control console performs capacity reduction on the computing cluster, it is first required to determine whether the computing cluster meets the capacity reduction condition. Specifically, it is first determined whether the terminal object is configured with an automatic capacity reduction option, and if the terminal object is not configured with an automatic capacity reduction option for the computing cluster, the console cannot automatically reduce the capacity of the computing cluster. If the terminal object configures an automatic capacity reduction option for the computing cluster, the management and control console can automatically reduce the capacity of the computing cluster, and in this case, the management and control console can judge the working state of each cloud server instance in the computing cluster according to the cloud server instance state information reported by the data acquisition application program in each cloud server instance. Specifically, the cloud server instance state information corresponding to each cloud server instance includes whether the cloud server instance is in a busy state, namely a task processing state, and if so, the working state of the cloud server instance is indicated to be the busy state. If not, indicating that the working state of the cloud server instance is a busy state, and determining that the computing cluster meets the capacity reduction condition by the console. In some embodiments, the cloud server instance state information corresponding to each cloud server instance includes the last task processing completion time of the cloud server instance and the current working state of the cloud server instance, and when determining whether the working state of each cloud server instance is an idle state, the console can combine the last task processing completion time with the current working state of the cloud server instance, so that accuracy in judging the working state of the cloud server instance is improved.
When the management and control console performs automatic capacity reduction processing on the computing cluster, cloud server instance state information corresponding to each cloud server instance in the computing cluster can be obtained. The cloud server instance state information is used to characterize the operational state of each cloud server instance in the computing cluster. And the management and control console determines an idle cloud server instance with an idle working state in the computing cluster according to the working state of each cloud server instance in the computing cluster, and then sends the capacity reduction information to the computing cluster so as to disconnect a communication link between a management node in the computing cluster and the idle cloud server instance. By acquiring the state of each cloud server instance in the computing cluster, the idle cloud server instance with the working state being the idle state can be determined, and then a capacity-shrinking prompt is sent to the computing cluster so as to prevent the idle cloud server instance from continuously charging, thereby reducing the use cost of the computing cluster and improving the use experience of a terminal using object. Claim 8 claim
In the embodiment of the application, after the management node in the computing cluster breaks the communication link with the idle cloud server instance, the idle cloud server instance may be logged off. The cloud resources occupied by the idle cloud server instance can be released by logging off the idle cloud server instance, so that the utilization rate of the cloud resources can be improved, the cluster maintenance cost is reduced, and the utilization rate of the server resources is improved.
In practical application, after determining that the computing cluster meets the capacity reduction condition, the management console may send the computing capacity reduction information to a management node in the computing cluster, and the management node in the computing cluster may break a communication link with an idle cloud server instance. The management node can disconnect the idle cloud server instance and a communication link between the idle cloud server instance and the idle cloud server instance by unloading the management application program in the idle cloud server instance, so that the information of the idle cloud server instance is removed in the computing cluster, the management node does not sense the idle cloud server instance any more, and then the management and control console can destroy the cloud server, clear the environment and return resources such as a processor, a memory and the like corresponding to the idle cloud server instance.
According to the resource management method, the resource consumption required by the task to be processed, the waiting processing time of which exceeds the time threshold, in the computing cluster is obtained, the configured cloud server instance specification of the terminal object is matched, the terminal object is helped to automatically expand the cloud server instance on the cloud, the cloud server instance on the cloud is added into the computing cluster, and accordingly the on-demand expansion of the computing cluster is completed. And under the condition that the cloud server instance in the computing cluster is idle, the cloud server instance in the computing cluster can be automatically destroyed, the cloud server resource can be flexibly used, the resource utilization rate is provided, and the use cost is reduced. Moreover, the computing clusters are automatically expanded or contracted based on the tasks to be processed, so that the utilization rate of resources on the cloud can be improved, the cluster maintenance cost is reduced, and the utilization rate of server resources is improved.
The embodiment of the application also provides a resource management device, and fig. 5 is a block diagram of the resource management device according to an exemplary embodiment. As shown in fig. 5, the resource management device may include at least:
the acquisition module 201 is configured to acquire task information to be processed and cloud server instance configuration information in a computing cluster; the task information to be processed comprises the task to be processed with the waiting time exceeding a time threshold and resource demand information corresponding to the task to be processed; the cloud server instance configuration information comprises at least one resource configuration information corresponding to a preset cloud server instance;
the matching module 203 is configured to match each resource configuration information with resource requirement information respectively, so as to obtain a matching result of each resource configuration information; the matching result comprises the difference degree of each resource configuration information and resource demand information;
a target resource configuration information determining module 205, configured to determine target resource configuration information, where the degree of difference between the target resource configuration information and the resource demand information meets a preset condition, from at least one resource configuration information according to the matching result;
a target cloud server instance creation module 207 for creating a target cloud server instance based on the target resource configuration information; the target cloud server instance is used for processing the task to be processed.
As an alternative embodiment, the resource requirement information includes processor requirement information and memory requirement information; the resource configuration information comprises processor configuration information and memory configuration information; the matching module comprises:
the initial matching resource configuration information determining submodule is used for respectively matching each type of processor configuration information with the processor demand information and respectively matching each type of memory configuration information with the memory demand information to obtain initial matching resource configuration information; processor configuration information of the initial matching resource configuration information is matched with processor demand information, and memory configuration information of the initial matching resource configuration information is matched with memory demand information;
and the matching result determining submodule is used for calculating the difference degree based on the resource demand information and the initial matching resource configuration information to obtain a matching result.
As an alternative embodiment, the matching result determining submodule includes:
the processor difference information determining unit is used for performing difference calculation based on the processor demand information and the processor configuration information in the initial matching resource configuration information to obtain processor difference information;
the memory difference information determining unit is used for performing difference calculation based on the memory demand information and the memory configuration information in the initial matching resource configuration information to obtain memory difference information;
And the matching result determining unit is used for determining a matching result based on the processor difference information and the memory difference information.
As an alternative embodiment, the target resource configuration information determining module includes:
the target matching resource configuration information determining submodule is used for determining resource configuration information of which the processor difference information meets preset conditions in the initial matching resource configuration information according to the processor difference information to obtain target matching resource configuration information;
and the target resource allocation information determining sub-module is used for determining the resource allocation information of which the memory difference information meets the preset condition in the target matching resource allocation information according to the memory difference information under the condition that the target matching resource allocation information is not unique, so as to obtain the target resource allocation information.
As an optional implementation manner, the target resource configuration information determining submodule is further configured to take the target matching resource configuration information as target resource configuration information in a case that the target matching resource configuration information is unique.
As an alternative embodiment, the apparatus further comprises:
and the configuration change request sending module is used for sending a configuration change request to the computing cluster under the condition that the target resource configuration information does not exist, so that the computing cluster responds to the configuration change request to change the cloud server instance configuration information.
As an alternative embodiment, the apparatus further comprises:
the communication link establishment module is used for establishing a communication link between the target cloud server instance and the management node in the computing cluster so that the management node in the computing cluster can issue a task to be processed to the target cloud server instance for processing based on the communication link.
As an alternative embodiment, the apparatus further comprises:
the cloud server instance state information acquisition module is used for acquiring cloud server instance state information corresponding to each cloud server instance in the computing cluster; the cloud server instance state information is used for representing the working state of each cloud server instance in the computing cluster;
the idle cloud server instance determining module is used for determining an idle cloud server instance with an idle working state in the computing cluster according to the working state of each cloud server instance in the computing cluster;
and the communication link disconnection module is used for sending the capacity reduction information to the computing cluster so as to disconnect the communication link between the management node in the computing cluster and the idle cloud server instance.
As an alternative embodiment, the apparatus comprises:
and the cancellation module is used for canceling the idle cloud server instance.
It should be noted that, the resource management device embodiments provided in the embodiments of the present application and the method embodiments described above are based on the same inventive concept.
The embodiment of the application also provides an electronic device for resource management, which comprises a processor and a memory, wherein at least one instruction or at least one section of program is stored in the memory, and the at least one instruction or the at least one section of program is loaded and executed by the processor to realize the resource management method provided by any embodiment.
Embodiments of the present application also provide a computer readable storage medium that may be provided in a terminal to store at least one instruction or at least one program for implementing a resource management method in a method embodiment, where the at least one instruction or the at least one program is loaded and executed by a processor to implement the resource management method as provided in the method embodiment described above.
Alternatively, in the present description embodiment, the storage medium may be located in at least one network server among a plurality of network servers of the computer network. Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The memory of the embodiments of the present specification may be used for storing software programs and modules, and the processor executes various functional applications and data processing by executing the software programs and modules stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for functions, and the like; the storage data area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide access to the memory by the processor.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the resource management method provided by the above-mentioned method embodiment.
The method embodiments provided in the embodiments of the present application may be performed in a terminal, a computer terminal, a server, or similar computing resource management device. Taking the example of running on a server, fig. 6 is a block diagram of a hardware structure of a server of a resource management method according to an exemplary embodiment. As shown in fig. 6, the server 300 may vary considerably in configuration or performance, and may include one or more central processing units (Central Processing Units, CPU) 310 (the central processing unit 310 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA), a memory 330 for storing data, one or more storage mediums 320 (e.g., one or more mass storage devices) for storing applications 323 or data 322. Wherein the memory 330 and the storage medium 320 may be transitory or persistent storage. The program stored in the storage medium 320 may include one or more modules, each of which may include a series of instruction operations on a server. Still further, the central processor 310 may be configured to communicate with the storage medium 320 and execute a series of instruction operations in the storage medium 320 on the server 300. The server 300 may also include one or more power supplies 360, one or more wired or wireless network interfaces 350, one or more input/output interfaces 340, and/or one or more operating systems 321, such as Windows ServerTM, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
The input-output interface 340 may be used to receive or transmit data via a network. The network specific cloud server examples described above may include a wireless network provided by a communication provider of server 300. In a cloud server example, the input/output interface 340 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example of a cloud server, the input/output interface 340 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 6 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the server 300 may also include more or fewer components than shown in fig. 6, or have a different configuration than shown in fig. 6.
It should be noted that: the foregoing sequence of the embodiments of the present application is only for describing, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive 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 the device and server embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and references to the parts of the description of the method embodiments are only required.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or may be implemented by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the present application is not intended to be limiting, but rather is intended to cover any and all modifications, equivalents, alternatives, and improvements within the spirit and principles of the present application.

Claims (13)

1. A method of resource management, the method comprising:
acquiring task information to be processed and cloud server instance configuration information in a computing cluster; the task information to be processed comprises a task to be processed with waiting time exceeding a time threshold and resource demand information corresponding to the task to be processed; the cloud server instance configuration information comprises at least one resource configuration information corresponding to a preset cloud server instance;
Matching each resource configuration information with the resource demand information respectively to obtain a matching result of each resource configuration information; the matching result comprises the difference degree of each resource configuration information and the resource demand information;
according to the matching result, determining target resource configuration information with the difference degree with the resource demand information meeting a preset condition from at least one resource configuration information;
creating the target cloud server instance based on the target resource configuration information; and the target cloud server instance is used for processing the task to be processed.
2. The method of claim 1, wherein the resource requirement information includes processor requirement information and memory requirement information; the resource configuration information comprises processor configuration information and memory configuration information; the step of matching each resource configuration information with the resource demand information to obtain a matching result of each resource configuration information comprises the following steps:
matching each type of processor configuration information with the processor demand information respectively, and matching each type of memory configuration information with the memory demand information respectively to obtain initial matching resource configuration information; processor configuration information of the initial matching resource configuration information is matched with the processor demand information, and memory configuration information of the initial matching resource configuration information is matched with the memory demand information;
And calculating the difference degree based on the resource demand information and the initial matching resource configuration information to obtain the matching result.
3. The method according to claim 2, wherein said calculating the degree of difference based on the resource requirement information and the initial matching resource configuration information to obtain the matching result includes:
performing difference calculation based on the processor demand information and the processor configuration information in the initial matching resource configuration information to obtain processor difference information;
performing difference calculation based on the memory demand information and the memory configuration information in the initial matching resource configuration information to obtain memory difference information;
and determining the matching result based on the processor difference information and the memory difference information.
4. The method according to claim 3, wherein the determining, from at least one of the resource configuration information, target resource configuration information whose degree of difference from the resource demand information satisfies a preset condition according to the matching result includes:
determining resource configuration information of which the processor difference information meets preset conditions in the initial matching resource configuration information according to the processor difference information to obtain target matching resource configuration information;
And under the condition that the target matching resource allocation information is not unique, determining resource allocation information of which the memory difference information meets preset conditions in the target matching resource allocation information according to the memory difference information, and obtaining the target resource allocation information.
5. The method according to claim 4, wherein after determining, from the initial matching resource configuration information, resource configuration information for which the processor difference information satisfies a preset condition according to the processor difference information, the method further comprises:
and under the condition that the target matching resource configuration information is unique, taking the target matching resource configuration information as the target resource configuration information.
6. The method according to claim 1, wherein the method further comprises:
and sending a configuration change request to the computing cluster in the absence of the target resource configuration information, so that the computing cluster responds to the configuration change request to change the cloud server instance configuration information.
7. The method according to any one of claims 1 to 6, further comprising:
And establishing a communication link between the target cloud server instance and a management node in the computing cluster, so that the management node in the computing cluster can issue the task to be processed to the target cloud server instance for processing based on the communication link.
8. The method according to claim 1, wherein the method further comprises:
acquiring cloud server instance state information corresponding to each cloud server instance in the computing cluster; the cloud server instance state information is used for representing the working state of each cloud server instance in the computing cluster;
according to the working state of each cloud server instance in the computing cluster, determining an idle cloud server instance with the working state of an idle state in the computing cluster;
and sending the capacity reduction information to the computing cluster so as to enable the management node in the computing cluster to break a communication link with the idle cloud server instance.
9. The method of claim 8, wherein after said sending of the shrink information to the computing cluster to cause a management node in the computing cluster to break a communication link with an idle cloud server instance, the method comprises:
And logging off the idle cloud server instance.
10. A resource management apparatus, the apparatus comprising:
the acquisition module is used for acquiring task information to be processed and cloud server instance configuration information in the computing cluster; the task information to be processed comprises a task to be processed with waiting time exceeding a time threshold and resource demand information corresponding to the task to be processed; the cloud server instance configuration information comprises at least one resource configuration information corresponding to a preset cloud server instance;
the matching module is used for respectively matching each resource configuration information with the resource demand information to obtain a matching result of each resource configuration information; the matching result comprises the difference degree of each resource configuration information and the resource demand information;
the target resource allocation information determining module is used for determining target resource allocation information, the degree of difference of which and the resource demand information meets preset conditions, from at least one piece of resource allocation information according to the matching result;
the target cloud server instance creation module is used for creating the target cloud server instance based on the target resource configuration information; and the target cloud server instance is used for processing the task to be processed.
11. An electronic device for resource management, characterized in that the device comprises a processor and a memory, in which at least one instruction or at least one program is stored, which at least one instruction or at least one program is loaded by the processor and which performs the resource management method according to any of claims 1-9.
12. A computer readable storage medium having stored therein at least one instruction or at least one program loaded and executed by a processor to implement the resource management method of any of claims 1-9.
13. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the resource management method of any of claims 1-9.
CN202311418446.1A 2023-10-27 2023-10-27 Resource management method, device, equipment and storage medium Pending CN117608823A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311418446.1A CN117608823A (en) 2023-10-27 2023-10-27 Resource management method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311418446.1A CN117608823A (en) 2023-10-27 2023-10-27 Resource management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117608823A true CN117608823A (en) 2024-02-27

Family

ID=89945064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311418446.1A Pending CN117608823A (en) 2023-10-27 2023-10-27 Resource management method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117608823A (en)

Similar Documents

Publication Publication Date Title
CN108737270B (en) Resource management method and device for server cluster
CN109729143B (en) Deploying a network-based cloud platform on a terminal device
CN115328663B (en) Method, device, equipment and storage medium for scheduling resources based on PaaS platform
CN110958281B (en) Data transmission method and communication device based on Internet of things
CN107135279B (en) Method and device for processing long connection establishment request
CN111787069A (en) Method, device and equipment for processing service access request and computer storage medium
CN106445473B (en) container deployment method and device
EP3635547B1 (en) Systems and methods for preventing service disruption during software updates
CN109766172B (en) Asynchronous task scheduling method and device
CN110333939B (en) Task mixed scheduling method and device, scheduling server and resource server
CN106648900B (en) Supercomputing method and system based on smart television
CN106911741B (en) Method for balancing virtual network management file downloading load and network management server
CN114296953A (en) Multi-cloud heterogeneous system and task processing method
CN110113176B (en) Information synchronization method and device for configuration server
CN114327846A (en) Cluster capacity expansion method and device, electronic equipment and computer readable storage medium
CN112631756A (en) Distributed regulation and control method and device applied to space flight measurement and control software
CN107045452B (en) Virtual machine scheduling method and device
CN110995802A (en) Task processing method and device, storage medium and electronic device
CN117608823A (en) Resource management method, device, equipment and storage medium
CN116032932A (en) Cluster management method, system, equipment and medium for edge server
CN113535402A (en) Load balancing processing method and device based on 5G MEC and electronic equipment
CN115714774A (en) Calculation force request, calculation force distribution and calculation force execution method, terminal and network side equipment
CN112799849A (en) Data processing method, device, equipment and storage medium
CN111901421A (en) Data processing method and related equipment
CN112104506B (en) Networking method, networking device, server and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication