CN106815082A - The method for scheduling task and device of a kind of container - Google Patents

The method for scheduling task and device of a kind of container Download PDF

Info

Publication number
CN106815082A
CN106815082A CN201710096581.7A CN201710096581A CN106815082A CN 106815082 A CN106815082 A CN 106815082A CN 201710096581 A CN201710096581 A CN 201710096581A CN 106815082 A CN106815082 A CN 106815082A
Authority
CN
China
Prior art keywords
server
task
mathematical modeling
user
state parameter
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
CN201710096581.7A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710096581.7A priority Critical patent/CN106815082A/en
Publication of CN106815082A publication Critical patent/CN106815082A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses the method for scheduling task and device of a kind of container, the method includes:The state parameter of server cluster is obtained, state parameter enables expense, the current computing capability of each server, the unit multiplexed transport expense of each user to each server, the mission requirements amount of user including each server;State parameter is converted into the corresponding Mathematical Modeling of linear programming, it is minimum as object function using total cost in Mathematical Modeling, using the maximum load capability of the mission requirements amount of each user and each server as constraints;Mathematical Modeling is solved.Due in the Mathematical Modeling, it is minimum as object function using total cost, using the maximum load capability of the mission requirements amount of each user and each server as constraints, therefore, ensure that all of user task is processed, next is able to ensure that and is distributed to computing capability of the task summation of each server no more than server itself, and the use cost of totality is minimum.

Description

