CN111813546B - Resource allocation method, system and related device for multi-network connection application - Google Patents
Resource allocation method, system and related device for multi-network connection application Download PDFInfo
- Publication number
- CN111813546B CN111813546B CN202010616616.7A CN202010616616A CN111813546B CN 111813546 B CN111813546 B CN 111813546B CN 202010616616 A CN202010616616 A CN 202010616616A CN 111813546 B CN111813546 B CN 111813546B
- Authority
- CN
- China
- Prior art keywords
- service
- factor
- priority
- larger
- load
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000013468 resource allocation Methods 0.000 title claims abstract description 45
- 238000004590 computer program Methods 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 7
- 230000001934 delay Effects 0.000 claims description 5
- 230000009286 beneficial effect Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 8
- 101100521097 Caenorhabditis elegans pri-1 gene Proteins 0.000 description 3
- 101100353170 Caenorhabditis elegans pri-2 gene Proteins 0.000 description 3
- 230000009471 action Effects 0.000 description 3
- 241000735235 Ligustrum vulgare Species 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 235000003642 hunger Nutrition 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000037351 starvation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5011—Pool
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5021—Priority
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a resource allocation method for multi-network connection application, which comprises the following steps: acquiring message data traffic of each service; determining the percentage of the data traffic of each service in the total data traffic; determining the service type of each service according to the service identification field, and distributing corresponding service load and corresponding service priority for each service according to the service type; calculating to obtain a state factor corresponding to each service by taking the percentage, the service load and the service priority as parameters; and performing worker thread pool distribution on the service according to the state factor. The method and the system ensure that the system always occupies the minimum computing resources and simultaneously ensure that different services meet the timeliness requirement of the services when being processed. The application also provides a resource allocation system, a computer readable storage medium and a server for multi-network connection application, which have the beneficial effects.
Description
Technical Field
The present application relates to the field of servers, and in particular, to a resource allocation method, system and related apparatus for multi-network connection application.
Background
The evolution of the network programming model has been closely related to the model of the services it supports. When the number of connections processed by each node in the system is rapidly expanded but is still in a controllable scale, a mode of processing one connection by using one thread uses a main thread to process a new connection and allocates a new thread to the new connection for use, and the connections are not interfered with each other. When the problem of C10K needs to be handled, the number of network connections and the network performance become the problem that all systems cannot avoid, the mode that one thread handles one connection cannot meet the condition, an application needs to allocate one worker thread for each connection, a large number of connections need a large number of worker threads, the CPU resources of a host are limited, the CPU is fully occupied by frequent switching of a large number of worker threads, the resources are consumed by context switching, and the system performance is sharply reduced, so that the Reactor mode is generated.
The Reactor mode is based on IO multiplexing, and different operating systems have different implementation components. The Reactor mode solves the problem that all connections are distributed to different worker threads of a worker thread pool for processing by establishing the worker thread pool, so that the number of the worker threads is reduced, the use of CPU resources is reduced, the probability of switching among the worker threads is reduced, and the performance of the system is hopefully maintained without being sharply reduced when the number of the connections is large. The Reactor mode itself has also evolved through three modes, a single thread mode, a worker thread pool mode, and a multiple Reactor worker thread mode.
At present, basically all large projects are in a multi-Reactor worker thread mode, the multi-Reactor worker thread mode is used for modifying the Reactor mode, all advantages of the Reactor mode are achieved, and the problem that new connection cannot be established in time when an application load is large and cannot be solved in a classical Reactor mode is solved.
Neither the Reactor model nor its variants address the issue of "balanced" distribution of connections to all worker threads. Many systems adopt a method of loading the same number of connections by all worker threads, but do not consider the respective data volumes of all the connections loaded by a single worker thread and the service characteristics among the connections, different connections have different data volumes and different service processing logics, the connection consuming longer time may occupy more processing time slices, and other connections are always in a starvation state, so that the time delay is increased, the throughput is reduced, and the overall performance of the system is reduced.
Disclosure of Invention
The application aims to provide a resource allocation method, a system, a computer readable storage medium and a server for multi-network connection application, which can adjust the connection relation between a service and a worker thread and ensure good system performance.
In order to solve the above technical problem, the present application provides a resource allocation method for multi-network connection application, and the specific technical scheme is as follows:
acquiring message data traffic of each service;
determining the percentage of the data traffic of each service in the total data traffic;
determining the service type of each service according to the service identification field, and distributing corresponding service load and corresponding service priority for each service according to the service type;
calculating to obtain a state factor corresponding to each service by taking the percentage, the service load and the service priority as parameters; the status factors include a load factor and a priority factor;
and performing worker thread pool allocation on the service according to the state factor.
Optionally, after obtaining the message data traffic of each service, the method further includes:
and adding a service identification field in the message packet of each service so as to execute the step of classifying the services according to the service identifications.
Optionally, if the worker thread pool includes three groups of thread pools, performing worker thread pool allocation on the service according to the state factor includes:
distributing the service with the load factor larger than a first preset value and the priority factor larger than a second preset value to a first group of worker thread pools;
distributing the service with the load factor larger than a first preset value and the priority factor smaller than a second preset value to a second group of worker thread pools;
the remaining traffic is distributed to a third set of worker thread pools.
Optionally, the method further includes:
taking the priority factor as a state factor value;
then, the resource allocation for the service according to the state factor includes:
performing resource allocation on the high-performance service according to the state factor;
and the high-performance service is the services with the preset number at the top after the state factor values are sorted in a descending order.
The present application further provides a resource allocation system for multi-network connection application, including:
the acquisition module is used for acquiring the message data flow of each service;
the classification module is used for determining the percentage of the data traffic of each service in the total data traffic;
the distribution module is used for distributing corresponding service load and corresponding service priority for each service according to the service type;
the parameter calculation module is used for calculating to obtain a state factor corresponding to each service by taking the percentage, the service load and the service priority as parameters; the status factors include a load factor and a priority factor;
and the resource allocation module is used for allocating the worker thread pool to the service according to the state factor.
Optionally, the method further includes:
and the identification module is used for adding a service identification field in the message packet of each service after the message data flow of each service is acquired.
Optionally, if the worker thread pool includes three groups of thread pools, the resource allocation module includes:
the first allocation unit is used for allocating the services of which the load factors are greater than a first preset value and the priority factors are greater than a second preset value to a first group of worker thread pools;
the second distribution unit is used for distributing the services of which the load factors are larger than a first preset value and the priority factors are smaller than a second preset value to a second group of worker thread pools;
and the third distribution unit is used for distributing the remaining services to a third group of worker thread pools.
Optionally, the method further includes:
the performance calculation module is used for taking the priority factor as a state factor value;
the resource allocation module is a module for performing resource allocation on the high-performance service according to the state factor value;
and the high-performance service is a preset number of services after the state factor values are sorted in a descending order.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method as set forth above.
The present application further provides a server comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described above when calling the computer program in the memory.
The application provides a resource allocation method for multi-network connection application, which comprises the following steps: acquiring message data traffic of each service; determining the percentage of the data traffic of each service in the total data traffic; determining the service type of each service according to the service identification field, and distributing corresponding service load and corresponding service priority for each service according to the service type; calculating to obtain a state factor corresponding to each service by taking the percentage, the service load and the service priority as parameters; the status factors include a load factor and a priority factor; and performing worker thread pool allocation on the service according to the state factor.
The method and the system collect the system operation parameters in real time, introduce the data flow and the service type in connection, and adjust the corresponding relation between the network connection and the computing resources in real time according to the parameters, thereby ensuring that the system always occupies the least computing resources and simultaneously ensuring that different services meet the timeliness requirements of the services when being processed.
The present application further provides a resource allocation system, a computer-readable storage medium, and a server for multi-network connection application, which have the above-mentioned advantages and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a resource allocation method for a multi-network connection application according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a resource allocation system for a multi-network connection application according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of a resource allocation method for a multi-network connection application according to an embodiment of the present application, where the method includes:
s101: acquiring message data traffic of each service;
s102: determining the percentage of the data traffic of each service in the total data traffic;
s103: determining the service type of each service according to the service identification field, and distributing corresponding service load and corresponding service priority for each service according to the service type;
s104: calculating to obtain a state factor corresponding to each service by taking the percentage, the service load and the service priority as parameters;
s105: and performing worker thread pool allocation on the service according to the state factor.
According to the method and the device, a worker scheduling thread for scheduling can be added on the basis of a worker thread mode of a multi-Reactor, and the steps are executed through the worker scheduling thread.
Specifically, firstly, the message data traffic of each service needs to be acquired, a service identification field can be added to the message packet corresponding to each service, each connection is added with a service identification and data traffic sampling function, the data traffic proportion of different services in a unit time slice is sent to a worker scheduling thread, the worker scheduling thread analyzes the total traffic and the different traffic proportion conditions in all the current time slices of the connection in real time,
and classifying all the messages collected in the unit time slice according to the service identification, and calculating the percentage of the data flow of each service in the total sampled message data flow. The total message data traffic is obviously the sum of the message data traffic of all services.
The data traffic percentage PM corresponding to the traffic BM sampled per unit time may be represented by { B1 → P1, B2 → P2, … …, BM → PM }. Of course, this expression is only used to represent the mapping between the service BM and the data traffic percentage PM when this step is performed.
Step S103 needs to determine the service type of each service in the current system, and allocate a service load and a service priority to the service according to the service type of the service, where { B1 → (L1, Pri 1), B2 → (L2, Pri 2), … …, BM → (LM, PriM) } represents the service load LM and the service priority PriM corresponding to the service BM. Because different services may have the same service type, the service load and the priority are distributed according to the service type corresponding to each service when the service load and the priority are distributed, and the same or similar service load and priority are distributed to the service of the same type.
And calculating a state factor { CONN (M) → (CLM, CPRiM) } for each connection according to the (BM, PM, LM, PrIM) parameters, wherein the current load factor of the connection CONN (M) corresponding to the service n is CLM and the priority factor Cpri M. It should be noted that "M" in the load factor and the priority factor are both service codes. How to calculate the state factor is explained below:
when calculating the status factor, it is necessary to obtain the time delay Tm corresponding to the throughput IOPSm of each service, and as a preferred execution manner, the time delay Tm may be executed in step S101 in synchronization with the obtaining of the message data traffic of each service. The throughput IOPSm and the total delay Tm are obtained and then expressed as:
{B1→{IOPS1,T1},B2→{IOPS2,T2},……,BM→{IOPSm,Tm}}。
calculating the average time delay Tam of the service according to the IOPSm and the Tm:
after the average time delay of each service is obtained, confirming an operand, wherein the operand is as follows:
{B1→{Ta1,P1,IOPS1},B2→{Ta2,P2,IOPS2,…,BM→{ Tam,PM,IOPSm }};
the average time delay Tam of different services is compared, the service corresponding to the larger average time delay Tam has a larger load factor CLM, the data flow percentage PM is compared under the condition that the average time delays Tam are the same, the service corresponding to the larger data flow percentage PM has a larger load factor CLM, the throughput IOPSm is compared under the condition that the data flow percentage PM is the same, and the service corresponding to the smaller throughput IOPSm has a larger load factor CLM. It should be noted that different load factors CLM only represent the relative magnitude of the load between different services, and do not serve as an accurate measure of the load. The load factor CLM of each service can be confirmed through the above procedure.
Obtaining B1- > (CL 1, Pri1, L1), B2- > (CL 1, Pri2, L2), … … and BM- > (CLM, Prim, LM) } according to the load factor CLM result of each service and { B1- > (L1, Pri 1), B2- > (L2, Pri 2), … … and BM- > (LM, Prim) }, firstly comparing the load factors CLM of different services, wherein the service corresponding to the larger load factor CLM has a larger priority factor CPRim, comparing the service priority PrIMs under the condition that the CLMs are the same, wherein the service corresponding to the lower service priority PrIMs has a higher priority factor CPRiM, and comparing the service loads LM under the condition that the service priorities PrIM are the same, wherein the service corresponding to the larger service load LM has a larger priority factor CPRiM, so that the resource allocation of the first N services with the largest state factor value can be adjusted by taking the value of the CPRiM as the state factor value. The larger the value of the state factor, the greater its impact on the performance of the system.
The above-disclosed process for determining a state factor is only one feasible process provided by this embodiment, and it is within the scope of the present application that a skilled person can obtain a state factor or other parameters having the same or similar effects by using other parameters of a service or the same parameters according to the above-described process and adopting different generation processes.
And after the state factors are obtained, the worker thread pool allocation can be carried out according to the state factors. It is not limited herein how to allocate resources according to the state factor, and preferably, this embodiment provides an allocation manner, and if the worker thread pool includes three groups of thread pools, the corresponding resource allocation steps may be as follows:
distributing the service with the load factor larger than a first preset value and the priority factor larger than a second preset value to a first group of worker thread pools;
distributing the service with the load factor larger than a first preset value and the priority factor smaller than a second preset value to a second group of worker thread pools;
the remaining traffic is distributed to a third set of worker thread pools.
Each connection is adjusted in 3 sets of worker thread pools according to a real-time value of { conn (n) → (CLM, CPriM) }. The resource allocation method disclosed in this embodiment is actually a resource allocation manner that is dynamically adjusted in a continuous loop.
The embodiment of the application acquires the system operation parameters in real time, introduces the data flow and the service type in connection, and adjusts the corresponding relation between the network connection and the computing resources in real time according to the parameters, so that the system is ensured to always occupy the least computing resources, and simultaneously, the timeliness requirement of the service is met when different services are processed.
Based on the above embodiment, as a preferred embodiment, the method may further include:
taking the priority factor as a state factor value;
then, when step S105 is executed, resource allocation may be performed on the high performance service according to the state factor;
the high-performance service is a preset number of services after the state factor values are sorted in descending order. In other words, when the priority factor is used as the state factor value, since there is basically no service with the same BM, PM, LM, PriM) parameters, that is, the state factor values of the services are different, the state factor values can be sorted, and the service with the first N state factor values is taken for resource allocation. N is the preset number.
The present embodiment aims to adjust the preset number of connections that have the largest impact on the current system performance. Of course, the preset number is not particularly limited herein. Specifically, the influence of each service on the performance of the system may be determined according to the second percentage. Considering that part of the traffic occurs only temporarily and the impact on the performance of the system is temporary, that is, the traffic load of the whole system fluctuates with time, not all the connections are adjusted to prevent the worker scheduling thread from always performing ineffective adjustment due to a large amount of temporary traffic, for example, the current time slice 0 adjusts the connection a from the worker thread 1 to the worker thread 3, the next time slice 1 causes the temporary transaction in which the connection a is adjusted to end, the time slice 2 generates other types of temporary transactions again, which results in the connection a being adjusted from the worker thread 3 to the worker thread 1 in the time slice 3, and since the adjustment between different worker threads also consumes large resources, only the high-performance traffic with higher performance is adjusted, but not all the traffic is adjusted.
In the following, a resource allocation system for a multi-network connection application provided in an embodiment of the present application is introduced, and the resource allocation system described below and the resource allocation method for the multi-network connection application described above may be referred to correspondingly.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a resource allocation system for multiple network connection applications according to an embodiment of the present disclosure, and the present disclosure further provides a resource allocation system for multiple network connection applications, including:
an obtaining module 100, configured to obtain message data traffic of each service;
a classification module 200, configured to determine a percentage of data traffic of each service in total data traffic;
the allocating module 300 is configured to determine a service type of each service according to the service identifier field, and allocate a corresponding service load and a corresponding service priority to each service according to the service type;
a parameter calculation module 400, configured to calculate a state factor corresponding to each service according to the percentage, the service load, and the service priority; the state factors include a load factor and a priority factor;
and the resource allocation module 500 is configured to perform worker thread pool allocation on the service according to the state factor.
Based on the above embodiments, as preferred embodiments:
and the identification module is used for adding a service identification field in the message packet of each service after the message data flow of each service is acquired.
Based on the foregoing embodiment, as a preferred embodiment, if the worker thread pool includes three groups of thread pools, the resource allocation module includes:
the first allocation unit is used for allocating the services with the load factors larger than a first preset value and the priority factors larger than a second preset value to a first group of worker thread pools;
the second distribution unit is used for distributing the services of which the load factors are larger than the first preset value and the priority factors are smaller than the second preset value to a second group of worker thread pools;
and the third distribution unit is used for distributing the remaining services to a third group of worker thread pools.
Based on the above embodiment, as a preferred embodiment, the method further includes:
the performance calculation module is used for taking the priority factor as a state factor value;
the resource allocation module is a module for performing resource allocation on the high-performance service according to the state factor value;
and the high-performance service is the services with the preset number at the top after the state factor values are sorted in a descending order.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed, may implement the steps provided by the above-described embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The application also provides a server, which may include a memory and a processor, where the memory stores a computer program, and the processor may implement the steps provided by the foregoing embodiments when calling the computer program in the memory. Of course, the server may also include various network interfaces, power supplies, and the like.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system provided by the embodiment, the description is relatively simple because the system corresponds to the method provided by the embodiment, and the relevant points can be referred to the description of the method part.
The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. A method for allocating resources for a multi-network connection application, comprising:
acquiring message data traffic of each service;
determining the percentage of the data traffic of each service in the total data traffic;
determining the service type of each service according to the service identification field, and distributing corresponding service load and corresponding service priority for each service according to the service type;
calculating to obtain a state factor corresponding to each service by taking the percentage, the service load and the service priority as parameters; the status factors include a load factor and a priority factor;
performing worker thread pool allocation on the service according to the state factor;
wherein, the calculating the state factor corresponding to each service by taking the percentage, the service load and the service priority as parameters comprises:
obtaining time delay Tm corresponding to the throughput IOPSm of each service, and calculating the average time delay Tam of the services according to the IOPSm and Tm, wherein Tan = Tm/IOPSm;
comparing the average time delays Tam of different services, wherein the service corresponding to the larger average time delay Tam has a larger load factor CLM, comparing the data flow percentage PM under the condition that the average time delays Tam are the same, wherein the service corresponding to the larger data flow percentage PM has a larger load factor CLM, comparing the throughput IOPSm under the condition that the data flow percentage PM is the same, and the service corresponding to the smaller throughput IOPSm has a larger load factor CLM;
comparing load factors CLMs of different services, wherein a service corresponding to a larger load factor CLM has a larger priority factor CPRiM, comparing service priorities PrIM under the condition that the CLMs are the same, a service corresponding to a smaller service priority PrIM has a larger priority factor CPRiM, comparing service loads LM under the condition that the service priorities PrIM are the same, and a service corresponding to a larger service load LM has a larger priority factor CPRiM.
2. The resource allocation method according to claim 1, wherein after acquiring the message data traffic of each service, the method further comprises:
and adding a service identification field in the message packet of each service so as to execute the step of classifying the services according to the service identifications.
3. The method according to claim 1, wherein if the worker thread pool comprises three groups of thread pools, then performing worker thread pool assignment on the traffic according to the status factor comprises:
distributing the service with the load factor larger than a first preset value and the priority factor larger than a second preset value to a first group of worker thread pools;
distributing the service with the load factor larger than a first preset value and the priority factor smaller than a second preset value to a second group of worker thread pools;
the remaining traffic is distributed to a third set of worker thread pools.
4. The method for allocating resources according to claim 1, further comprising:
taking the priority factor as a state factor value;
then, the resource allocation for the service according to the state factor includes:
performing resource allocation on the high-performance service according to the state factor;
and the high-performance service is a preset number of services after the state factor values are sorted in a descending order.
5. A resource allocation system for a multi-network-connected application, comprising:
the acquisition module is used for acquiring the message data flow of each service;
the classification module is used for determining the percentage of the data traffic of each service in the total data traffic;
the distribution module is used for determining the service type of each service according to the service identification field and distributing corresponding service load and corresponding service priority to each service according to the service type;
the parameter calculation module is used for calculating to obtain a state factor corresponding to each service by taking the percentage, the service load and the service priority as parameters; the status factors include a load factor and a priority factor;
the resource allocation module is used for allocating a worker thread pool to the service according to the state factor;
wherein the parameter calculation module is a module for executing the following steps:
obtaining time delay Tm corresponding to the throughput IOPSm of each service, and calculating the average time delay Tam of the services according to the IOPSm and Tm, wherein Tan = Tm/IOPSm;
comparing the average time delays Tam of different services, wherein the service corresponding to the larger average time delay Tam has a larger load factor CLM, comparing the data flow percentage PM under the condition that the average time delays Tam are the same, wherein the service corresponding to the larger data flow percentage PM has a larger load factor CLM, comparing the throughput IOPSm under the condition that the data flow percentage PM is the same, and the service corresponding to the smaller throughput IOPSm has a larger load factor CLM;
comparing load factors CLMs of different services, wherein a service corresponding to a larger load factor CLM has a larger priority factor CPRiM, comparing service priorities PrIM under the condition that the CLMs are the same, a service corresponding to a smaller service priority PrIM has a larger priority factor CPRiM, comparing service loads LM under the condition that the service priorities PrIM are the same, and a service corresponding to a larger service load LM has a larger priority factor CPRiM.
6. The resource allocation system of claim 5, further comprising:
and the identification module is used for adding a service identification field in the message packet of each service after the message data flow of each service is acquired.
7. The resource allocation system of claim 5, wherein if the worker thread pool comprises three groups of thread pools, the resource allocation module comprises:
the first allocation unit is used for allocating the services of which the load factors are greater than a first preset value and the priority factors are greater than a second preset value to a first group of worker thread pools;
the second distributing unit is used for distributing the services of which the load factors are larger than a first preset value and the priority factors are smaller than a second preset value to a second group of worker thread pools;
and the third distribution unit is used for distributing the remaining services to a third group of worker thread pools.
8. The resource allocation system of claim 5, further comprising:
a performance calculation module for taking the priority factor as a state factor value;
the resource allocation module is a module for performing resource allocation on the high-performance service according to the state factor value;
and the high-performance service is a preset number of services after the state factor values are sorted in a descending order.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
10. A server, characterized in that it comprises a memory in which a computer program is stored and a processor which, when it calls the computer program in the memory, carries out the steps of the method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010616616.7A CN111813546B (en) | 2020-06-30 | 2020-06-30 | Resource allocation method, system and related device for multi-network connection application |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010616616.7A CN111813546B (en) | 2020-06-30 | 2020-06-30 | Resource allocation method, system and related device for multi-network connection application |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111813546A CN111813546A (en) | 2020-10-23 |
CN111813546B true CN111813546B (en) | 2022-06-07 |
Family
ID=72855239
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010616616.7A Active CN111813546B (en) | 2020-06-30 | 2020-06-30 | Resource allocation method, system and related device for multi-network connection application |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111813546B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116755890B (en) * | 2023-08-16 | 2023-10-24 | 国网浙江省电力有限公司 | Multi-scene business data collaborative handling method and system based on big data platform |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103857050A (en) * | 2012-12-07 | 2014-06-11 | 普天信息技术研究院有限公司 | Method for scheduling resources in TD-LTE trunking communication system |
CN105094956A (en) * | 2015-06-02 | 2015-11-25 | 北京京东尚科信息技术有限公司 | Business distribution method and business distribution device based on channel separation |
CN109783229A (en) * | 2018-12-17 | 2019-05-21 | 平安普惠企业管理有限公司 | The method and device of thread resources distribution |
CN111209112A (en) * | 2019-12-31 | 2020-05-29 | 杭州迪普科技股份有限公司 | Exception handling method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9053070B1 (en) * | 2012-12-10 | 2015-06-09 | Amazon Technologies, Inc. | Automated tuning of a service configuration using load tests on hosts |
-
2020
- 2020-06-30 CN CN202010616616.7A patent/CN111813546B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103857050A (en) * | 2012-12-07 | 2014-06-11 | 普天信息技术研究院有限公司 | Method for scheduling resources in TD-LTE trunking communication system |
CN105094956A (en) * | 2015-06-02 | 2015-11-25 | 北京京东尚科信息技术有限公司 | Business distribution method and business distribution device based on channel separation |
CN109783229A (en) * | 2018-12-17 | 2019-05-21 | 平安普惠企业管理有限公司 | The method and device of thread resources distribution |
CN111209112A (en) * | 2019-12-31 | 2020-05-29 | 杭州迪普科技股份有限公司 | Exception handling method and device |
Non-Patent Citations (2)
Title |
---|
Hong Taoliu Hong Taoliu等."MDLP--The Resource Allocating Policy for Multi Divisible Loads in Heterogeneous Linear Networks".《2006 Semantics, Knowledge and Grid, Second International Conference on》.2012, * |
郑智华.基于QoS优化的WCDMA上行接入控制算法.《通信技术》.2009,(第06期), * |
Also Published As
Publication number | Publication date |
---|---|
CN111813546A (en) | 2020-10-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107291546B (en) | Resource scheduling method and device | |
CN112162865B (en) | Scheduling method and device of server and server | |
CN109218355B (en) | Load balancing engine, client, distributed computing system and load balancing method | |
CN108667748B (en) | Method, device, equipment and storage medium for controlling bandwidth | |
CN110351384B (en) | Big data platform resource management method, device, equipment and readable storage medium | |
CN110659123B (en) | Distributed task distribution scheduling method and device based on message | |
CN108776934A (en) | Distributed data computational methods, device, computer equipment and readable storage medium storing program for executing | |
CN110597858A (en) | Task data processing method and device, computer equipment and storage medium | |
CN104239150B (en) | A kind of method and device of hardware resource adjustment | |
US8782659B2 (en) | Allocation of processing tasks between processing resources | |
CN107430526B (en) | Method and node for scheduling data processing | |
US11438271B2 (en) | Method, electronic device and computer program product of load balancing | |
CN112860387A (en) | Distributed task scheduling method and device, computer equipment and storage medium | |
CN111796933A (en) | Resource scheduling method, device, storage medium and electronic equipment | |
CN112015549A (en) | Method and system for selectively preempting scheduling nodes based on server cluster | |
CN111966480A (en) | Task execution method and related device | |
CN111813546B (en) | Resource allocation method, system and related device for multi-network connection application | |
Keerthika et al. | A hybrid scheduling algorithm with load balancing for computational grid | |
CN109614236B (en) | Cluster resource dynamic adjustment method, device and equipment and readable storage medium | |
CN109189581B (en) | Job scheduling method and device | |
Kumar et al. | Load balancing algorithm to minimize the makespan time in cloud environment | |
CN112948104B (en) | Load balancing data acquisition method and device | |
CN115168017B (en) | Task scheduling cloud platform and task scheduling method thereof | |
CN109086128B (en) | Task scheduling method and device | |
CN116382844A (en) | Dynamic control method and system for distributed storage multi-asynchronous task |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |