CN106897132A - The method and device of a kind of server task scheduling - Google Patents

The method and device of a kind of server task scheduling Download PDF

Info

Publication number
CN106897132A
CN106897132A CN201710107912.2A CN201710107912A CN106897132A CN 106897132 A CN106897132 A CN 106897132A CN 201710107912 A CN201710107912 A CN 201710107912A CN 106897132 A CN106897132 A CN 106897132A
Authority
CN
China
Prior art keywords
task
cpu
task groups
groups
binding
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
CN201710107912.2A
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 CN201710107912.2A priority Critical patent/CN106897132A/en
Publication of CN106897132A publication Critical patent/CN106897132A/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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation 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 hardware capabilities

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

The invention discloses the method and device of a kind of scheduling of server task, by the type according to task, task is distributed to pre-binding task groups;Using preset task dispatching algorithm corresponding with pre-binding task groups, task is scheduled;Wherein, pre-binding task groups comprising the first predetermined number CPU, and with the internal memory group binding of the memory node comprising the second predetermined number.Different types of task is assigned to different task groups, and have the CPU and memory node of respective numbers in task groups, will CPU and memory node be grouped, to perform different types of task, namely in task scheduling, not only allow for the characteristic of task, it is also considered that the CPU of server and the ardware feature of memory node.In task scheduling, it is contemplated that the ardware feature of server, it is possible to reduce the performance loss that task switching brings, and then the resource utilization of server is improve, improve server performance.It can be seen that, the application is conducive to improving server performance.

Description

The method and device of a kind of server task scheduling
Technical field
The present invention relates to server RAS technical fields, the method and dress of more particularly to a kind of server task scheduling Put.
Background technology
With the progress of computer technology, the performance to server proposes new requirement.
In the hardware aspect of server, multiple-path multiple-core CPU is the sustainable development direction of CPU technologies, and internal memory is then with non- Consistent storage access structure (NUMA) technology is main flow.Server can perform various tasks, and task can be divided into meter Calculate intensive task and I/O intensive tasks.Computation-intensive task can refer to the CPU usages such as calculating, logic judgment Task high, the frequent switching of computation-intensive task can reduce cpu busy percentage.I/O intensive tasks can refer to frequent net Network transmission, read the type such as hard disk and other I/O equipment task, due to I/O intensive tasks perform during, the big portions of CPU All it is that, in wait state, therefore the switching of I/O intensive tasks can improve the efficiency of server between timesharing.
Server only considers the characteristic of task, such as task scheduling of linux operating systems when being scheduled to task Be task based access control priority scheduling, i.e. task priority formulate formulated using different scheduling strategies.In the task of carrying out tune Task characteristic is only considered when spending, the hardware structure of server is not considered, may result in the degraded performance of server, for example, appointing Business frequent switching can take CPU, or due to the wait of memory source and I/O resources so that CPU is constantly in idle shape State.Therefore how when server task is dispatched, the performance for improving server is this area problem demanding prompt solution.
The content of the invention
It is an object of the invention to provide the method and device of a kind of scheduling of server task, it is therefore intended that solve existing skill Server relatively low problem of performance in task scheduling in art.
In order to solve the above technical problems, the present invention provides a kind of method of server task scheduling, the method includes:
According to the type of task, the task is distributed to pre-binding task groups;
Using preset task dispatching algorithm corresponding with the pre-binding task groups, the task is scheduled;
Wherein, the pre-binding task groups comprising the first predetermined number CPU, and with the internal memory comprising the second predetermined number The internal memory group binding of node.
Alternatively, preset task dispatching algorithm corresponding with the pre-binding task groups is utilized described, to the task Also include after being scheduled:
The CPU usage and memory node occupancy in the pre-binding task groups are obtained using monitor task;
According to the CPU usage and memory node occupancy, the CPU of the dynamic increase and decrease pre-binding task groups And the quantity of the memory node.
Alternatively, it is described according to the CPU usage and memory node occupancy, the dynamic increase and decrease pre-binding task The CPU of group and the quantity of the memory node include:
When the CPU usage is more than or equal to the first predetermined threshold value, the 3rd predetermined number is called from other task groups CPU;
When the memory node occupancy is more than or equal to the second predetermined threshold value, the 4th is called to preset from other task groups The memory node of quantity;
When the CPU usage is less than three predetermined threshold values, the CPU that will be called returns to corresponding task groups;
When the memory node occupancy is less than four predetermined threshold values, the memory node that will be called returns to correspondence Task groups.
Alternatively, the binding procedure of the task and the pre-binding task groups is specially:
According to the task type of required execution, multiple tasks group is created;
According to needed for the hardware configuration of server and each described task groups, by the CPU of respective numbers and each institute Task groups are stated to be bound;
Needed for internal memory according to each task groups, the memory node of respective numbers is carried out with task groups each described Binding;
According to the characteristic of each task groups, corresponding task scheduling algorithm is chosen;
When the task is created, according to the type of the task, the task is bound with corresponding task groups, Obtain the pre-binding task groups.
Alternatively, the task groups include:Task more than CPU intensive type task groups, I/O intensities and committed memory resource Group, I/O intensities and the few task groups of committed memory resource and operating system internal task group.
Additionally, present invention also offers a kind of device of server task scheduling, the device includes:
Distribute module, for the type according to task, the task is distributed to pre-binding task groups;
Scheduler module, for utilizing preset task dispatching algorithm corresponding with the pre-binding task groups, to the task It is scheduled;
Wherein, the pre-binding task groups comprising the first predetermined number CPU, and with the internal memory comprising the second predetermined number The internal memory group binding of node.
Alternatively, also include:
Monitoring module, for obtaining CPU usage and internal memory section in the pre-binding task groups using monitor task Point occupancy;
Dynamic swap modules, for according to the CPU usage and memory node occupancy, dynamic increase and decrease is described pre- to tie up Determine the CPU of task groups and the quantity of the memory node.
Alternatively, the dynamic swap modules include:
CPU adding units, for when the CPU usage is more than or equal to the first predetermined threshold value, from other task groups Call the CPU of the 3rd predetermined number;
Memory node adding unit, for when the memory node occupancy be more than or equal to the second predetermined threshold value when, from Other task groups call the memory node of the 4th predetermined number;
CPU reduces unit, for when the CPU usage is less than three predetermined threshold values, the CPU that will be called to be returned To corresponding task groups;
Memory node adding unit, for when the memory node occupancy is less than four predetermined threshold values, by what is called The memory node returns to corresponding task groups.
Alternatively, also include:
Creation module, for the task type performed according to needed for, creates multiple tasks group;
CPU binding modules, for according to needed for the hardware configuration of server and each described task groups, by respective counts The CPU of amount is bound with task groups each described;
Internal memory binding module, needed for for the internal memory according to each task groups, by the memory node of respective numbers with Each described task groups is bound;
Dispatching algorithm chosen module, for the characteristic according to each task groups, chooses corresponding task scheduling algorithm;
Task binding module, for when the task is created, according to the type of the task, by the task with it is corresponding Task groups bound, obtain the pre-binding task groups.
Alternatively, the task groups include:Task more than CPU intensive type task groups, I/O intensities and committed memory resource Group, I/O intensities and the few task groups of committed memory resource and operating system internal task group.
The method and device of a kind of server task scheduling provided by the present invention, by the type according to task, will Above-mentioned task is distributed to pre-binding task groups;Using preset task dispatching algorithm corresponding with above-mentioned pre-binding task groups, to upper The task of stating is scheduled;Wherein, above-mentioned pre-binding task groups comprising the first predetermined number CPU, and with comprising the second present count The internal memory group binding of the memory node of amount.Different types of task is assigned to different task groups, and has corresponding in task groups The CPU and memory node of quantity, will CPU and memory node be grouped, to perform different types of task, namely in task During scheduling, the characteristic of task is not only allowed for, it is also considered that the CPU of server and the ardware feature of memory node.Adjusted in task When spending, it is contemplated that the ardware feature of server, it is possible to reduce the performance loss that task switching brings, and then improve server Resource utilization, improves server performance.It can be seen that, the application is conducive to improving server performance.
Brief description of the drawings
For the clearer explanation embodiment of the present invention or the technical scheme of prior art, below will be to embodiment or existing The accompanying drawing to be used needed for technology description is briefly described, it should be apparent that, drawings in the following description are only this hair Some bright embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can be with root Other accompanying drawings are obtained according to these accompanying drawings.
A kind of flow of specific embodiment of the server task dispatching method that Fig. 1 is provided by the embodiment of the present invention is shown It is intended to;
The CPU and internal memory of the task groups that Fig. 2 is provided by the embodiment of the present invention divide schematic diagram;
Fig. 3 is tied to the schematic diagram of different task group by different types of task that the embodiment of the present invention is provided;
Fig. 4 is provided by the embodiment of the present invention in adjustment task groups CPU and the schematic diagram of memory node;
The structured flowchart of the server task dispatching device that Fig. 5 is provided by the embodiment of the present invention.
Specific embodiment
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.Obviously, described embodiment is only a part of embodiment of the invention, rather than Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative work premise Lower obtained every other embodiment, belongs to the scope of protection of the invention.
Refer to Fig. 1, a kind of specific embodiment party of the server task dispatching method that Fig. 1 is provided by the embodiment of the present invention The schematic flow sheet of formula, the method is comprised the following steps:
Step 101:According to the type of task, the task is distributed to pre-binding task groups, wherein, the pre-binding is appointed Business group comprising the first predetermined number CPU, and with the internal memory group binding of the memory node comprising the second predetermined number;
It should be noted that the type of above-mentioned task can refer to the task class divided according to task characteristic in server Not.Computation-intensive task is one kind of server task, i.e. CPU intensive type task, the CPU usage of the task of the type compared with Height, for example, the task such as calculating, logic judgment;I/O intensive tasks are also one kind of server task, are appointed the type is performed During business, CPU is essentially in wait state, for example, frequently network transmission, the reading task such as hard disk and other I/O equipment.
More specifically, being divided into the task of server, CPU intensive type task, I/O are intensive and committed memory is provided Task, I/O intensity and the few task of committed memory resource and operating system internal task more than source.Certainly, service is had a high regard for Business can also have other types, be not limited thereto.
Above-mentioned pre-binding task groups can refer to the task groups with the binding in advance of above-mentioned task, i.e., according to the class of above-mentioned task Type, is distributed to corresponding task groups and goes to perform.
Because the type of above-mentioned task can have various, thus above-mentioned pre-binding task groups be likely to it is various, for example, when clothes Business have a high regard for business for CPU intensive type task, I/O are intensive and committed memory resource more than task, I/O is intensive and committed memory is provided When the few task in source and operating system internal task, correspondingly, above-mentioned pre-binding task groups can be CPU intensive type task Task groups, I/O intensities and the few task groups of committed memory resource and behaviour more than group, I/O intensities and committed memory resource Make internal system task groups.
It is understood that according to the hardware resource of the required by task for performing each type, in above-mentioned pre-binding task groups There is CPU, and binding has respective numbers memory node.CPU quantity and memory node in each task groups, can be by task groups The number of performed required by task hardware resource is determined.For example, for CPU intensive type task, corresponding CPU intensive The quantity of the CPU of type task groups is more;And for the task more than I/O intensities and committed memory resource, corresponding I/O is close The internal memory required for task groups more than collection type and committed memory resource is more, therefore the quantity of its memory node can correspondingly increase Plus.
Therefore the numerical value of above-mentioned first predetermined number and the second predetermined number can be determined by the type of its task groups, example Such as, when above-mentioned pre-binding task groups are CPU intensive type task groups, the numerical value of the first predetermined number can be 4, the second present count The numerical value of amount can be 2.The type of task is different, and the value of the first predetermined number and the second predetermined number also has accordingly not Together, i.e. the type of pre-binding task groups is different, and the value of the first predetermined number and the second predetermined number also has corresponding difference.
In order to preferably introduce the CPU numbers and memory node of each task groups, it is introduced below in conjunction with Fig. 2, Fig. 2 By the CPU and internal memory division schematic diagram of the task groups that the embodiment of the present invention is provided.
As shown in Fig. 2 task groups can include that CPU intensive type task groups, I/O are intensive and committed memory resource more than appoint Business group, I/O intensities and the few task groups of committed memory resource and operating system internal task group.CPU intensive type task groups Inside there are 4 CPU, respectively CPU0, CPU1, CPU2 and CPU3, there is the memory group 0 including memory node node0 and node1; I/O is intensive and committed memory resource more than task groups in have 2 CPU, a respectively CPU4 and CPU5, and with including 4 internal memories The memory group 1 of node is bound, respectively node2, node3, node4 and node5;I/O is intensive and committed memory resource is few Task groups have 2 CPU, respectively CPU6 and CPU7, and bound with including 2 memory groups of memory node 2, respectively Node6 and node7;Operating system internal task group, there is 2 CPU, is not CPU8 and CPU9, and with including 2 memory nodes Memory group 3 is bound, respectively node8 and node9.It should be evident that the division of the CPU and memory node in task groups is not limited Situation proposed in above.
It should be noted that the internal storage structure of server can have in multiple with NUMA internal storage structures, NUMA internal storage structures Node (Node) is deposited, node can be divided into local node (Local Node), neighbor node (Neighbour Node) and distal end section Point (Remote Node) three types, each node can possess multiple CPU (each CPU can have multiple cores or thread), Total Memory Controller Hub is used in node.The speed that CPU accesses different type node memory is differed, usually, this Ground node>Neighbor node>Distant-end node.
It is understood that need to carry out the binding of task and task groups before being scheduled task, therefore in the present invention Some embodiments in, the binding flow of task and task groups can be specially:According to the task type of required execution, create many Individual task groups;According to needed for the hardware configuration of server and each described task groups, by the CPU of respective numbers and each institute Task groups are stated to be bound;Needed for internal memory according to each task groups, by described in the memory node of respective numbers and each Task groups are bound;According to the characteristic of each task groups, corresponding task scheduling algorithm is chosen;Creating the task When, according to the type of the task, the task is bound with corresponding task groups, obtain the pre-binding task groups.
It should be noted that being that task groups are divided, it is necessary to created to task groups before task and task group binding The internal memory and CPU quantity of respective numbers.
According to the type of task, the task groups for performing corresponding task type are created, after task groups are created, can be according to clothes The hardware configuration of business device, corresponding hardware resource is distributed to different task groups, as each task group assignment respective numbers CPU and memory node.
The binding procedure of task and task groups can occur in task creation, you can with the class according to being created for task Type difference, the task type being tied to performed by corresponding task groups, i.e. task groups and the task type for being created Unanimously.
In order to preferably introduce the task of each type and the binding procedure of different task groups, enter below in conjunction with Fig. 3 Row is introduced, and Fig. 3 is tied to the schematic diagram of different task group by different types of task that the embodiment of the present invention is provided.
It should be noted that Fig. 3 is based on Fig. 2, therefore the CPU numbers included by each task groups are no longer discussed in detail And memory node, specifically may refer to the detailed description of figure 2 above.
As shown in figure 3, Task a, Task b, Task c ... and CPU intensive type task groups are bound, Task a, Task b, Task c ... are CPU intensive type task;By Task m, Task n, Task l ... and I/O is intensive and takes interior Deposit the task groups more than resource to be bound, Task m, Task n, Task l ... are I/O intensities and committed memory resource is more Task;By Task x, Task y, Task z ... and I/O is intensive and the few task groups of committed memory resource are bound, Task x, Task y, Task z ... be that I/O is intensive and committed memory resource more than task;By Task p, Task q, Task r ... are bound with operating system internal task group, and Task p, Task q, Task r ... are operating system inside and appoint Business.
Step 102:Using preset task dispatching algorithm corresponding with the pre-binding task groups, the task is adjusted Degree.
It should be noted that above-mentioned preset task dispatching algorithm can refer to the task type according to performed by task groups and The dispatching algorithm of selection.Task scheduling algorithm has a lot, such as SCHED_FIFO dispatching algorithms and SCHED_RR dispatching algorithms.
According to the difference of above-mentioned pre-binding task groups, its task scheduling algorithm is also different, correspondingly task scheduling process It is different.
For example, when task groups are CPU intensive type task groups, its corresponding task scheduling algorithm can be adjusted for SCHED_FIFO Degree algorithm.The scheduling process of its task can be specially:Number of tasks less than in task groups total check figure (assuming that there is 4 CPU, 24 cores of each CPU, total check figure 4*24=96) when, each task binds a core, and task can always run to task and terminate, Or task actively concedes CPU, i.e., task switching is not carried out during task;And work as number of tasks more than the total check figure in task groups When, priority task high can seize the task of low priority.
When task groups be that I/O is intensive and committed memory resource more than task groups, its corresponding task scheduling algorithm can be with It is SCHED_RR dispatching algorithms.Task in the task groups is performed in turn, i.e., one time of timeslice of each tasks carrying is just Switch, meanwhile, priority task high can be with the low task of preempting priority.Can also be calculated according to task priority During timeslice, the task relatively long for some timeslices, it is not necessary to too frequent switching for example reads substantial amounts of data from disk Database data, is difficult to complete because hard disk speed is slow, in the short time, and this subtask is switched out, it is possible to which the time waited slightly length is again Switch back.
When task groups are that I/O is intensive and the few task groups of committed memory resource, its corresponding task scheduling algorithm can be with It is SCHED_RR dispatching algorithms.Task in the task groups is performed in turn, i.e., one time of timeslice of each tasks carrying is just Switch.Meanwhile, priority task high can be with the low task of preempting priority.Because the corresponding task of the task groups may It is the operation with user mutual, such as operates terminal, therefore need frequency swap-in row task to switch, strengthens Consumer's Experience.
When task groups are for and for operating system internal task group, its corresponding task scheduling algorithm can be SCHED_ OTHER timesharing dispatching algorithms.The task of the task groups is usually the task that maintenance system is normally run, and these task majorities are Periodically performing for task, such as refresh disk cache and safeguard network linking etc..Therefore can be appointed using corresponding Business dispatching algorithm, respective timeslice is calculated according to task priority.
It should be evident that the task priority in each task groups can carry out real-time adjustment according to the state of task, Task priority can be adjusted, so that task can be performed in time, it is to avoid some priorities of task according to the state of current task Level is low cannot to be performed forever.
In order to ensure the timely execution of the task in each task groups, can in the heavier loads in certain task groups, Corresponding hardware resource is called from other task groups, to treat many tasks, after task excessive accordingly has been processed, also The hardware resource that will can be called before is returned to corresponding task groups.
Therefore in some embodiments of the invention, the process of the hardware resource in dynamic increase and decrease task groups can be specially: The CPU usage and memory node occupancy in the pre-binding task groups are obtained using monitor task;Accounted for according to the CPU With rate and memory node occupancy, the number of the dynamic CPU and the memory node for increasing and decreasing the pre-binding task groups Amount.
It should be noted that the task type of above-mentioned monitor task can be operating system internal task, i.e. monitor task Can distribute to operating system internal task group and perform.
When may be appreciated, when CPU usage is too high, show the heavier loads of the CPU of current task group, can be corresponding Ground increases a number of CPU.And when memory node occupancy is too high, show current task group memory node load compared with Weight, can correspondingly increase a number of memory node.Correspondingly, when CPU usage or memory node occupancy are relatively low When, it can correspondingly reduce a number of CPU or memory node.
The CPU or memory node that are called from other task groups are returned to phase by the number for reducing CPU or memory node The heavier loads of the task groups answered, i.e. task groups from other task groups, it is necessary to call a number of CPU or internal memory section Point, after a period of time, the load of task groups declines, then the CPU or memory node that will be called before, returns to and is called CPU or the corresponding task groups of memory node.
The number for reducing CPU or memory node may also mean that itself CPU or memory node to other task groups Call, i.e. the light load of current task group, and the heavier loads of other task groups, other task groups can be from current task group Call a number of CPU and memory node.
In order to preferably introduce the increase process of explanation CPU or memory node, explanation is introduced below in conjunction with Fig. 4, Fig. 4 is provided by the embodiment of the present invention in adjustment task groups CPU and the schematic diagram of memory node.
It should be noted that Fig. 4 is based on Fig. 3, thus be no longer discussed in detail each task groups and corresponding CPU and Memory node, specifically may refer to corresponding contents above.
As shown in figure 4, the present load of CPU intensive type task groups is heavier, i.e., its CPU usage is higher, therefore it is close from I/O Collection type and the few task groups of committed memory resource call CPU6 to process current task, and now, I/O is intensive and committed memory resource Then there was only CPU7 in few task groups.And I/O is intensive and committed memory resource more than task groups memory node occupancy It is higher, therefore it calls a memory node node8 from operating system internal task group, now, operating system internal task is formed a team The memory group 3 of member then only has memory node node9.
In some embodiments of the invention, according to the CPU usage and memory node occupancy, dynamic increase and decrease institute The quantity of the CPU and the memory node that state pre-binding task groups can be specially:When the CPU usage be more than or During equal to the first predetermined threshold value, the CPU of the 3rd predetermined number is called from other task groups;When the memory node occupancy is more than Or during equal to the second predetermined threshold value, the memory node of the 4th predetermined number is called from other task groups;When the CPU usage is small When three predetermined threshold values, the CPU that will be called returns to corresponding task groups;When the memory node occupancy is less than the During four predetermined threshold values, the memory node that will be called returns to corresponding task groups.
It should be noted that the default threshold of above-mentioned first predetermined threshold value, the second predetermined threshold value, the 3rd predetermined threshold value and the 4th The numerical value of value can arbitrarily set.For example, the first predetermined threshold value can be set as into 90%, the second predetermined threshold value is set as 90%, the 3rd predetermined threshold value is set as 50%, and the 4th predetermined threshold value is set as 50%.
And the numerical values recited of above-mentioned 3rd predetermined number and the 4th predetermined number can also task setting.For example, can be with 3rd predetermined number is set as 1, i.e., calls 1 CPU, the 4th predetermined number to be set as 2 from other task groups, i.e., from other Business group calls 2 memory nodes.
Number is preset by the way that whether the CPU usage and memory node occupancy of task groups exceed or fall below certain Value, so that each task groups can reasonably using the hardware resource of server.
The method of the server task scheduling that the embodiment of the present invention is provided, by the type according to task, by above-mentioned Business is distributed to pre-binding task groups;Using preset task dispatching algorithm corresponding with above-mentioned pre-binding task groups, to above-mentioned task It is scheduled;Wherein, above-mentioned pre-binding task groups comprising the first predetermined number CPU, and with comprising in the second predetermined number Deposit the internal memory group binding of node.Different types of task is assigned to different task groups, and there are respective numbers in task groups CPU and memory node, will CPU and memory node be grouped, to perform different types of task, namely in task scheduling When, not only allow for the characteristic of task, it is also considered that the CPU of server and the ardware feature of memory node.In task scheduling, In view of the ardware feature of server, it is possible to reduce the performance loss that task switching brings, and then improve the resource of server Utilization rate, improves server performance.
Server task dispatching device provided in an embodiment of the present invention is introduced below, service described below is had a high regard for Business dispatching device can be mutually to should refer to above-described server task dispatching method.
The structured flowchart of the server task dispatching device that Fig. 5 is provided by the embodiment of the present invention, the service of reference picture 5 is had a high regard for The device for being engaged in dispatching can include:
Distribute module 501, for the type according to task, the task is distributed to pre-binding task groups;
Scheduler module 502, for utilizing preset task dispatching algorithm corresponding with the pre-binding task groups, to described Business is scheduled;
Wherein, the pre-binding task groups comprising the first predetermined number CPU, and with the internal memory comprising the second predetermined number The internal memory group binding of node.
Alternatively, also include:
Monitoring module, for obtaining CPU usage and internal memory section in the pre-binding task groups using monitor task Point occupancy;
Dynamic swap modules, for according to the CPU usage and memory node occupancy, dynamic increase and decrease is described pre- to tie up Determine the CPU of task groups and the quantity of the memory node.
Alternatively, the dynamic swap modules include:
CPU adding units, for when the CPU usage is more than or equal to the first predetermined threshold value, from other task groups Call the CPU of the 3rd predetermined number;
Memory node adding unit, for when the memory node occupancy be more than or equal to the second predetermined threshold value when, from Other task groups call the memory node of the 4th predetermined number;
CPU reduces unit, for when the CPU usage is less than three predetermined threshold values, the CPU that will be called to be returned To corresponding task groups;
Memory node adding unit, for when the memory node occupancy is less than four predetermined threshold values, by what is called The memory node returns to corresponding task groups.
Alternatively, also include:
Creation module, for the task type performed according to needed for, creates multiple tasks group;
CPU binding modules, for according to needed for the hardware configuration of server and each described task groups, by respective counts The CPU of amount is bound with task groups each described;
Internal memory binding module, needed for for the internal memory according to each task groups, by the memory node of respective numbers with Each described task groups is bound;
Dispatching algorithm chosen module, for the characteristic according to each task groups, chooses corresponding task scheduling algorithm;
Task binding module, for when the task is created, according to the type of the task, by the task with it is corresponding Task groups bound, obtain the pre-binding task groups.
Alternatively, the task groups include:Task more than CPU intensive type task groups, I/O intensities and committed memory resource Group, I/O intensities and the few task groups of committed memory resource and operating system internal task group.
The device of the server task scheduling that the embodiment of the present invention is provided, different types of task is assigned to different Task groups, and have the CPU and memory node of respective numbers in task groups, will CPU and memory node be grouped, to perform not The task of same type, namely in task scheduling, not only allow for the characteristic of task, it is also considered that the CPU and internal memory of server The ardware feature of node.In task scheduling, it is contemplated that the ardware feature of server, it is possible to reduce the performance that task switching brings Loss, and then the resource utilization of server is improve, improve server performance.
Each embodiment is described by the way of progressive in this specification, and what each embodiment was stressed is and other The difference of embodiment, between each embodiment same or similar part mutually referring to.For being filled disclosed in embodiment For putting, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is referring to method part Illustrate.
Professional further appreciates that, with reference to the unit of each example of the embodiments described herein description And algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware and The interchangeability of software, generally describes the composition and step of each example according to function in the above description.These Function is performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme.Specialty Technical staff can realize described function to each specific application using distinct methods, but this realization should not Think beyond the scope of this invention.
The step of method or algorithm for being described with reference to the embodiments described herein, directly can be held with hardware, processor Capable software module, or the two combination is implemented.Software module can be placed in random access memory (RAM), internal memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In field in known any other form of storage medium.
The method and device to server task provided by the present invention scheduling are described in detail above.Herein Apply specific case to be set forth principle of the invention and implementation method, the explanation of above example is only intended to help Understand the method for the present invention and its core concept.It should be pointed out that for those skilled in the art, not taking off On the premise of the principle of the invention, some improvement and modification can also be carried out to the present invention, these are improved and modification also falls into this In invention scope of the claims.