The method for scheduling task and device of a kind of container
Technical field
The present invention relates to field of cloud computer technology, the method for scheduling task and device of more particularly to a kind of container.
Background technology
Container is the set of interfaces being located in application server between component and platform.With the rise of container technique, more Start to distribute in the form of with container and dispose come more software systems.In the task processing system based on container, hold The scheduler of device is responsible for the responsibility that user task is distributed to server.
Due to thering are multiple users and multiple servers participating in specific implementation, how each user task to be distributed to Which server in current system come perform be scheduler an important process task.If the task scheduling side of scheduler Method is unreasonable, then the application cost for not only resulting in server is very high, or even in some cases it cannot be guaranteed that all of user appoints Business is processed or beyond the disposal ability of server.
As can be seen here, it is this area how the rational distribution of substantial amounts of user task to be carried out into treatment to corresponding server Technical staff's problem demanding prompt solution.
The content of the invention
It is an object of the invention to provide the method for scheduling task and device of a kind of container, for substantial amounts of user task to be closed The distribution of reason to corresponding server is processed so as to ensure all of user task, and next is able to ensure that and is distributed to each The task summation of server is no more than the computing capability of server itself, and the use cost of totality is minimum.
In order to solve the above technical problems, the present invention provides a kind of method for scheduling task of container, including:
The state parameter of server cluster is obtained, the state parameter enables expense, each server including each server Current computing capability, the unit multiplexed transport expense of each user to each server, the mission requirements amount of user;
The state parameter is converted into the corresponding Mathematical Modeling of linear programming, it is minimum with total cost in the Mathematical Modeling As object function, using the maximum load capability of the mission requirements amount of each user and each server as constraints;
The Mathematical Modeling is solved to obtain corresponding destination server and task sendout.
Preferably, it is described that the Mathematical Modeling is solved to obtain corresponding destination server and task distribution measurer Body is:
The Mathematical Modeling is converted to the canonical form of linear programming;
The canonical form is solved.
Preferably, it is described solution is carried out to the canonical form to specifically include:
Proportion of the number relative to the total number in the server cluster according to the destination server, by the mark Quasi- form is converted into the compressed sensing algorithm mathematics model based on the corresponding sparsity constraints of L1 norms;
Using compressed sensing algorithm mathematics model described in compressed sensing Algorithm for Solving.
Preferably, also include:
Store the state parameter, and the destination server and the task sendout.
In order to solve the above technical problems, the present invention also provides a kind of task scheduling apparatus of container, including:
Acquiring unit, the state parameter for obtaining server cluster, the state parameter includes enabling for each server Expense, the current computing capability of each server, the unit multiplexed transport expense of each user to each server, the mission requirements of user Amount;
Model construction unit, for the state parameter to be converted into the corresponding Mathematical Modeling of linear programming, the mathematics It is minimum as object function using total cost in model, made with the maximum load capability of the mission requirements amount of each user and each server It is constraints;
Computing unit, is distributed for being solved to the Mathematical Modeling with obtaining corresponding destination server and task Amount.
Preferably, the computing unit tool includes:
Modular converter, the canonical form for the Mathematical Modeling to be converted to linear programming;
Computing module, for being solved to the canonical form.
Preferably, the computing module specifically for the number according to the destination server relative to the server set The proportion of the total number in group, is converted into the canonical form compressed sensing based on the corresponding sparsity constraints of L1 norms and calculates Method Mathematical Modeling, and using compressed sensing algorithm mathematics model described in compressed sensing Algorithm for Solving.
Preferably, also include:
Memory cell, for storing the state parameter, and the destination server and the task sendout.
The method for scheduling task and device of container provided by the present invention, one is converted to linearly by the process of task scheduling The Mathematical Modeling of planning, the result of task scheduling is can obtain by being solved to Mathematical Modeling.In due to the Mathematical Modeling, It is minimum as object function using total cost, using the maximum load capability of the mission requirements amount of each user and each server as constraint Condition, therefore, the method ensure that all of user task is processed, and next is able to ensure that and is distributed to each server Computing capability of the task summation no more than server itself, and the use cost of totality is minimum.
Brief description of the drawings
In order to illustrate more clearly the embodiments of the present invention, the accompanying drawing to be used needed for embodiment will be done simply below Introduce, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for ordinary skill people For member, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of flow chart of the method for scheduling task of container provided in an embodiment of the present invention;
Fig. 2 is the flow chart of the method for scheduling task of another container provided in an embodiment of the present invention;
Fig. 3 is a kind of structure chart of the task scheduling apparatus of container provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Based on this Embodiment in invention, those of ordinary skill in the art are not under the premise of creative work is made, and what is obtained is every other Embodiment, belongs to the scope of the present invention.
Core of the invention is to provide the method for scheduling task and device of a kind of container, for substantial amounts of user task to be closed The distribution of reason to corresponding server is processed so as to ensure all of user task, and next is able to ensure that and is distributed to each The task summation of server is no more than the computing capability of server itself, and the use cost of totality is minimum.
In order that those skilled in the art more fully understand the present invention program, with reference to the accompanying drawings and detailed description The present invention is described in further detail.
Fig. 1 is a kind of flow chart of the method for scheduling task of container provided in an embodiment of the present invention.As shown in figure 1, container Method for scheduling task comprise the following steps.
S10:The state parameter of server cluster is obtained, state parameter enables expense, each server including each server Current computing capability, the unit multiplexed transport expense of each user to each server, the mission requirements amount of user.
S11:State parameter is converted into the corresponding Mathematical Modeling of linear programming, in Mathematical Modeling using total cost it is minimum as Object function, using the maximum load capability of the mission requirements amount of each user and each server as constraints.
S12:Mathematical Modeling is solved to obtain corresponding destination server and task sendout.
In specific implementation, first it is to be understood that the state parameter of server cluster, describes, hereafter for the ease of use formula It is middle that these parameters are indicated using corresponding letter.
If the expense that enables of the constant expense that i-th server is produced when being activated, i.e. server is ai, user j to clothes The unit multiplexed transport expense of business device i is cij, the current computing capability of server is bi, the mission requirements amount of user j is dj.Order Variable
Make variable xijExpression is transferred to the multiplexed transport amount of server i from user j, then the corresponding Mathematical Modeling of linear programming For:
Wherein, first group of constraints, i.e.,Represent that the calculating demand of each user must is fulfilled for;The Two groups of constraintss, i.e.,Represent the maximum load capability that can not exceed server i.
As can be seen here, the scheduling problem of container can be just converted to by the corresponding number of linear programming by step S11 Model is learned, can obtain destination server and task sendout by being solved to above-mentioned Mathematical Modeling.It should be noted that Goal server is the server being selected in server cluster, i.e., the server for being obtained in solution, multiplexed transport amount It is exactly xijSolving result.
In addition, the solution to above-mentioned Mathematical Modeling has diversified forms, it is contemplated that the problem of computational efficiency, as preferred Implementation method, step S12 is specially:
Mathematical Modeling is converted to the canonical form of linear programming;
Canonical form is solved.
After the canonical form of linear programming being converted to above-mentioned Mathematical Modeling, it is possible to according to the solution side to canonical form Formula is entered to solve.It is understood that being prior art for the solution procedure of canonical form, the present embodiment is repeated no more.Linearly The canonical form of planning is:
Wherein, x0It is the f in above formula, x is xi,jAnd yiThe vector of composition, A is cijAnd aiThe matrix of composition, b is biComposition Vector.
In specific implementation, because the number of servers in server cluster is larger, and user mission requirements amount More, operand is also larger so in canonical form calculating process, undoubtedly increased the time of calculating.Therefore above-mentioned On the basis of embodiment, solution is carried out to canonical form and is specifically included:
Proportion of the number relative to the total number in server cluster according to destination server, canonical form is converted into Compressed sensing algorithm mathematics model based on the corresponding sparsity constraints of L1 norms;
Using compressed sensing Algorithm for Solving compressed sensing algorithm mathematics model.
On the basis of above formula, it is considered in real production environment, to the mission requirements amount of each user, clothes are only distributed to A small amount of node operation in business device cluster, i.e., for whole server cluster, only a small amount of server in operation, that X exists openness, is represented using L1 norms, that is, need to meet:
min|x|1
Thus, above linear programming problem can be converted into the compressed sensing problem based on L1 sparsity constraints:
Wherein, ∈ be substantially equal to 0 number.
So far, container Mission Scheduling just can use compressed sensing Algorithm for Solving.It is understood that compressed sensing is calculated Method is prior art, therefore, the present embodiment is repeated no more.
The method for scheduling task of the container that the present embodiment is provided, linear programming is converted to by the process of task scheduling Mathematical Modeling, the result of task scheduling is can obtain by being solved to Mathematical Modeling.In due to the Mathematical Modeling, taken with total With minimum as object function, the maximum load capability using the mission requirements amount of each user and each server as constraints, Therefore, the method ensure that all of user task is processed, and next is able to ensure that and is distributed to appointing for each server Business summation is no more than the computing capability of server itself, and the use cost of totality is minimum.
Fig. 2 is the flow chart of the method for scheduling task of another container provided in an embodiment of the present invention.As shown in Fig. 2 making Preferred embodiment, on the basis of above-described embodiment, also to include:
S20:Storage state parameter, and destination server and task sendout.
For the ease of the corresponding relation that the later stage is checked between each user and each server, and statistical server is appointed Business execution amount, in the present embodiment, by state parameter, i.e., each server enable expense, the current computing capability of each server, Each user is to the unit multiplexed transport expense of each server, the mission requirements amount of user and destination server and task sendout Store, so can at any time transfer examination in the later stage.
Method for scheduling task with said vesse is corresponding, invention additionally discloses a kind of task scheduling of container.Due to The embodiment of device part is mutually corresponding with the embodiment of method part, therefore the embodiment of device part refers to method part Embodiment description, wouldn't repeat here.Fig. 3 is a kind of knot of the task scheduling apparatus of container provided in an embodiment of the present invention Composition.As shown in figure 3, the task scheduling apparatus of container include:
Acquiring unit 10, the state parameter for obtaining server cluster, state parameter enables expense including each server With, the current computing capability of each server, the unit multiplexed transport expense of each user to each server, the mission requirements of user Amount;
Model construction unit 11, for state parameter to be converted into the corresponding Mathematical Modeling of linear programming, in Mathematical Modeling It is minimum as object function using total cost, using the maximum load capability of the mission requirements amount of each user and each server as constraint Condition;
Computing unit 12, for being solved to obtain corresponding destination server and task sendout to Mathematical Modeling.
Preferably implementation method, computing unit tool includes:
Modular converter, the canonical form for Mathematical Modeling to be converted to linear programming;
Computing module, for being solved to canonical form.
Preferably implementation method, computing module specifically for according to the number of destination server relative to server set The proportion of the total number in group, the compressed sensing algorithm number based on the corresponding sparsity constraints of L1 norms is converted into by canonical form Model is learned, and uses compressed sensing Algorithm for Solving compressed sensing algorithm mathematics model.
Preferably implementation method, also includes:
Memory cell, for storage state parameter, and destination server and task sendout.
The task scheduling apparatus of the container that the present embodiment is provided, linear programming is converted to by the process of task scheduling Mathematical Modeling, the result of task scheduling is can obtain by being solved to Mathematical Modeling.In due to the Mathematical Modeling, taken with total With minimum as object function, the maximum load capability using the mission requirements amount of each user and each server as constraints, Therefore, the device ensure that all of user task is processed, and next is able to ensure that and is distributed to appointing for each server Business summation is no more than the computing capability of server itself, and the use cost of totality is minimum.
The method for scheduling task and device to container provided by the present invention are described in detail above.It is each in specification Individual embodiment is described by the way of progressive, and what each embodiment was stressed is the difference with other embodiment, respectively Between individual embodiment identical similar portion mutually referring to.For device disclosed in embodiment, due to itself and embodiment Disclosed method is corresponding, so description is fairly simple, related part is referring to method part illustration.It should be pointed out that right For those skilled in the art, under the premise without departing from the principles of the invention, the present invention can also be carried out Some improvement and modification, these are improved and modification is also fallen into the protection domain of the claims in the present invention.

