CN117130786A - Resource allocation method, device, equipment and readable medium - Google Patents

Resource allocation method, device, equipment and readable medium Download PDF

Info

Publication number
CN117130786A
CN117130786A CN202311119192.3A CN202311119192A CN117130786A CN 117130786 A CN117130786 A CN 117130786A CN 202311119192 A CN202311119192 A CN 202311119192A CN 117130786 A CN117130786 A CN 117130786A
Authority
CN
China
Prior art keywords
application
resource
information
value
allocation
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
CN202311119192.3A
Other languages
Chinese (zh)
Inventor
陈燚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Duodian Life Chengdu Technology Co ltd
Original Assignee
Duodian Life Chengdu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Duodian Life Chengdu Technology Co ltd filed Critical Duodian Life Chengdu Technology Co ltd
Priority to CN202311119192.3A priority Critical patent/CN117130786A/en
Publication of CN117130786A publication Critical patent/CN117130786A/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/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • 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
    • 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 embodiment of the disclosure discloses a resource allocation method, a device, equipment and a readable medium. One embodiment of the method comprises the following steps: determining total resource information of a preset database cluster; determining the use resource information of a preset database cluster; determining value information of a preset database cluster; determining an application identification set; determining an application allocation value of each application identifier in the application identifier set to obtain an application allocation value set; determining the allocation value of each application meeting the first preset screening condition as a target application allocation value set; determining an application identifier corresponding to each target application allocation value in the target application allocation value set as a target application identifier to obtain a target application identifier set; determining each piece of application allocation resource quota information as an application allocation resource quota information set; and adjusting the application allocation resource quota information. This embodiment reduces the waste of computer storage resources, network resources, and computing resources.

Description