Claims (10)

1. a kind of method that server task is dispatched, it is characterised in that including:
According to the type of task, the task is distributed to pre-binding task groups;
Using preset task dispatching algorithm corresponding with the pre-binding task groups, the task is scheduled;
Wherein, the pre-binding task groups comprising the first predetermined number CPU, and with the memory node comprising the second predetermined number Internal memory group binding.
2. the method for claim 1, it is characterised in that described using corresponding with the pre-binding task groups default Task scheduling algorithm, also includes after being scheduled to the task:
The CPU usage and memory node occupancy in the pre-binding task groups are obtained using monitor task;
According to the CPU usage and memory node occupancy, the CPU of the dynamic increase and decrease pre-binding task groups and The quantity of the memory node.
3. method as claimed in claim 2, it is characterised in that described to be taken according to the CPU usage and memory node Rate, the CPU of the dynamic increase and decrease pre-binding task groups and the quantity of the memory node include:
When the CPU usage is more than or equal to the first predetermined threshold value, the 3rd predetermined number is called from other task groups CPU;
When the memory node occupancy is more than or equal to the second predetermined threshold value, the 4th predetermined number is called from other task groups Memory node;
When the CPU usage is less than three predetermined threshold values, the CPU that will be called returns to corresponding task groups;
When the memory node occupancy is less than four predetermined threshold values, the memory node that will be called returns to corresponding Business group.
4. the method as described in any one of claims 1 to 3, it is characterised in that the task and the pre-binding task groups Binding procedure is specially:
According to the task type of required execution, multiple tasks group is created;
According to needed for the hardware configuration of server and each described task groups, by the CPU of respective numbers and each described Business group is bound;
Needed for internal memory according to each task groups, the memory node of respective numbers is tied up with task groups each described It is fixed;
According to the characteristic of each task groups, corresponding task scheduling algorithm is chosen;
When the task is created, according to the type of the task, the task is bound with corresponding task groups, obtained The pre-binding task groups.
5. method as claimed in claim 4, it is characterised in that the task groups include:CPU intensive type task groups, I/O are intensive Inside task groups, I/O intensity and the few task groups of committed memory resource and operating system more than type and committed memory resource Task groups.
6. the device that a kind of server task is dispatched, it is characterised in that including:
Distribute module, for the type according to task, the task is distributed to pre-binding task groups;
Scheduler module, for utilizing preset task dispatching algorithm corresponding with the pre-binding task groups, is carried out to the task Scheduling;
Wherein, the pre-binding task groups comprising the first predetermined number CPU, and with the memory node comprising the second predetermined number Internal memory group binding.
7. device as claimed in claim 6, it is characterised in that also include:
Monitoring module, is accounted for for being obtained CPU usage and memory node in the pre-binding task groups using monitor task With rate;
Dynamic swap modules, for according to the CPU usage and memory node occupancy, the dynamic increase and decrease pre-binding to be appointed The CPU of business group and the quantity of the memory node.
8. device as claimed in claim 7, it is characterised in that the dynamic swap modules include:
CPU adding units, for when the CPU usage is more than or equal to the first predetermined threshold value, being called from other task groups The CPU of the 3rd predetermined number;
Memory node adding unit, for when the memory node occupancy is more than or equal to the second predetermined threshold value, from other Task groups call the memory node of the 4th predetermined number;
CPU reduces unit, for when the CPU usage is less than three predetermined threshold values, it is right that the CPU that will be called is returned to The task groups answered;
Memory node adding unit, for when the memory node occupancy is less than four predetermined threshold values, described in calling Memory node returns to corresponding task groups.
9. the device as described in any one of claim 6 to 8, it is characterised in that also include:
Creation module, for the task type performed according to needed for, creates multiple tasks group;
CPU binding modules, for according to needed for the hardware configuration of server and each described task groups, by respective numbers CPU is bound with task groups each described;
Internal memory binding module, needed for for the internal memory according to each task groups, by the memory node of respective numbers and each The task groups are bound;
Dispatching algorithm chosen module, for the characteristic according to each task groups, chooses corresponding task scheduling algorithm;
Task binding module, for when the task is created, according to the type of the task, the task being appointed with corresponding Business group is bound, and obtains the pre-binding task groups.
10. device as claimed in claim 9, it is characterised in that the task groups include:CPU intensive type task groups, I/O are close In task groups, I/O intensity and the few task groups of committed memory resource and operating system more than collection type and committed memory resource Portion's task groups.
CN201710107912.2A 2017-02-27 2017-02-27 The method and device of a kind of server task scheduling Pending CN106897132A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710107912.2A CN106897132A (en) 2017-02-27 2017-02-27 The method and device of a kind of server task scheduling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710107912.2A CN106897132A (en) 2017-02-27 2017-02-27 The method and device of a kind of server task scheduling