Claims (8)

1. a kind of method for scheduling task of container, it is characterised in that including:
Obtain server cluster state parameter, the state parameter include each server enable expense, each server work as Preceding computing capability, the unit multiplexed transport expense of each user to each server, the mission requirements amount of user;
The state parameter is converted into the corresponding Mathematical Modeling of linear programming, in the Mathematical Modeling using total cost it is minimum as Object function, using the maximum load capability of the mission requirements amount of each user and each server as constraints;
The Mathematical Modeling is solved to obtain corresponding destination server and task sendout.
2. the method for scheduling task of container according to claim 1, it is characterised in that described to be carried out to the Mathematical Modeling Solution is specially with obtaining corresponding destination server and task sendout:
The Mathematical Modeling is converted to the canonical form of linear programming;
The canonical form is solved.
3. the method for scheduling task of container according to claim 2, it is characterised in that described to be carried out to the canonical form Solution is specifically included:
Proportion of the number relative to the total number in the server cluster according to the destination server, by the canonical form Formula is converted into the compressed sensing algorithm mathematics model based on the corresponding sparsity constraints of L1 norms;
Using compressed sensing algorithm mathematics model described in compressed sensing Algorithm for Solving.
4. the method for scheduling task of container according to claim 1, it is characterised in that also include:
Store the state parameter, and the destination server and the task sendout.
5. a kind of task scheduling apparatus of container, it is characterised in that including:
Acquiring unit, the state parameter for obtaining server cluster, the state parameter include each server enable expense, The current computing capability of each server, the unit multiplexed transport expense of each user to each server, the mission requirements amount of user;
Model construction unit, for the state parameter to be converted into the corresponding Mathematical Modeling of linear programming, the Mathematical Modeling In it is minimum as object function using total cost, the maximum load capability using the mission requirements amount of each user and each server is used as about Beam condition;
Computing unit, for being solved to obtain corresponding destination server and task sendout to the Mathematical Modeling.
6. task scheduling apparatus of container according to claim 5, it is characterised in that the computing unit tool includes:
Modular converter, the canonical form for the Mathematical Modeling to be converted to linear programming;
Computing module, for being solved to the canonical form.
7. task scheduling apparatus of container according to claim 6, it is characterised in that the computing module is specifically for root According to the proportion of the number relative to the total number in the server cluster of the destination server, by canonical form conversion It is the compressed sensing algorithm mathematics model based on the corresponding sparsity constraints of L1 norms, and using described in compressed sensing Algorithm for Solving Compressed sensing algorithm mathematics model.
8. task scheduling apparatus of container according to claim 5, it is characterised in that also include:
Memory cell, for storing the state parameter, and the destination server and the task sendout.
CN201710096581.7A 2017-02-22 2017-02-22 The method for scheduling task and device of a kind of container Pending CN106815082A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710096581.7A CN106815082A (en) 2017-02-22 2017-02-22 The method for scheduling task and device of a kind of container

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710096581.7A CN106815082A (en) 2017-02-22 2017-02-22 The method for scheduling task and device of a kind of container