Resource allocation method, device, equipment and readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a method, an apparatus, a device, and a readable medium for resource allocation.
Background
Application allocated resource quota information adjustment is a technique for adjusting the application allocated resource quota. Currently, when adjusting allocated resource quota, the following methods are generally adopted: the method comprises the steps of adjusting the allocated resource quota information of the application manually according to the importance of the application or adjusting the allocated resource quota of the application with large use demand according to the use demand of the application, so as to adjust the allocated resource quota information of the application.
However, when the above manner is adopted to adjust the allocated resource quota information, there are often the following technical problems:
firstly, directly according to the importance of the application, the information adjustment of the allocated resource quota of the application is manually carried out, certain subjectivity exists, and for more important applications, when the allocated resource quota of the application is far greater than the actually required demand quota, the situation of excessive allocation of the resource quota of the application exists, so that the resource utilization rate is low, and further the waste of storage resources, network resources and computing resources of a computer is caused.
Secondly, the method for adjusting the allocation resource quota of the application with large usage demand directly according to the usage demand of the application can cause resource competition and conflict when the application with large usage demand after adjustment simultaneously executes the operation of the database, so that the database access is blocked and delayed. At the same time, highly concurrent database operations may cause data loss, resulting in an increase in the number of failed operations to perform the database operations, requiring re-execution of the database operations. Further, the waste of computer power resources is caused.
The above information disclosed in this background section is only for enhancement of understanding of the background of the inventive concept and, therefore, may contain information that does not form the prior art that is already known to those of ordinary skill in the art in this country.
Disclosure of Invention
The disclosure is in part intended to introduce concepts in a simplified form that are further described below in the detailed description. The disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose resource allocation methods, apparatuses, electronic devices, and computer-readable media to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a resource allocation method, the method comprising: in response to detecting the resource allocation imbalance through the resource monitoring tool, determining total resource information of a preset database cluster in a single instance; determining the use resource information of the preset database cluster in the single instance; determining value information of the preset database cluster corresponding to the single instance based on the total resource information and the usage resource information; determining application identifiers of all applications calling the preset database cluster as an application identifier set; determining an application allocation value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set to obtain an application allocation value set; determining each application sharing value meeting a first preset screening condition in the application sharing value set as a target application sharing value set; determining an application identifier corresponding to each target application allocation value in the target application allocation value set as a target application identifier to obtain a target application identifier set; determining each piece of application allocation resource quota information corresponding to the target application identification set as an application allocation resource quota information set, wherein a target application identification in the target application identification set corresponds to the application allocation resource quota information in the application allocation resource quota information set; and for each application allocation resource quota information in the application allocation resource quota information set, adjusting the application allocation resource quota information to obtain adjusted application allocation resource quota information, and distributing resources corresponding to the adjusted application allocation resource quota information to the application of the corresponding application identifier.
In a second aspect, some embodiments of the present disclosure provide a resource allocation apparatus, the apparatus comprising: a first determining unit configured to determine total resource information of a preset database cluster at a single instance in response to detection of a resource allocation imbalance by the resource monitoring tool; a second determining unit configured to determine usage resource information of the preset database cluster in the single instance; a third determining unit configured to determine value information of the preset database cluster corresponding to the single instance based on the total resource information and the usage resource information; a fourth determining unit configured to determine application identifiers of respective applications calling the preset database cluster as an application identifier set; a fifth determining unit configured to determine an application allocation value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, to obtain an application allocation value set; a sixth determining unit configured to determine, as a target application allocation value set, each application allocation value satisfying a first preset screening condition in the application allocation value set; a seventh determining unit configured to determine an application identifier corresponding to each target application allocation value in the target application allocation value set as a target application identifier, to obtain a target application identifier set; an eighth determining unit configured to determine each piece of application allocation resource quota information corresponding to the target application identification set as an application allocation resource quota information set, where a target application identification in the target application identification set corresponds to the application allocation resource quota information in the application allocation resource quota information set; the adjusting unit is configured to adjust the application allocation resource quota information for each application allocation resource quota information in the application allocation resource quota information set to obtain adjusted application allocation resource quota information, and allocate resources corresponding to the adjusted application allocation resource quota information to the application corresponding to the application identifier.
In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors causes the one or more processors to implement the method described in any of the implementations of the first aspect above.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
The above embodiments of the present disclosure have the following advantageous effects: by the resource allocation method of some embodiments of the present disclosure, waste of storage resources, network resources and computing resources of the computer is reduced. Specifically, the storage resources, network resources, and computing resources of the computer are wasted because: directly according to the importance of the application, the information adjustment of the allocated resources quota of the application is performed manually, certain subjectivity exists, and for important applications, when the allocated resources quota of the application is far greater than the actually required demand quota, the situation of excessive allocation of the resources quota of the application exists, so that the resource utilization rate is low, and further, the waste of storage resources, network resources and computing resources of the computer is caused. Based on this, the resource allocation method of some embodiments of the present disclosure first determines total resource information of the preset database cluster at a single instance in response to detecting a resource allocation imbalance through the resource monitoring tool. Thus, the total resource information can be determined. And then determining the use resource information of the preset database cluster in the single instance. And then, determining the value information of the preset database cluster corresponding to the single instance based on the total resource information and the use resource information. Thereby, value information for determining the application allocation value corresponding to each application identifier can be used. And then, determining the application identifier of each application calling the preset database cluster as an application identifier set. Thereby, application identifiers of each application calling the preset database cluster can be obtained. And then, determining the application allocation value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set to obtain an application allocation value set. Thus, a set of application allocation values characterizing the individual application allocation values actually required by the individual applications can be obtained. And then, determining each application sharing value meeting the preset screening condition in the application sharing value set as a target application sharing value set. Therefore, a target application allocation value set can be obtained, and the target application allocation value set can represent application allocation values with higher application allocation values. And then, determining the application identifier corresponding to each target application allocation value in the target application allocation value set as a target application identifier to obtain a target application identifier set. Thus, a target application identifier set representing each application identifier corresponding to each application with higher application allocation value can be obtained. And then, determining each piece of application allocation resource quota information corresponding to the target application identification set as an application allocation resource quota information set, wherein the target application identification in the target application identification set corresponds to the application allocation resource quota information in the application allocation resource quota information set. Therefore, the application allocation resource quota information set corresponding to the application with higher allocation value of each application can be obtained. And finally, for each application allocation resource quota information in the application allocation resource quota information set, adjusting the application allocation resource quota information to obtain adjusted application allocation resource quota information, and allocating the resources corresponding to the adjusted application allocation resource quota information to the application of the corresponding application identifier. Therefore, the application allocation resource quota information with higher application allocation value can be adjusted, the adjusted application allocation resource quota information is obtained, and the resources corresponding to the adjusted application allocation resource quota information are allocated to the application corresponding to the application identifier. And determining the allocation resource quota information of each application corresponding to each application with higher allocation value according to the application allocation value set of the resources actually required by each application. The determined information of the allocated resource quota of each application is adjusted, the influence of subjective factors does not exist in the adjustment process, the situation of excessive allocation of the application resource quota is reduced, and the resource utilization rate is improved. Furthermore, the waste of storage resources, network resources and computing resources of the computer is reduced.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of some embodiments of a resource allocation method according to the present disclosure;
FIG. 2 is a schematic structural diagram of some embodiments of a resource allocation apparatus according to the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings. Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates a flow 100 of some embodiments of a resource allocation method according to the present disclosure. The resource allocation method comprises the following steps:
In step 101, in response to detecting the resource allocation imbalance through the resource monitoring tool, determining total resource information of the preset database cluster in a single instance.
In some embodiments, the execution body (e.g., a computing device) of the resource allocation method may determine total resource information in the database cluster information corresponding to the preset database cluster provided by the user (database vendor) as total resource information of the preset database cluster in a single instance. Wherein the single instance may refer to each database instance deployed and running in a separate computing environment. The preset database cluster may be a preset database cluster. The database cluster information may represent a specification of a database cluster configuration. The database cluster information may include, but is not limited to, at least one of: total resource information, number of nodes. The total resource information may represent the allocated computer resources of the preset database cluster in a single instance. For example, the total resource information may include, but is not limited to, at least one of: computing resources, storage resources, and network resources. The computing resources may be represented by the number of processors, the storage resources may be represented by storage capacity, and the network resources may be represented by network bandwidth. For example, the total resource information may be { computing resources: 5 processors, storage resources: 6TB, network resources: 280 Mbps. The resource monitoring tool may be a Zabbix monitoring tool. The above-mentioned resource allocation imbalance may refer to a state in which an application acquires excessive system resources relative to its actual demand, resulting in other applications not acquiring enough resource operation. The application may refer to a software program.
Step 102, determining the use resource information of the preset database cluster in a single instance.
In some embodiments, the executing entity may determine the usage resource information of the preset database cluster in the single instance. The usage resource information may represent computer resources consumed by the preset database cluster when the single instance operates. In practice, first, the executing entity may determine each node of the preset database cluster in the single instance. The execution body may then determine that the respective nodes use resources at the node of the single instance. And then, according to the determined node use resources of each node, integrating the node use resources of each node to obtain integrated resources. Wherein, the integrated resource comprises: the sum of the respective node computing resources corresponding to the respective nodes, the sum of the respective node storage resources corresponding to the respective nodes, and the sum of the respective node network resources corresponding to the respective nodes. Finally, the execution body may determine the integrated resource as usage resource information of the preset database cluster in the single instance. Wherein the nodes may be database nodes. The node use resource may be a computer resource consumed by the node when performing a task or processing a request. The node use resource may include: node computing resources, node storage resources, and node network resources. As an example, each node of the above single instance may be { node 1, node 2}. The node usage resource of the node 1 in the { node 1, node 2} may be { node calculation resource: 1 processor, node storage resource: 0.5TB, node network resource: 80Mbps }, the node usage resources of node 2 may be { node computing resources: 2 processors, node storage resources: 0.5TB, node network resource: 60Mbps }, the usage resource information of the preset database cluster in the single instance may be { computing resource: 3 processors, storage resources: 1TB, network resources: 140Mbps }.
And step 103, determining the value information of the single instance corresponding to the preset database cluster based on the total resource information and the use resource information.
In some embodiments, the executing entity may determine the value information of the preset database cluster corresponding to the single instance based on the total resource information and the usage resource information. The value information may be a value corresponding to a computing resource included in the use resource information, a value corresponding to a storage resource included in the use resource information, or a value corresponding to a network resource included in the use resource information.
In some optional implementations of some embodiments, the executing entity may determine the value information of the preset database cluster corresponding to the single instance based on the total resource information and the usage resource information by:
and a first step of determining the computing resource in the total resource information as a first computing resource.
And a second step of determining the computing resource in the usage resource information as a second computing resource.
And thirdly, determining the value of the computing resource according to the first computing resource, the second computing resource and the first preset value corresponding to the first computing resource. In practice, first, the execution body may determine a ratio of the second computing resource to the first computing resource as a first target ratio. Then, the execution body may determine a product of the first target ratio and the first preset value as a computing resource value. As an example, the first computing resource may be represented as 5 processors, the second computing resource may be represented as 3 processors, and the first preset value may be 1000. The above-mentioned calculation resource value may be 3/5×1000=600.
Fourth, the storage resource in the total resource information is determined as the first storage resource.
And fifthly, determining the storage resource in the use resource information as a second storage resource.
And sixthly, determining the value of the storage resource according to the first storage resource and the second preset value corresponding to the second storage resource and the first storage resource. In practice, first, the execution body may determine a ratio of the second storage resource to the first storage resource as a second target ratio. Then, the execution body may determine a product of the second target ratio and the second preset value as a storage resource value. As an example, the first storage resource may be represented as 6TB, the second computing resource may be represented as 1TB, and the second preset value may be 600. The above-mentioned calculation resource value may be 1/6 x 600 = 100.
And seventh, determining the network resource in the total resource information as a first network resource.
Eighth, determining the network resource in the usage resource information as a second network resource.
And a ninth step of determining a network resource value according to the first network resource, the third preset value corresponding to the second network resource and the first network resource. In practice, first, the executing entity may determine a ratio of the second network resource to the first network resource as a third target ratio. Then, the execution body may determine a product of the third target ratio and the third preset value as a storage resource value. As an example, the first storage resource may be represented as 280Mbps, the second computing resource may be represented as 140Mbps, and the third preset value may be 400. The computing resource value may be 140/280 x 400 = 200.
And tenth, determining the value information of the preset database cluster corresponding to the single instance according to the calculated resource value, the storage resource value and the network resource value. In practice, the execution entity may determine the sum of the computing resource value, the storage resource value, and the network resource value as the value information corresponding to the single instance. For example, the value information may be a value 600+100+200=900 indicating that the value corresponds to.
And 104, determining application identifiers of all applications calling the preset database cluster as an application identifier set.
In some embodiments, the executing entity may determine an application identifier of each application that invokes the preset database cluster as an application identifier set. Wherein the application identifier may be a unique identifier code for distinguishing between different applications. For example, the application identifier of each application may be a, B, and the identifier set may be { a, B }. The application in each of the above applications may be a software program designed and developed to realize a specific function or provide a service.
Step 105, determining an application allocation value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, and obtaining an application allocation value set.
In some embodiments, the executing entity may determine an application allocation value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, to obtain an application allocation value set. Wherein the application apportionment value may represent an apportionment value determined when using the total consumption of the preset database cluster according to an application.
In some optional implementations of some embodiments, the executing entity may determine an application allocation value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, to obtain an application allocation value set by:
the first step, for each application identifier corresponding to the application identifier set, executing the following steps:
and step one, determining the calling times of the application to the preset database cluster in a preset time period. The preset time period may be 1 day. The number of calls may be 10.
And step two, determining the total time consumption of the application using the preset database cluster in the preset time period based on the calling times and the preset single calling time. In practice, the execution body may determine the product of the number of calls and the single call time as the total time consumption. For example, the preset single call time may be 5 minutes, and the total time may be 10×5=50 minutes.
Second, each determined total time consumption is determined as a total time consumption set. Wherein the total time consumption set may be {50 minutes, 100 minutes }.
And thirdly, determining an application allocation value corresponding to each application identifier in the application identifier set based on the total time consumption set and the value information to obtain an application allocation value set.
In some optional implementations of some embodiments, the executing entity may determine an application allocation value corresponding to each application identifier in the application identifier set based on the total time-consuming set and the value information, to obtain an application allocation value set by:
first, determining a first time consumption value according to the total time consumption set. In practice, the execution subject may determine the sum of the total elapsed times in the total elapsed time set as the first elapsed time value. As an example, the first time consuming value may be 50+100=150 minutes.
Second, for each total time consumption in the total time consumption set, the following processing steps are performed:
and step one, determining the application identifier corresponding to the total time consumption as a target application identifier.
And secondly, determining the time consumption value corresponding to the total time consumption as a second time consumption value.
And a third sub-step of generating an application allocation value corresponding to the target application identifier based on the first time consumption value, the second time consumption value and the value information. In practice, first, the execution subject may determine a ratio of the second time consumption value to the first time consumption value as a target time consumption ratio. Then, the executing entity may determine a product of the target time-consuming value and a value corresponding to the value information as an application allocation value corresponding to the target application identifier. For example, the target time consumption ratio may be 1/3, the value corresponding to the value information may be 900, and the application allocation value may be 1/3×900=300.
And thirdly, determining the generated application allocation values as an application allocation value set. For example, the application apportioned value set may be {300, 600}.
And 106, determining each application sharing value meeting the first preset screening condition in the application sharing value set as a target application sharing value set.
In some embodiments, the executing entity may determine each application sharing value satisfying the first preset screening condition in the application sharing value set as the target application sharing value set. The first preset screening condition may be that an application allocation value is greater than a preset threshold. The predetermined threshold may be 500. The target application apportioned value set may be {600}.
And 107, determining an application identifier corresponding to each target application allocation value in the target application allocation value set as a target application identifier, and obtaining a target application identifier set.
In some embodiments, the executing body may determine, as the target application identifier, an application identifier corresponding to each target application allocation value in the target application allocation value set, to obtain a target application identifier set. The target application identifier may be B, and the target application identifier set may be { B }.
And step 108, determining each application allocation resource quota information corresponding to the target application identification set as an application allocation resource quota information set.
In some embodiments, the executing entity may determine each application allocation resource quota information corresponding to the target application identification set as an application allocation resource quota information set. The target application identifier in the target application identifier set corresponds to application allocation resource quota information in the application allocation resource quota information set. The above-described application allocation resource quota information may be a maximum quota for allocating available resources for a program or service of the application. For example, the allocated resource quota information corresponding to the application identified as B by the application may be represented as { computing resource: 3 processors, storage resources: 3TB, network resources: 100Mbps }. The set of application allocation resource quota information may be expressed as { computing resources: 3 processors, storage resources: 3TB, network resources: 100Mbps }.
Step 109, adjusting the application allocation resource quota information to obtain adjusted application allocation resource quota information, and allocating the resources corresponding to the adjusted application allocation resource quota information to the application corresponding to the application identifier.
In some embodiments, the executing body may adjust the application allocation resource quota information for each application allocation resource quota information in the application allocation resource quota information set to obtain adjusted application allocation resource quota information, and allocate a resource corresponding to the adjusted application allocation resource quota information to an application corresponding to the application identifier. In practice, the execution subject may allocate resources corresponding to the adjusted application allocation resource quota information to the running application through the process scheduler. In some optional implementations of some embodiments, the executing body may adjust the application allocation resource quota information for each application allocation resource quota information in the application allocation resource quota information set by:
The method comprises the steps of firstly, reducing the computing resource quota in the application allocation resource quota information by a first preset value so as to update the computing resource quota. Wherein, the computing resource quota may be the number of processors allocated for the application program or service. For example, the computing resource quota may be 3, the first preset value may be 1, and the updated computing resource quota may be 3-1=2.
And a second step of reducing the storage resource quota in the application allocation resource quota information by a second preset value so as to update the storage resource quota. The storage resource quota may be an amount of memory allocated for a program or service of an application. For example, the storage resource quota may be 3TB, the second preset value may be 1TB, and the updated storage resource quota may be 3TB-1 tb=2 TB.
And thirdly, reducing the network resource quota in the application allocation resource quota information by a third preset value so as to update the network resource quota. The network resource quota may be a network bandwidth allocated for a program or service of an application. As an example, the network resource quota may be 100Mbps, the third preset value may be 50Mbps, and the updated network resource quota may be 100Mbps-50 mbps=50 Mbps.
Fourth, determining the updated computing resource quota, the updated storage resource quota, the updated network resource quota and the application identifier of the corresponding application allocation resource quota information as the adjusted application allocation resource quota information.
Optionally, the method further comprises:
the first step, a touch rate set corresponding to the application identifier set is obtained. The touch rate in the touch rate set corresponds to the application identifier in the application identifier set. The above-mentioned touch rate may represent a probability that the user uses the application within a preset period of time. For example, an application has 1000 target users and 600 users have used the application within a preset period of time, then the touchdown rate is 60% (or 0.6). The predetermined period of time may be 7 months of 2023. The set of reachability rates may be {60%,40% }.
And a second step of obtaining a preset grading set corresponding to the application identification set. The preset score in the preset score set may be a preset score of the user according to the relevance between the application and the core service function. In practice, the executing body may obtain a preset score set from the client. As an example, the application may be a software program of an online learning platform, the core business function may be providing online courses and learning resources, and the preset score may be 8. The set of predetermined scores may be {7,8}.
And thirdly, inputting the application allocation value set, the touch rate set and the preset score set into a pre-trained value return rate scoring model to obtain a value return rate scoring set. The value-return scoring model may be a Multi-Layer Perceptron (MLP) model. The value-to-return scores in the set of value-to-return scores may represent a score for rationality between the efficacy generated by the assessment application and the apportioned value. The value-return score in the value-return score set may be {7,4}.
And fourthly, determining each value return rate score meeting the second preset screening condition in the value return rate score set as a screening value return rate score set. The second preset screening condition may be that the value return rate score is smaller than the preset score. The predetermined score may be 5. The set of filter value return scores may be {4}.
And fifthly, determining each application identifier corresponding to each screening value return rate score in the screening value return rate score set as a screening application identifier set. The application identifier corresponding to the filtering value return rate score 4 may be B, and the filtering application identifier set may be { B }.
Sixth, the system time is obtained as the current time.
Seventh, in response to determining that the current time meets a start condition of the period timer, for each filter application identifier in the set of filter application identifiers, performing the following asynchronous trigger processing steps:
and step one, responding to the detection of the request information which is sent by the application terminal and is used for triggering the operation of the preset database and corresponds to the screening application identifier, and packaging the request information into information to be processed. The starting condition may be that the current time is after a starting time of the period timer. In practice, the execution body may encapsulate the request information into a data string in a specific format as the information to be processed through a serialization technique. The specific format may be JSON format or XML format. The above request information for triggering the preset database operation may represent text information for querying, selecting, inserting, updating or deleting the database. For example, the request information to SELECT all records older than 18 from a table named customers in the database may be "SELECT FROM customers WHERE age >18".
And step two, storing the information to be processed into a message queue to update the message queue.
And step three, determining each piece of information to be processed in the updated message queue as a sequence of information to be processed. The information sequence to be processed may be a sequence arranged in the order of each information queue to be processed.
And step four, for the first information to be processed in the information sequence to be processed, executing the following triggering steps:
and a first sub-step, analyzing the first information to be processed to obtain the request information corresponding to the operation of the preset database. In practice, the executing body may parse the information to be processed into the request information corresponding to the preset database operation through the deserialization technology.
And a second sub-step of connecting the preset database. In practice, the executing entity may establish a connection with the database from methods or functions provided by the database driver.
And a third sub-step, executing database operation corresponding to the request information on the preset database. Wherein the database operations include, but are not limited to, at least one of: an insert operation, a query operation, an update operation, and a delete operation.
And a fourth sub-step of deleting the first information to be processed from the information sequence to be processed so as to update the information sequence to be processed.
And a fifth sub-step, responding to the updated information sequence to be processed not being empty, and executing the triggering step again according to the updated information sequence to be processed.
A sixth substep, in response to the updated information sequence to be processed being empty, of determining a time corresponding to the empty information sequence to be processed as a first target time, executing the following acquisition steps:
in the first substep, the system time is acquired as the second target time.
And step two, determining the time interval between the second target time and the first target time as a target time interval.
And a sub-step of executing the acquisition step again in response to the target time interval not meeting the preset time interval of the periodic timer.
And step four, in response to determining that the target time interval meets the preset time interval of the periodic timer, executing the asynchronous triggering processing step again for each screening application identifier in the screening application identifier set.
The technical scheme and the related content are taken as an invention point of the embodiment of the disclosure, and the second technical problem mentioned in the background art is solved, namely, the method for adjusting the allocation resource quota of the application with large use requirement is directly carried out according to the use requirement of the application, and when the application with large use requirement after adjustment executes the operation of the database at the same time, resource competition and conflict can occur, so that the access of the database is blocked and delayed. At the same time, highly concurrent database operations may cause data loss, resulting in an increase in the number of failed operations to perform the database operations, requiring re-execution of the database operations. Further, it causes waste of computer power resources. Factors that lead to the waste of computational resources of a computer are often as follows: the method for adjusting the allocation resource quota of the application with large usage demand directly according to the usage demand of the application can cause resource competition and conflict when the application with large usage demand after adjustment simultaneously executes the operation of the database, thereby causing the blocking and delay of the database access. At the same time, highly concurrent database operations may cause data loss, resulting in an increase in the number of failed operations to perform the database operations, requiring re-execution of the database operations. Further, the waste of computer power resources is caused. If the above factors are solved, the waste of computer power resources can be reduced. To achieve this effect, the present disclosure obtains a set of reachability values corresponding to the set of application identifiers described above through the following step, first. Thus, a set of touch-up rates representing respective use probabilities of the user using the respective applications within a preset period of time can be obtained. And a second step of obtaining a preset grading set corresponding to the application identification set. Thus, a set of preset scores may be obtained for generating a set of value-return scores. And thirdly, inputting the application allocation value set, the touch rate set and the preset score set into a pre-trained value return rate scoring model to obtain a value return rate scoring set. Thus, a value return rate scoring set can be obtained through a value return rate scoring model. And fourthly, determining each value return rate score meeting the second preset screening condition in the value return rate score set as a screening value return rate score set. And fifthly, determining each application identifier corresponding to each screening value return rate score in the screening value return rate score set as a screening application identifier set. Sixth, the system time is obtained as the current time. Seventh, in response to determining that the current time meets a start condition of the period timer, for each filter application identifier in the set of filter application identifiers, performing the following asynchronous trigger processing steps: and step one, responding to the detection of the request information which is sent by the application terminal and is used for triggering the operation of the preset database and corresponds to the screening application identifier, and packaging the request information into information to be processed. And step two, storing the information to be processed into a message queue to update the message queue. Thus, the information to be processed can be stored to the message queue. And step three, determining each piece of information to be processed in the updated message queue as a sequence of information to be processed. Therefore, the information sequence to be processed for executing triggering can be obtained, when the application with large use requirement after adjustment executes the operation of the database at the same time, each piece of request information can be packaged into the information to be processed, the information is stored in the message queue, and then the information sequence to be processed is obtained according to the message queue. And step four, for the first information to be processed in the information sequence to be processed, executing the following triggering steps: and a first sub-step, analyzing the first information to be processed to obtain the request information corresponding to the operation of the preset database. Therefore, the information to be processed can be analyzed into the request information corresponding to the operation of the preset database. And a second sub-step of connecting the preset database. And a third sub-step, executing database operation corresponding to the request information on the preset database. Thereby, a database operation corresponding to the first information to be processed can be performed. And a fourth sub-step of deleting the first information to be processed from the information sequence to be processed so as to update the information sequence to be processed. Therefore, the first information to be processed can be deleted from the information sequence to be processed, and the influence on the database operation corresponding to other subsequent information to be processed is avoided. And a fifth sub-step, responding to the updated information sequence to be processed not being empty, and executing the triggering step again according to the updated information sequence to be processed. Therefore, database operations corresponding to the information to be processed in the information sequence to be processed can be executed one by one, high-concurrency database operations are reduced, and the probability of resource competition and conflict and data loss is reduced. A sixth substep, in response to the updated information sequence to be processed being empty, of determining a time corresponding to the empty information sequence to be processed as a first target time, executing the following acquisition steps: in the first substep, the system time is acquired as the second target time. And step two, determining the time interval between the second target time and the first target time as a target time interval. And a sub-step of executing the acquisition step again in response to the target time interval not meeting the preset time interval of the periodic timer. And step four, in response to determining that the target time interval meets the preset time interval of the periodic timer, executing the asynchronous triggering processing step again for each screening application identifier in the screening application identifier set. And because the request information of each application is encapsulated into the information to be processed, the information is stored in the message queue, and then the information sequence to be processed is obtained according to the message queue. When the adjusted application with large use demand simultaneously executes the database operation, the database operation corresponding to the information to be processed is carried out one by one according to the information sequence to be processed, so that the high concurrency database operation is reduced, and the probability of resource competition and conflict and data loss is reduced. Furthermore, the operation failure times of the execution database are reduced, and the waste of computer power resources is reduced.
The above embodiments of the present disclosure have the following advantageous effects: by the resource allocation method of some embodiments of the present disclosure, waste of storage resources, network resources and computing resources of the computer is reduced. Specifically, the storage resources, network resources, and computing resources of the computer are wasted because: directly according to the importance of the application, the information adjustment of the allocated resources quota of the application is performed manually, certain subjectivity exists, and for important applications, when the allocated resources quota of the application is far greater than the actually required demand quota, the situation of excessive allocation of the resources quota of the application exists, so that the resource utilization rate is low, and further, the waste of storage resources, network resources and computing resources of the computer is caused. Based on this, the resource allocation method of some embodiments of the present disclosure first determines total resource information of the preset database cluster at a single instance in response to detecting a resource allocation imbalance through the resource monitoring tool. Thus, the total resource information of the value information can be determined. And then determining the use resource information of the preset database cluster in the single instance. And then, determining the value information of the preset database cluster corresponding to the single instance based on the total resource information and the use resource information. Thereby, value information for determining the application allocation value corresponding to each application identifier can be used. And then, determining the application identifier of each application calling the preset database cluster as an application identifier set. Thereby, application identifiers of each application calling the preset database cluster can be obtained. And then, determining the application allocation value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set to obtain an application allocation value set. Thus, a set of application allocation values characterizing the individual application allocation values actually required by the individual applications can be obtained. And then, determining each application sharing value meeting the preset screening condition in the application sharing value set as a target application sharing value set. Therefore, a target application allocation value set can be obtained, and the target application allocation value set can represent application allocation values with higher application allocation values. And then, determining the application identifier corresponding to each target application allocation value in the target application allocation value set as a target application identifier to obtain a target application identifier set. Thus, a target application identifier set representing each application identifier corresponding to each application with higher application allocation value can be obtained. And then, determining each piece of application allocation resource quota information corresponding to the target application identification set as an application allocation resource quota information set, wherein the target application identification in the target application identification set corresponds to the application allocation resource quota information in the application allocation resource quota information set. Therefore, the application allocation resource quota information set corresponding to the application with higher allocation value of each application can be obtained. And finally, for each application allocation resource quota information in the application allocation resource quota information set, adjusting the application allocation resource quota information to obtain adjusted application allocation resource quota information, and allocating the resources corresponding to the adjusted application allocation resource quota information to the application of the corresponding application identifier. Therefore, the application allocation resource quota information with higher application allocation value can be adjusted, the adjusted application allocation resource quota information is obtained, and the resources corresponding to the adjusted application allocation resource quota information are allocated to the application corresponding to the application identifier. And determining the allocation resource quota information of each application corresponding to each application with higher allocation value according to the application allocation value set of the resources actually required by each application. The determined information of the allocated resource quota of each application is adjusted, the influence of subjective factors does not exist in the adjustment process, the situation of excessive allocation of the application resource quota is reduced, and the resource utilization rate is improved. Furthermore, the waste of storage resources, network resources and computing resources of the computer is reduced.
With further reference to fig. 2, as an implementation of the method shown in the figures, the present disclosure provides some embodiments of a resource allocation apparatus, which apparatus embodiments correspond to those method embodiments shown in fig. 1, and which apparatus is particularly applicable in various electronic devices.
As shown in fig. 2, the task information association apparatus 200 of some embodiments includes: the first determination unit 201, the second determination unit 202, the third determination unit 203, the fourth determination unit 204, the fifth determination unit 205, the sixth determination unit 206, the seventh determination unit 207, the eighth determination unit 208, and the adjustment unit 209. Wherein the first determining unit 201 is configured to determine total resource information of the preset database cluster in a single instance in response to detecting a resource allocation imbalance by the resource monitoring tool; the second determining unit 202 is configured to determine the usage resource information of the preset database cluster in the single instance; the third determining unit 203 is configured to determine value information of the preset database cluster corresponding to the single instance based on the total resource information and the usage resource information; the fourth determining unit 204 is configured to determine application identifiers of respective applications calling the preset database cluster as an application identifier set; the fifth determining unit 205 is configured to determine an application allocation value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, to obtain an application allocation value set; the sixth determining unit 206 is configured to determine, as the target application allocation value set, each application allocation value satisfying the first preset screening condition in the above-mentioned application allocation value set; the seventh determining unit 207 is configured to determine, as a target application identifier, an application identifier corresponding to each target application allocation value in the target application allocation value set, to obtain a target application identifier set; the eighth determining unit 208 is configured to determine each application allocation resource quota information corresponding to the target application identifier set as an application allocation resource quota information set, where a target application identifier in the target application identifier set corresponds to the application allocation resource quota information in the application allocation resource quota information set; the adjusting unit 209 is configured to adjust, for each application allocation resource quota information in the application allocation resource quota information set, the application allocation resource quota information to obtain adjusted application allocation resource quota information, and allocate a resource corresponding to the adjusted application allocation resource quota information to an application corresponding to the application identifier.
It will be appreciated that the elements described in the apparatus 200 correspond to the various steps in the method described with reference to fig. 1. Thus, the operations, features and resulting benefits described above for the method are equally applicable to the apparatus 200 and the units contained therein, and are not described in detail herein.
Referring now to fig. 3, a schematic diagram of an electronic device 300 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 3 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 3, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various suitable actions and processes in accordance with a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
In general, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 308 including, for example, magnetic tape, hard disk, etc.; and communication means 309. The communication means 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. While fig. 3 shows an electronic device 300 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 3 may represent one device or a plurality of devices as needed.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via communications device 309, or from storage device 308, or from ROM 302. The computer program, when executed by the processing means 301, performs the functions defined in the methods of some embodiments of the present disclosure.
It should be noted that, the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be embodied in the electronic device described above; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to detecting the resource allocation imbalance through the resource monitoring tool, determining total resource information of a preset database cluster in a single instance; determining the use resource information of the preset database cluster in the single instance; determining value information of the preset database cluster corresponding to the single instance based on the total resource information and the usage resource information; determining application identifiers of all applications calling the preset database cluster as an application identifier set; determining an application allocation value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set to obtain an application allocation value set; determining each application sharing value meeting a first preset screening condition in the application sharing value set as a target application sharing value set; determining an application identifier corresponding to each target application allocation value in the target application allocation value set as a target application identifier to obtain a target application identifier set; determining each piece of application allocation resource quota information corresponding to the target application identification set as an application allocation resource quota information set, wherein a target application identification in the target application identification set corresponds to the application allocation resource quota information in the application allocation resource quota information set; and for each application allocation resource quota information in the application allocation resource quota information set, adjusting the application allocation resource quota information to obtain adjusted application allocation resource quota information, and distributing resources corresponding to the adjusted application allocation resource quota information to the application of the corresponding application identifier.
Computer program code for carrying out operations for some embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor includes a first determination unit, a second determination unit, a third determination unit, a fourth determination unit, a fifth determination unit, a sixth determination unit, a seventh determination unit, an eighth determination unit, and an adjustment unit. The names of the units do not form a limitation on the unit itself in some cases, for example, the adjustment may also be described as "for each application allocation resource quota information in the application allocation resource quota information set, adjust the application allocation resource quota information, and obtain an adjusted unit of application allocation resource quota information".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (8)

1. A resource allocation method, comprising:
in response to detecting the resource allocation imbalance through the resource monitoring tool, determining total resource information of a preset database cluster in a single instance;
determining the use resource information of the preset database cluster in the single instance;
determining value information of the preset database cluster corresponding to the single instance based on the total resource information and the use resource information;
determining application identifiers of all applications calling the preset database cluster as an application identifier set;
Determining an application allocation value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set to obtain an application allocation value set;
determining each application sharing value meeting a first preset screening condition in the application sharing value set as a target application sharing value set;
determining an application identifier corresponding to each target application allocation value in the target application allocation value set as a target application identifier to obtain a target application identifier set;
determining each piece of application allocation resource quota information corresponding to the target application identification set as an application allocation resource quota information set, wherein a target application identification in the target application identification set corresponds to the application allocation resource quota information in the application allocation resource quota information set;
and for each application allocation resource quota information in the application allocation resource quota information set, adjusting the application allocation resource quota information to obtain adjusted application allocation resource quota information, and distributing resources corresponding to the adjusted application allocation resource quota information to the application of the corresponding application identifier.
2. The method of claim 1, wherein the determining, based on the total resource information and the usage resource information, value information of the preset database cluster corresponding to the single instance comprises:
determining the computing resource in the total resource information as a first computing resource;
determining the computing resource in the use resource information as a second computing resource;
determining a computing resource value according to the first computing resource, the second computing resource and a first preset value corresponding to the first computing resource;
determining the storage resources in the total resource information as first storage resources;
determining the storage resource in the use resource information as a second storage resource;
determining a storage resource value according to the first storage resource, the second storage resource and a second preset value corresponding to the first storage resource;
determining network resources in the total resource information as first network resources;
determining the network resource in the use resource information as a second network resource;
determining a network resource value according to the first network resource, the second network resource and a third preset value corresponding to the first network resource;
And determining the value information of the preset database cluster corresponding to the single instance according to the computing resource value, the storage resource value and the network resource value.
3. The method of claim 1, wherein the determining, based on the value information and the application identifier set, an application allocation value corresponding to each application identifier in the application identifier set, to obtain an application allocation value set, includes:
executing the following steps for the application corresponding to each application identifier in the application identifier set:
determining the calling times of the application to the preset database cluster in a preset time period;
determining total time consumption of the application using the preset database cluster in the preset time period based on the calling times and preset single calling time;
determining each of the determined total time consumption as a total time consumption set;
and determining an application allocation value corresponding to each application identifier in the application identifier set based on the total time consumption set and the value information to obtain an application allocation value set.
4. The method of claim 3, wherein the determining, based on the total time-consuming set and the value information, an application allocation value corresponding to each application identifier in the application identifier set, to obtain an application allocation value set, includes:
Determining a first time consuming value according to the total time consuming set;
for each total time consumption in the total time consumption set, the following processing steps are performed:
determining the application identifier corresponding to the total consumption time as a target application identifier;
determining the time consumption value corresponding to the total time consumption as a second time consumption value;
generating an application allocation value corresponding to the target application identifier based on the first time consuming value, the second time consuming value and the value information;
and determining the generated application allocation values as application allocation value sets.
5. The method of claim 1, wherein the adjusting the application allocation resource quota information to obtain adjusted application allocation resource quota information, and allocating resources corresponding to the adjusted application allocation resource quota information to an application corresponding to an application identifier, comprises:
reducing the computing resource quota in the application allocation resource quota information by a first preset value to update the computing resource quota;
reducing the storage resource quota in the application allocation resource quota information by a second preset value to update the storage resource quota;
reducing the network resource quota in the application allocation resource quota information by a third preset value to update the network resource quota;
The updated computing resource quota, the updated storage resource quota, the updated network resource quota and the application identifier of the corresponding application allocation resource quota information are determined to be the adjusted application allocation resource quota information, and the resource corresponding to the adjusted application allocation resource quota information is allocated to the application of the corresponding application identifier.
6. A resource allocation apparatus, comprising:
a first determining unit configured to determine total resource information of a preset database cluster at a single instance in response to detection of a resource allocation imbalance by the resource monitoring tool;
a second determining unit configured to determine usage resource information of the preset database cluster at the single instance;
a third determining unit configured to determine value information of the preset database cluster corresponding to the single instance based on the total resource information and the usage resource information;
a fourth determining unit configured to determine application identifiers of respective applications calling the preset database cluster as an application identifier set;
a fifth determining unit, configured to determine an application allocation value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, to obtain an application allocation value set;
A sixth determining unit configured to determine, as a target application allocation value set, each application allocation value satisfying a first preset screening condition in the application allocation value set;
a seventh determining unit, configured to determine an application identifier corresponding to each target application allocation value in the target application allocation value set as a target application identifier, to obtain a target application identifier set;
an eighth determining unit configured to determine each application allocation resource quota information corresponding to the target application identification set as an application allocation resource quota information set, wherein a target application identification in the target application identification set corresponds to the application allocation resource quota information in the application allocation resource quota information set;
the adjusting unit is configured to adjust the application allocation resource quota information for each application allocation resource quota information in the application allocation resource quota information set to obtain adjusted application allocation resource quota information, and allocate resources corresponding to the adjusted application allocation resource quota information to the application corresponding to the application identifier.
7. An electronic device, comprising:
One or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1 to 5.
8. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1 to 5.
CN202311119192.3A 2023-08-31 2023-08-31 Resource allocation method, device, equipment and readable medium Pending CN117130786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311119192.3A CN117130786A (en) 2023-08-31 2023-08-31 Resource allocation method, device, equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311119192.3A CN117130786A (en) 2023-08-31 2023-08-31 Resource allocation method, device, equipment and readable medium

Publications (1)

Publication Number Publication Date
CN117130786A true CN117130786A (en) 2023-11-28

Family

ID=88861092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311119192.3A Pending CN117130786A (en) 2023-08-31 2023-08-31 Resource allocation method, device, equipment and readable medium

Country Status (1)

Country Link
CN (1) CN117130786A (en)

Similar Documents

Publication Publication Date Title
CN110808922B (en) Message processing method and device, storage medium and electronic equipment
CN110430142B (en) Method and device for controlling flow
CN113722055A (en) Data processing method and device, electronic equipment and computer readable medium
CN113722056A (en) Task scheduling method and device, electronic equipment and computer readable medium
CN111240834A (en) Task execution method and device, electronic equipment and storage medium
CN111580974B (en) GPU instance allocation method, device, electronic equipment and computer readable medium
CN110764892A (en) Task processing method, device and computer readable storage medium
CN113760991A (en) Data operation method and device, electronic equipment and computer readable medium
CN109428926B (en) Method and device for scheduling task nodes
CN114911598A (en) Task scheduling method, device, equipment and storage medium
CN115357350A (en) Task configuration method and device, electronic equipment and computer readable medium
CN111694670B (en) Resource allocation method, apparatus, device and computer readable medium
CN116388112B (en) Abnormal supply end power-off method, device, electronic equipment and computer readable medium
CN117609226A (en) Information stream data storage method and device, electronic equipment and readable medium
CN115378878B (en) CDN scheduling method, device, equipment and storage medium
CN117130786A (en) Resource allocation method, device, equipment and readable medium
CN111694672B (en) Resource allocation method, task submission method, device, electronic equipment and medium
CN113553206A (en) Data event execution method and device, electronic equipment and computer readable medium
CN113778850A (en) Data processing method and device, electronic equipment and computer readable medium
CN112181605A (en) Load balancing method and device, electronic equipment and computer readable medium
CN112527454A (en) Container group scheduling method and device, electronic equipment and computer readable medium
CN112148448A (en) Resource allocation method, device, equipment and computer readable medium
CN111698132B (en) Method, apparatus, device and medium for controlling heartbeat events in a cluster
CN114757558A (en) User information processing method and device, electronic equipment and computer readable medium
CN114826932B (en) Data migration method, device, electronic equipment and computer readable medium

Legal Events

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