Publications (1)

Publication Number Publication Date
CN106897132A true CN106897132A (en) 2017-06-27

Family

ID=59184214

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710107912.2A Pending CN106897132A (en) 2017-02-27 2017-02-27 The method and device of a kind of server task scheduling

Country Status (1)

Country Link
CN (1) CN106897132A (en)

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273202A (en) * 2017-07-14 2017-10-20 郑州云海信息技术有限公司 A kind of method and apparatus of control task scheduling
CN107656805A (en) * 2017-10-20 2018-02-02 广东电网有限责任公司电力调度控制中心 A kind of electric power data job scheduling method based on Hadoop platform
CN107678860A (en) * 2017-10-13 2018-02-09 郑州云海信息技术有限公司 A kind of optimization method and system of KVM virtual machines CPU scheduling strategies
CN108021453A (en) * 2017-12-22 2018-05-11 联想(北京)有限公司 A kind of computing resource optimization method, device and server cluster
CN108228354A (en) * 2017-12-29 2018-06-29 杭州朗和科技有限公司 Dispatching method, system, computer equipment and medium
CN108227901A (en) * 2017-12-30 2018-06-29 广东技术师范学院 It is a kind of based on the disk power consumption state switching method sporadicly asked
CN109144718A (en) * 2018-07-06 2019-01-04 北京比特大陆科技有限公司 A kind of memory allocation method, memory release method and relevant device
CN109144716A (en) * 2017-06-28 2019-01-04 中兴通讯股份有限公司 Operating system dispatching method and device, equipment based on machine learning
CN109408215A (en) * 2018-11-07 2019-03-01 郑州云海信息技术有限公司 A kind of method for scheduling task and device of calculate node
CN109471724A (en) * 2018-10-23 2019-03-15 郑州云海信息技术有限公司 A kind of method and system of switch operating amount of memory
CN109471707A (en) * 2018-10-12 2019-03-15 传化智联股份有限公司 The dispositions method and device of scheduler task
CN109558245A (en) * 2018-12-03 2019-04-02 群蜂信息技术(上海)有限公司 A kind of method for processing business based on microserver framework, device and server
CN109600396A (en) * 2019-01-23 2019-04-09 浙江安点科技有限责任公司 Realize the firewall system of highly reliable safety
CN109725996A (en) * 2018-06-15 2019-05-07 中国平安人寿保险股份有限公司 Mission mode selection and task executing method, device, equipment and storage medium
CN109814985A (en) * 2017-11-20 2019-05-28 杭州华为数字技术有限公司 A kind of method for scheduling task and scheduler calculate equipment, system
CN110111458A (en) * 2019-04-16 2019-08-09 深圳市多度科技有限公司 Realize method, system and door access machine that face is deployed to ensure effective monitoring and control of illegal activities
CN110750341A (en) * 2018-07-24 2020-02-04 深圳市优必选科技有限公司 Task scheduling method, device, system, terminal equipment and storage medium
CN110764981A (en) * 2019-09-09 2020-02-07 北京新数科技有限公司 Integrated operation and maintenance management method and device for IT machine room
WO2020063040A1 (en) * 2018-09-26 2020-04-02 Oppo广东移动通信有限公司 Processor core configuration method and apparatus, terminal, and storage medium
CN112513814A (en) * 2020-04-01 2021-03-16 华为技术有限公司 Task scheduling method and device
CN112667380A (en) * 2020-12-30 2021-04-16 珠海亿智电子科技有限公司 Multiprocessor task scheduling method, device and storage medium
CN112817728A (en) * 2021-02-20 2021-05-18 咪咕音乐有限公司 Task scheduling method, network device and storage medium
CN113032137A (en) * 2019-12-25 2021-06-25 中科寒武纪科技股份有限公司 Task allocation method and device, computer equipment and readable storage medium
CN113312166A (en) * 2021-07-29 2021-08-27 阿里云计算有限公司 Resource processing method and device
CN113641482A (en) * 2021-08-31 2021-11-12 联通(广东)产业互联网有限公司 AI algorithm off-line scheduling method, system, computer equipment and storage medium
CN117707738A (en) * 2024-01-10 2024-03-15 苏州市欧冶半导体有限公司 Task processing method, system, device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104181510A (en) * 2014-09-05 2014-12-03 电子科技大学 Parallel radar pulse compression method
CN105141541A (en) * 2015-09-23 2015-12-09 浪潮(北京)电子信息产业有限公司 Task-based dynamic load balancing scheduling method and device
CN105302638A (en) * 2015-11-04 2016-02-03 国家计算机网络与信息安全管理中心 MPP (Massively Parallel Processing) cluster task scheduling method based on system load
CN105808328A (en) * 2014-12-31 2016-07-27 杭州华为数字技术有限公司 Task scheduling method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104181510A (en) * 2014-09-05 2014-12-03 电子科技大学 Parallel radar pulse compression method
CN105808328A (en) * 2014-12-31 2016-07-27 杭州华为数字技术有限公司 Task scheduling method, device and system
CN105141541A (en) * 2015-09-23 2015-12-09 浪潮(北京)电子信息产业有限公司 Task-based dynamic load balancing scheduling method and device
CN105302638A (en) * 2015-11-04 2016-02-03 国家计算机网络与信息安全管理中心 MPP (Massively Parallel Processing) cluster task scheduling method based on system load

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144716A (en) * 2017-06-28 2019-01-04 中兴通讯股份有限公司 Operating system dispatching method and device, equipment based on machine learning
CN107273202A (en) * 2017-07-14 2017-10-20 郑州云海信息技术有限公司 A kind of method and apparatus of control task scheduling
CN107678860A (en) * 2017-10-13 2018-02-09 郑州云海信息技术有限公司 A kind of optimization method and system of KVM virtual machines CPU scheduling strategies
CN107656805A (en) * 2017-10-20 2018-02-02 广东电网有限责任公司电力调度控制中心 A kind of electric power data job scheduling method based on Hadoop platform
CN109814985A (en) * 2017-11-20 2019-05-28 杭州华为数字技术有限公司 A kind of method for scheduling task and scheduler calculate equipment, system
CN109814985B (en) * 2017-11-20 2021-07-16 华为技术有限公司 Task scheduling method and scheduler, computing device and system
CN108021453A (en) * 2017-12-22 2018-05-11 联想(北京)有限公司 A kind of computing resource optimization method, device and server cluster
CN108228354A (en) * 2017-12-29 2018-06-29 杭州朗和科技有限公司 Dispatching method, system, computer equipment and medium
CN108227901A (en) * 2017-12-30 2018-06-29 广东技术师范学院 It is a kind of based on the disk power consumption state switching method sporadicly asked
CN108227901B (en) * 2017-12-30 2020-07-14 广东技术师范大学 Disk power consumption state switching method based on sporadic request
CN109725996B (en) * 2018-06-15 2023-07-21 中国平安人寿保险股份有限公司 Task mode selection and task execution method, device, equipment and storage medium
CN109725996A (en) * 2018-06-15 2019-05-07 中国平安人寿保险股份有限公司 Mission mode selection and task executing method, device, equipment and storage medium
CN109144718A (en) * 2018-07-06 2019-01-04 北京比特大陆科技有限公司 A kind of memory allocation method, memory release method and relevant device
CN110750341A (en) * 2018-07-24 2020-02-04 深圳市优必选科技有限公司 Task scheduling method, device, system, terminal equipment and storage medium
CN110750341B (en) * 2018-07-24 2022-08-02 深圳市优必选科技有限公司 Task scheduling method, device, system, terminal equipment and storage medium
WO2020063040A1 (en) * 2018-09-26 2020-04-02 Oppo广东移动通信有限公司 Processor core configuration method and apparatus, terminal, and storage medium
CN109471707A (en) * 2018-10-12 2019-03-15 传化智联股份有限公司 The dispositions method and device of scheduler task
CN109471724A (en) * 2018-10-23 2019-03-15 郑州云海信息技术有限公司 A kind of method and system of switch operating amount of memory
CN109408215A (en) * 2018-11-07 2019-03-01 郑州云海信息技术有限公司 A kind of method for scheduling task and device of calculate node
CN109408215B (en) * 2018-11-07 2021-10-01 郑州云海信息技术有限公司 Task scheduling method and device for computing node
CN109558245A (en) * 2018-12-03 2019-04-02 群蜂信息技术(上海)有限公司 A kind of method for processing business based on microserver framework, device and server
CN109600396A (en) * 2019-01-23 2019-04-09 浙江安点科技有限责任公司 Realize the firewall system of highly reliable safety
CN110111458A (en) * 2019-04-16 2019-08-09 深圳市多度科技有限公司 Realize method, system and door access machine that face is deployed to ensure effective monitoring and control of illegal activities
CN110764981A (en) * 2019-09-09 2020-02-07 北京新数科技有限公司 Integrated operation and maintenance management method and device for IT machine room
CN113032137A (en) * 2019-12-25 2021-06-25 中科寒武纪科技股份有限公司 Task allocation method and device, computer equipment and readable storage medium
WO2021196074A1 (en) * 2020-04-01 2021-10-07 华为技术有限公司 Task scheduling method and apparatus
CN112513814A (en) * 2020-04-01 2021-03-16 华为技术有限公司 Task scheduling method and device
CN112667380A (en) * 2020-12-30 2021-04-16 珠海亿智电子科技有限公司 Multiprocessor task scheduling method, device and storage medium
CN112817728A (en) * 2021-02-20 2021-05-18 咪咕音乐有限公司 Task scheduling method, network device and storage medium
CN112817728B (en) * 2021-02-20 2024-05-24 咪咕音乐有限公司 Task scheduling method, network device and storage medium
CN113312166A (en) * 2021-07-29 2021-08-27 阿里云计算有限公司 Resource processing method and device
CN113641482A (en) * 2021-08-31 2021-11-12 联通(广东)产业互联网有限公司 AI algorithm off-line scheduling method, system, computer equipment and storage medium
CN113641482B (en) * 2021-08-31 2024-03-22 联通(广东)产业互联网有限公司 AI algorithm offline scheduling method, system, computer equipment and storage medium
CN117707738A (en) * 2024-01-10 2024-03-15 苏州市欧冶半导体有限公司 Task processing method, system, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106897132A (en) The method and device of a kind of server task scheduling
CN104580396B (en) A kind of method for scheduling task, node and system
Sharma et al. Performance analysis of load balancing algorithms
CN106293950B (en) A kind of resource optimization management method towards group system
CN111078363B (en) NUMA node scheduling method, device, equipment and medium of virtual machine
CN110113387A (en) A kind of processing method based on distributed batch processing system, apparatus and system
CN112272203B (en) Cluster service node selection method, system, terminal and storage medium
CN111796908B (en) System and method for automatic elastic expansion and contraction of resources and cloud platform
JP2011501268A (en) Hierarchical reserved resource scheduling infrastructure
CN102282543A (en) Information processing device and information processing method
Tantalaki et al. Pipeline-based linear scheduling of big data streams in the cloud
CN111104227B (en) Resource control method and device of K8s platform and related components
CN104239154B (en) Job scheduling method and job scheduler in a kind of Hadoop clusters
US8352950B2 (en) Algorithm to share physical processors to maximize processor cache usage and topologies
CN113032102B (en) Resource rescheduling method, device, equipment and medium
CN108376103A (en) A kind of the equilibrium of stock control method and server of cloud platform
Biswas et al. An auto-scaling framework for controlling enterprise resources on clouds
CN109151070A (en) Service scheduling method, the electronic device of point-to-point CDN based on block chain
CN113467933A (en) Thread pool optimization method, system, terminal and storage medium for distributed file system
CN111159859B (en) Cloud container cluster deployment method and system
CN113672391A (en) Parallel computing task scheduling method and system based on Kubernetes
Yazdanov et al. EHadoop: Network I/O aware scheduler for elastic MapReduce cluster
US10108351B2 (en) Reallocate memory pending queue based on stall
CN109086128B (en) Task scheduling method and device
Carrega et al. Energy-aware consolidation scheme for data center cloud applications

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170627