Publications (1)

Publication Number Publication Date
CN106815082A true CN106815082A (en) 2017-06-09

Family

ID=59111468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710096581.7A Pending CN106815082A (en) 2017-02-22 2017-02-22 The method for scheduling task and device of a kind of container

Country Status (1)

Country Link
CN (1) CN106815082A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049130A (en) * 2019-04-22 2019-07-23 北京邮电大学 A kind of service arrangement and method for scheduling task and device based on edge calculations

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699446A (en) * 2013-12-31 2014-04-02 南京信息工程大学 Quantum-behaved particle swarm optimization (QPSO) algorithm based multi-objective dynamic workflow scheduling method
CN105045656A (en) * 2015-06-30 2015-11-11 深圳清华大学研究院 Virtual container based big data storage and management method
CN105072182A (en) * 2015-08-10 2015-11-18 北京佳讯飞鸿电气股份有限公司 Load balancing method, load balancer and user terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699446A (en) * 2013-12-31 2014-04-02 南京信息工程大学 Quantum-behaved particle swarm optimization (QPSO) algorithm based multi-objective dynamic workflow scheduling method
CN105045656A (en) * 2015-06-30 2015-11-11 深圳清华大学研究院 Virtual container based big data storage and management method
CN105072182A (en) * 2015-08-10 2015-11-18 北京佳讯飞鸿电气股份有限公司 Load balancing method, load balancer and user terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049130A (en) * 2019-04-22 2019-07-23 北京邮电大学 A kind of service arrangement and method for scheduling task and device based on edge calculations
CN110049130B (en) * 2019-04-22 2020-07-24 北京邮电大学 Service deployment and task scheduling method and device based on edge computing

Similar Documents

Publication Publication Date Title
CN109947567B (en) Multi-agent reinforcement learning scheduling method and system and electronic equipment
CN104317658B (en) A kind of loaded self-adaptive method for scheduling task based on MapReduce
US9099866B2 (en) Apparatus, methods and systems for parallel power flow calculation and power system simulation
CN103049330B (en) A kind of trustship type distributed task dispatching method and system
CN107621973A (en) A kind of method for scheduling task and device across cluster
CN105718364A (en) Dynamic assessment method for ability of computation resource in cloud computing platform
CN101685480A (en) Parallel computing method for security and stability analysis of large power grid and computing platform
Zimmerman et al. Matpower optimal scheduling tool most 1.0 user’s manual
Makhloufi et al. Three powerful nature-inspired algorithms to optimize power flow in Algeria's Adrar power system
CN109240814A (en) A kind of deep learning intelligent dispatching method and system based on TensorFlow
Scholz-Reiter et al. Robust capacity allocation in dynamic production networks
Kaliaev Multiagent approach for building distributed adaptive computing system
CN110311965A (en) Method for scheduling task and system under a kind of cloud computing environment
CN116991558B (en) Computing power resource scheduling method, multi-architecture cluster, device and storage medium
Ding et al. A bi-objective DC-optimal power flow model using linear relaxation-based second order cone programming and its Pareto Frontier
CN115277692B (en) Automatic operation and maintenance method, device and system for edge network computing terminal equipment
Jin et al. Power grid simulation applications developed using the GridPACK™ high performance computing framework
CN106815082A (en) The method for scheduling task and device of a kind of container
CN107729218A (en) A kind of system and method for monitoring processing computing resource equipment
CN113807593A (en) Data quantity and data quality prediction method and system based on power dispatching
Bilek et al. Development of an agent-based workbench supporting collaborative structural design
Papaefthymiou et al. Impact of stochastic generation in power systems contingency analysis
CN108683185B (en) Disconnection impedance calculation apparatus, disconnection impedance calculation system, disconnection impedance calculation method, computer device, and storage medium
CN113285823A (en) Business function chain arranging method based on container
Lee et al. Relocatable service composition based on microservice architecture for cloud-native IoT-cloud services

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170609

RJ01 Rejection of invention patent application after publication