CN109189581A - A kind of job scheduling method and device - Google Patents

A kind of job scheduling method and device Download PDF

Info

Publication number
CN109189581A
CN109189581A CN201811102507.2A CN201811102507A CN109189581A CN 109189581 A CN109189581 A CN 109189581A CN 201811102507 A CN201811102507 A CN 201811102507A CN 109189581 A CN109189581 A CN 109189581A
Authority
CN
China
Prior art keywords
virtual machine
overload
idle
target
queue
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.)
Granted
Application number
CN201811102507.2A
Other languages
Chinese (zh)
Other versions
CN109189581B (en
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 CN201811102507.2A priority Critical patent/CN109189581B/en
Publication of CN109189581A publication Critical patent/CN109189581A/en
Application granted granted Critical
Publication of CN109189581B publication Critical patent/CN109189581B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F9/505Allocation 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
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Abstract

The embodiment of the invention discloses a kind of job scheduling method and devices, when occurring overload virtual machine and idle virtual machine in task processes, overload virtual machine in overload virtual machine queue can be requested by the aid in treatment sent to job scheduler, request the job scheduler to distribute idle virtual machine from idle virtual machine queue according to preset rules and the overload virtual machine is assisted to complete remaining operation.In this way, even if during processing task, there is overload phenomenon in partial virtual machine, the remaining operation of idle virtual machine auxiliary overload virtual machine completion that operation is completed can also flexibly, be dynamically dispatched by job scheduler, take full advantage of the resource of virtual machine, the task processing time has been saved, task treatment effeciency has been improved, to improve user experience.

Description

A kind of job scheduling method and device
Technical field
The present invention relates to field of cloud computer technology, more particularly to a kind of job scheduling method and device.
Background technique
Currently, resource (including: network, server, storage, application software and service) platform, can be provided with for user With with convenient and fast all kinds of services, such as cloud computing service platform, need to only put into seldom management work, or and service supplier into The seldom interaction of row, can provide the resource needed for it quickly for user.
And resource platform as such as cloud computing service platform, generally the resource platform is received by job scheduler To task responded, distributed and retransmitted.Specifically, when resource platform receives task requests, the job scheduler The load capacity (such as: the ability of memory size, processor configuration virtual machine itself) according to current multiple virtual machines is needed, Multiple operations in the task are separately dispensed into each virtual machine to handle.
But when handling the task, some virtual machines can complete assigned operation ahead of time, and some virtual machines by It relatively slowly or breaks down in the speed of processing operation, may cause and overload phenomenon occur (that is, the remaining operation that virtual machine is current It is more than preset threshold that number and the virtual machine, which receive the ratio between total operation number of distribution), thus, it is easy due to the part The overload phenomenon of virtual machine causes the time of resource platform processing task tediously long, inefficiency, or even is unable to complete task Problem.
It would therefore be highly desirable to provide it is a kind of can flexible, method that dynamically operation is scheduled, to improve in terms of such as cloud The resource platforms such as service platform are calculated to the treatment effeciency of task.
Summary of the invention
In order to solve the above-mentioned technical problem, the embodiment of the invention provides a kind of job scheduling method and devices, so that It, can also be flexible by job scheduler, dynamic even if overload phenomenon occurs in partial virtual machine during processing task The idle virtual machine auxiliary overload virtual machine that operation is completed in scheduling completes remaining operation, takes full advantage of the money of virtual machine Source has saved the task processing time, task treatment effeciency has been improved, to improve user experience.
In a first aspect, providing a kind of job scheduling method, comprising:
In response to the aid in treatment request that the target overload virtual machine in overload virtual machine queue is sent, free virtual is obtained Idle virtual machine in fleet column;
According to preset rules, determine that target corresponding with target overload virtual machine is idle from the idle virtual machine Virtual machine, and wake up the target idle virtual machine;
Controlling the target idle virtual machine assists the target overload virtual machine to complete remaining operation.
Optionally, it is described overload virtual machine queue in overload virtual machine according to remaining operation quantity number arranged Sequence;Also, the idle virtual machine in the idle virtual machine queue is ranked up according to the morning and evening of free time;
The preset rules are as follows: idle for overload virtual machine distribution from more to few sequence according to remaining operation quantity The idle virtual machine of time from morning to night.
It optionally, include target overload virtual machine in the aid in treatment request in the overload virtual machine queue The serial number of sequence.
Optionally, described determining corresponding with target overload virtual machine from the idle virtual machine according to preset rules Target idle virtual machine, comprising:
Aid in treatment request is parsed, the of the target overload virtual machine in the overload virtual machine queue is obtained One serial number;
The idle virtual machine that the first serial number described in serial number is searched from idle virtual machine queue, it is idle to be denoted as the target Virtual machine.
Optionally, the control target idle virtual machine assists the target overload virtual machine to complete remaining operation, Include:
The target is distributed into first of preset ratio in the remaining operation of target overload virtual machine remaining operation Idle virtual machine is handled;Wherein, the remaining operation includes the described first remaining operation and the second remaining operation;
Control the remaining operation of the target overload virtual machine processing described second.
Optionally, after waking up the target idle virtual machine, further includes:
The target idle virtual machine is rejected from the idle virtual machine queue, and updates the free virtual fleet Column.
Optionally, responding the condition that the aid in treatment is requested includes: the free virtual in the idle virtual machine queue Machine quantity is not less than the overload virtual machine quantity in the overload virtual machine queue.
Second aspect additionally provides a kind of job scheduling device, comprising:
Acquiring unit, the aid in treatment for sending in response to the target overload virtual machine in overload virtual machine queue are asked It asks, obtains the idle virtual machine in idle virtual machine queue;
Determination unit, for according to preset rules, the determining and target to overload virtual machine from the idle virtual machine Corresponding target idle virtual machine, and wake up the target idle virtual machine;
Control unit assists the target overload virtual machine to complete remaining make for controlling the target idle virtual machine Industry.
Optionally, it is described overload virtual machine queue in overload virtual machine according to remaining operation quantity number arranged Sequence;Also, the idle virtual machine in the idle virtual machine queue is ranked up according to the morning and evening of free time;
The preset rules are as follows: idle for overload virtual machine distribution from more to few sequence according to remaining operation quantity The idle virtual machine of time from morning to night.
It optionally, include target overload virtual machine in the aid in treatment request in the overload virtual machine queue The serial number of sequence.
Optionally, the determination unit, comprising:
Parsing subunit obtains the target overload virtual machine in the overload for parsing the aid in treatment request The first serial number in virtual machine queue;
Subelement is searched, for searching the idle virtual machine of the first serial number described in serial number from idle virtual machine queue, It is denoted as the target idle virtual machine.
Optionally, described control unit, comprising:
Subelement is distributed, the first of preset ratio the remaining operation in the remaining operation for the target to be overloaded to virtual machine The target idle virtual machine is distributed to be handled;Wherein, the remaining operation includes the described first remaining operation and second Remaining operation;
Subelement is controlled, for controlling the remaining operation of the target overload virtual machine processing described second.
Optionally, after waking up the target idle virtual machine, further includes:
Updating unit for rejecting the target idle virtual machine from the idle virtual machine queue, and updates institute State idle virtual machine queue.
Optionally, responding the condition that the aid in treatment is requested includes: the free virtual in the idle virtual machine queue Machine quantity is not less than the overload virtual machine quantity in the overload virtual machine queue.
In embodiments of the present invention, when occurring overload virtual machine and idle virtual machine in task processes, overload Overload virtual machine in virtual machine queue can be requested by the aid in treatment sent to job scheduler, request the job scheduling Device distributes idle virtual machine from idle virtual machine queue according to preset rules and the overload virtual machine is assisted to complete remaining operation.This Sample can also be flexible by job scheduler, dynamic even if overload phenomenon occurs in partial virtual machine during processing task The idle virtual machine auxiliary overload virtual machine that operation is completed in the scheduling of state completes remaining operation, takes full advantage of virtual machine Resource has saved the task processing time, task treatment effeciency has been improved, to improve user experience.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations recorded in the present invention Example, for those of ordinary skill in the art, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of job scheduling method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of job scheduling device provided in an embodiment of the present invention.
Specific embodiment
Currently, the resource platform such as cloud computing provides various convenient services for user, so, these resource platforms by Favor to user is rapidly developed.But inventor has found that by taking cloud computing service platform as an example, with Amount amount and user demand are increasing, which is gone up in the form of index, this is just It is required that job scheduler can flexibly be scheduled each operation in the task, to improve task treatment effeciency.
It currently, include multiple virtual machines that can handle operation on cloud computing server platform, when the cloud computing service is flat After platform receives task, multiple operations in the task are assigned on each virtual machine by job scheduler and are handled.But It is that, when handling the task, some virtual machines can complete assigned operation ahead of time, and some virtual machines are due to handling operation Speed it is relatively slow or break down and lead to occur overload phenomenon, then, the virtual machine for completing task ahead of time just needs to wait it His virtual machine especially overloads after virtual machine fulfils assignment, and follow-up work can be just carried out, so that the resource platform be caused to handle The time of task is tediously long, inefficiency, or even the problem of be unable to complete task.
Based on this, in embodiments of the present invention, when occurring overload virtual machine and idle virtual machine in task processes When, overloading the overload virtual machine in virtual machine queue can be requested by the aid in treatment sent to job scheduler, and request should Job scheduler distributes idle virtual machine from idle virtual machine queue according to preset rules and the overload virtual machine is assisted to complete to remain Remaining operation.In this way, even if overload phenomenon occurs in partial virtual machine during processing task, it can also be by job scheduler Flexibly, the idle virtual machine auxiliary overload virtual machine that dynamically operation is completed in scheduling completes remaining operation, makes full use of The resource of virtual machine has saved the task processing time, has improved task treatment effeciency, to improve user experience.
It should be noted that cloud computing service platform is only that the job scheduling method provided in the embodiment of the present invention is applicable in A scene, illustrate to be intended merely to clearly illustrate the embodiment of the present invention with the job scheduling method of cloud computing service platform Implementation, the resource platform that the embodiment of the present invention can be applied to, is not especially limited in the present invention.
With reference to the accompanying drawing, by embodiment come job scheduling method a kind of in the present invention will be described in detail embodiment and device Specific implementation.
It is a kind of flow diagram of job scheduling method provided in an embodiment of the present invention referring to Fig. 1.This method specifically may be used To include:
Step 101, the aid in treatment sent in response to the target overload virtual machine in overload virtual machine queue is requested, and is obtained Idle virtual machine in idle virtual machine queue.
It is understood that overload virtual machine, refers to current untreated remaining operation number and assigned total operation Ratio between number is more than the virtual machine of preset threshold.Wherein, it is rule of thumb or real to can be technical staff for preset threshold Determining fixed threshold is tested, the ratio between the current untreated remaining operation number of virtual machine and assigned total operation number Value is more than the preset threshold, then virtual machine is marked as overload virtual machine, and is added in overload virtual machine queue.
It is understood that overload virtual machine queue, refer to by current time overload virtual robot arm at queue, the team Element in column is current time all overload virtual machines.
Such as: assuming that preset threshold is 50%, virtual machine A assigned total operation number is 10, and should at the T1 moment The untreated remaining operation number of virtual machine A is 7, then, virtual machine A T1 moment untreated remaining operation number with Ratio between assigned total operation number is 70%, has been more than preset threshold 50%, it is empty that virtual machine A is added into overload In quasi- fleet column.
When the T2 moment, the untreated remaining operation number of virtual machine A is 4, then, virtual machine A the T2 moment not Ratio between the remaining operation number of processing and assigned total operation number is 40%, is less than preset threshold 50%, should Virtual machine A is rejected from overload virtual machine queue.
That is, overload virtual machine is not the fixation appellation of virtual machine, but it is virtual according to this under current time What the actual conditions of machine determined.With the variation of the number of the virtual machine residue operation, virtual machine becomes non-from overload virtual machine Virtual machine is overloaded, similarly, which is also dynamic change with the variation of overload virtual machine state.
Idle virtual machine refers to that current time has been completed all operations of job scheduler distribution, is marked as sky Not busy state virtual machine.Idle virtual machine queue refers to the queue being made of the idle virtual machine at current time, the member in the queue Element is current time all idle virtual machines.
In some possible implementations, in order to job scheduler can flexibly, it is orderly to overload virtual machine and sky Not busy virtual machine is dispatched again, and the overload virtual machine in the overload virtual machine queue can be according to the number of remaining operation quantity It is ranked up;Also, the idle virtual machine in idle virtual machine queue can also be ranked up according to the morning and evening of free time.
Such as: assuming that being currently the T1 moment, present overload virtual machine A, overload virtual machine B and overload virtual machine C are untreated Remaining operation number and assigned total operation number between ratio be respectively as follows: 70%, 80% and 60%, then, the mistake Carry the sequence that virtual machine is overloaded in virtual machine queue are as follows: B → A → C;Current idle virtual machine D, idle virtual machine E and free time are empty The free time of quasi- machine F is respectively t1, t2 and t3 (wherein, t2 > t3 > t1), then, it is idle empty in the idle virtual machine queue The sequence of quasi- machine are as follows: F → E → D.
It is understood that aid in treatment is requested, it is to have the overload virtual machine of aid in treatment job requirements (that is, target mistake Carry virtual machine) generate and the request that is sent to job scheduler, be that target overload is virtual for requesting the job scheduler Machine distributes idle virtual machine to assist completing remaining operation.
It, can be with when job scheduler receives the aid in treatment request that target overload virtual machine is sent when specific implementation The idle virtual machine in the queue of current time idle virtual machine is obtained, it is surplus as virtual machine distribution auxiliary completion is overloaded for the target The option of remaining operation.
It should be noted that in order to allow each overload virtual machine that can request its free time for completing remaining task of auxiliary Virtual machine, only the idle virtual machine quantity in idle virtual machine queue are not less than the overload virtual machine in overload virtual machine queue When quantity, job scheduler can just be requested from the received aid in treatment of target overload virtual machine in overload virtual machine queue It makes a response;When the idle virtual machine quantity in idle virtual machine queue is less than the overload virtual machine number in overload virtual machine queue When amount, job scheduler is thought currently can not all distribute the free virtual that auxiliary completes remaining operation for all overload virtual machines Machine, then the job scheduler ignores the aid in treatment request that target overload virtual machine is sent.
It should be noted that job scheduler, can be independently of the resource platform for carrying out for the resource platform The separate server of operation distribution and scheduling is also possible to be used to carry out operation distribution for the resource platform in the resource platform With the virtual machine of scheduling, can also be has other servers that operation distribution and scheduling feature are carried out for the resource platform, Without specifically limiting in the present embodiment.
It is subsequent determining auxiliary mark as it can be seen that getting the idle virtual machine in idle virtual machine queue according to step 101 The target idle virtual machine of overload virtual machine provides data basis.
Step 102, it according to preset rules, is determined from the idle virtual machine corresponding with target overload virtual machine Target idle virtual machine, and wake up the target idle virtual machine.
It is understood that preset rules, refers to and set in advance, overload virtual machine for target and determine that target is idle empty The foundation of quasi- machine.
In some possible implementations, if the overload virtual machine in overload virtual machine queue is according to remaining operation number Amount number be ranked up;Also, the idle virtual machine in idle virtual machine queue is ranked up according to the morning and evening of free time; So, which specifically may is that idle for overload virtual machine distribution from more to few sequence according to remaining operation quantity The idle virtual machine of time from morning to night.
It is understood that the preset rules in the implementation are also referred to as water-filling algorithm, that is, for overload virtual machine queue The most overload virtual machine of middle residue operation distributes free time in idle virtual machine queue earliest idle virtual machine, for overload The free time of free time the latest is empty in the remaining least overload virtual machine distribution idle virtual machine queue of operation in virtual machine queue Quasi- machine.
As an example, it is assumed that preset rules are above-mentioned water-filling algorithm, moreover, in order to can be more accurate, orderly It realizes scheduling, improves the task treatment effeciency of the resource platform to the greatest extent, may include target in aid in treatment request The serial number that overload virtual machine sorts in overload virtual machine queue.
So, determining from the idle virtual machine according to preset rules in step 102 to overload virtual machine with the target Corresponding target idle virtual machine, can specifically include: parsing the aid in treatment request, obtains the target overload virtual machine The first serial number in the overload virtual machine queue;The sky of the first serial number described in serial number is searched from the idle virtual machine Not busy virtual machine is denoted as the target idle virtual machine.
For example, it is assumed that being currently the T1 moment, overload virtual machine queue is according to untreated remaining operation number and is assigned Total operation number between ratio sort from large to small after, comprising: 1- overload virtual machine B, 2- overload virtual machine A and 3- overload Virtual machine C;After idle virtual machine queue is from morning to night sorted according to free time, comprising: 1- idle virtual machine F, 2- is idle empty Quasi- machine E and 3- idle virtual machine D.After job scheduler receives the aid in treatment request that target overload virtual machine B is sent, pass through Aid in treatment request is parsed, the first serial number 2 of target overload virtual machine B is obtained, also, obtains current idle virtual machine Idle virtual machine F, idle virtual machine E and idle virtual machine D in queue;At this point, 3 skies of the job scheduler from the acquisition The idle virtual machine of serial number 2 is searched in not busy virtual machine, i.e. idle virtual machine E determines that idle virtual machine E is that target is idle empty Quasi- machine.
It is understood that target idle virtual machine is currently at idle state, thereby increases and it is possible to just in suspend mode, then, in order to It can quickly put into and complete remaining operation to target overload virtual machine auxiliary, after target idle virtual machine has been determined, also It needs to wake up the target idle virtual machine, that is, wake up the target idle virtual machine for operating status from dormant state.
As an example, virtual machine is overloaded when target idle virtual machine is assigned to corresponding target, and has waken up this After target idle virtual machine, which can enter working condition, then, it is empty to need to update the current free time Quasi- fleet column, that is, the embodiment of the present invention specifically can also include: by the target idle virtual machine from the free virtual fleet It is rejected in column, and updates the idle virtual machine queue.
For example, when determining that target idle virtual machine is idle virtual machine E, and after waking up target idle virtual machine E, may be used also With by idle virtual machine E from idle virtual machine queue: 1- idle virtual machine F, 2- idle virtual machine E and 3- idle virtual machine D Middle rejecting, then, current updated idle virtual machine queue includes: idle virtual machine F and idle virtual machine D.
Step 103, controlling the target idle virtual machine assists the target overload virtual machine to complete remaining operation.
It is understood that in order to target overload virtual machine can accurately and job scheduler for its distribute target empty Not busy virtual machine communication, job scheduler can also get the physical address of target idle virtual machine, and the physical address is sent out Give target overload virtual machine, so as to target overload virtual machine will can need to distribute to the operation of target idle virtual machine by Corresponding target idle virtual machine is sent to according to the physical address.
The target idle virtual machine is controlled when specific implementation, in step 103 assists the target overload virtual machine to complete Remaining operation, can specifically include: by first of preset ratio in the remaining operation of target overload virtual machine the remaining operation distribution It is handled to the target idle virtual machine;Wherein, the remaining operation includes that the described first remaining operation and second are remaining Operation;Control the remaining operation of the target overload virtual machine processing described second.
Wherein, in a kind of situation, which can be technical staff rule of thumb or the determining ratio of experiment;Separately In a kind of situation, which is also possible to the ratio that job scheduler overloads the processing speed setting of virtual machine according to target Example specifically may is that then preset ratio is bigger, when the processing speed of target overload virtual machine is lower to mention to the greatest extent High target idle virtual machine and target overload virtual machine complete the efficiency of remaining operation.
For example, it is assumed that the remaining operation number of target overload virtual machine is 10, and currently processed efficiency is 0, then, it should Preset ratio can be 100%, that is, all (that is, 10) remaining operation will be distributed on target idle virtual machine;When current place It is consistent with the treatment effeciency of target idle virtual machine to manage efficiency, then, which can be 50%, that is, by half (that is, 5 It is a) remaining operation distributes to target idle virtual machine.
As it can be seen that in embodiments of the present invention, when occurring overload virtual machine and idle virtual machine in task processes, Overload virtual machine in overload virtual machine queue can be requested by the aid in treatment sent to job scheduler, request the operation Scheduler distributes idle virtual machine from idle virtual machine queue according to preset rules and the overload virtual machine is assisted to complete remaining make Industry.In this way, even if overload phenomenon occurs in partial virtual machine during processing task, it can also be flexible by job scheduler , the idle virtual machine auxiliary overload virtual machine that operation is completed in dynamic scheduling complete remaining operation, take full advantage of void The resource of quasi- machine has saved the task processing time, task treatment effeciency has been improved, to improve user experience.
In order to keep job scheduling method provided in an embodiment of the present invention clearer, a specific example pair is provided below The embodiment of the present invention is illustrated.
Assuming that cloud computing service platform when executing a certain task by job scheduler be 5 virtual machine n1, n2, n3, After n4 and n5 carries out operation distribution, the operation number in corresponding each virtual machine task queue is 12,16,8,6 and 10.It is false If the time-consuming that each virtual machine handles same item operation is identical, and for each operation in itself job queue, using taking The method of average value handles the duration of each task consuming as virtual machine.Wherein, it is had recorded in idle virtual machine queue Q, Q every The relevant informations such as the free time of a idle virtual machine and physical address.Assuming that virtual machine n1, n2, n3, n4 and n5 are completed alone The time of respective operation is respectively 2 minutes, 3 minutes, 4 minutes, 10 minutes and 20 minutes.Assuming that preset threshold is 50%.Assuming that Preset ratio is 50%.
After 4 minutes, corresponding work is completed in virtual machine n1, n2, n3, then, current idle virtual fleet Q in column specifically: { idle virtual machine n1, idle virtual machine n2, idle virtual machine n3 }.At this point, the operation number that n4 and n5 is completed Mesh is 2, then, the ratio of n4 and n5 residue operation number and total operation number is all larger than 50%, then virtual machine queue P is specific Are as follows: { idle virtual machine n4, idle virtual machine n5 }.
At this point, the free time for finding the processing that fulfils assignment earliest in Q is empty according to water-filling algorithm provided in an embodiment of the present invention Quasi- machine n1 is that the most overload virtual machine n5 auxiliary of remaining operation completes remaining operation;The second order is found in Q to fulfil assignment The idle virtual machine n2 of processing is that the more overload virtual machine n4 auxiliary of remaining operation time completes remaining operation.
Wherein, the idle virtual machine n1 and n2 for needing to determine wake up, and take around 1 minute.
Then, overload virtual machine n5 current residual operation number is (10-2)=8, then, by half therein (that is, 4 It is a) it is assigned as idle virtual machine n1 processing.Idle virtual machine n1 and overload virtual machine n5, which has handled respective 4 operations, to be needed It wants: (20/10) * 4=8 minutes, that is, need 4+1+8=13 minutes altogether.Similarly, virtual machine n4 current residual operation number is overloaded For (6-2)=4, then, half therein (that is, 2) is assigned as idle virtual machine n2 processing.Idle virtual machine n2 and Overload virtual machine n4 has handled respective 2 operation needs: (10/6) * 2=4 minutes, that is, needs 4+1+4=9 minutes altogether.
It is understood that at most passed through 13 minutes using job scheduling method provided in an embodiment of the present invention, it can be complete At this task, is completed alone needed for all operations 20 minutes compared to most slow virtual machine n5 completion, save 35% times The business processing time, to greatly improve the task treatment effeciency of the cloud computing service platform.
Correspondingly, the embodiment of the invention also provides a kind of job scheduling device, as shown in Fig. 2, the device specifically can be with Include:
Acquiring unit 201, the aid in treatment for being sent in response to the target overload virtual machine in overload virtual machine queue Request obtains the idle virtual machine in idle virtual machine queue;
Determination unit 202, for according to preset rules, determining and target overload to be virtual from the idle virtual machine The corresponding target idle virtual machine of machine, and wake up the target idle virtual machine;
Control unit 203 assists the target overload virtual machine to complete residue for controlling the target idle virtual machine Operation.
Optionally, it is described overload virtual machine queue in overload virtual machine according to remaining operation quantity number arranged Sequence;Also, the idle virtual machine in the idle virtual machine queue is ranked up according to the morning and evening of free time;
The preset rules are as follows: idle for overload virtual machine distribution from more to few sequence according to remaining operation quantity The idle virtual machine of time from morning to night.
It optionally, include target overload virtual machine in the aid in treatment request in the overload virtual machine queue The serial number of sequence.
Optionally, the determination unit 202, comprising:
Parsing subunit obtains the target overload virtual machine in the overload for parsing the aid in treatment request The first serial number in virtual machine queue;
Subelement is searched, for searching the idle virtual machine of the first serial number described in serial number from idle virtual machine queue, It is denoted as the target idle virtual machine.
Optionally, described control unit 203, comprising:
Subelement is distributed, the first of preset ratio the remaining operation in the remaining operation for the target to be overloaded to virtual machine The target idle virtual machine is distributed to be handled;Wherein, the remaining operation includes the described first remaining operation and second Remaining operation;
Subelement is controlled, for controlling the remaining operation of the target overload virtual machine processing described second.
Optionally, after waking up the target idle virtual machine, further includes:
Updating unit for rejecting the target idle virtual machine from the idle virtual machine queue, and updates institute State idle virtual machine queue.
Optionally, responding the condition that the aid in treatment is requested includes: the free virtual in the idle virtual machine queue Machine quantity is not less than the overload virtual machine quantity in the overload virtual machine queue.
Foregoing description is a kind of associated description of job scheduling device, wherein specific implementation and the effect reached, It may refer to a kind of description of job scheduling method embodiment shown in FIG. 1, which is not described herein again.
" first " in the titles such as " the first serial number " mentioned in the embodiment of the present invention, " the first remaining operation " is used only to Name mark is done, first sequentially is not represented.The rule is equally applicable to " second " etc..
As seen through the above description of the embodiments, those skilled in the art can be understood that above-mentioned implementation All or part of the steps in example method can add the mode of general hardware platform to realize by software.Based on this understanding, Technical solution of the present invention can be embodied in the form of software products, which can store is situated between in storage In matter, such as read-only memory (English: read-only memory, ROM)/RAM, magnetic disk, CD etc., including some instructions to So that a computer equipment (can be the network communication equipments such as personal computer, server, or router) executes Method described in certain parts of each embodiment of the present invention or embodiment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method Part explanation.The apparatus embodiments described above are merely exemplary, wherein mould as illustrated by the separation member Block may or may not be physically separated, and the component shown as module may or may not be physics Module, it can it is in one place, or may be distributed over multiple network units.It can select according to the actual needs Some or all of the modules therein achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creation Property labour in the case where, it can understand and implement.
The above is only a preferred embodiment of the present invention, it is not intended to limit the scope of the present invention.It should refer to Out, for those skilled in the art, under the premise of not departing from the present invention, can also make several improvements And retouching, these modifications and embellishments should also be considered as the scope of protection of the present invention.

Claims (14)

1. a kind of job scheduling method characterized by comprising
In response to the aid in treatment request that the target overload virtual machine in overload virtual machine queue is sent, free virtual fleet is obtained Idle virtual machine in column;
According to preset rules, target free virtual corresponding with target overload virtual machine is determined from the idle virtual machine Machine, and wake up the target idle virtual machine;
Controlling the target idle virtual machine assists the target overload virtual machine to complete remaining operation.
2. the method according to claim 1, wherein
It is described overload virtual machine queue in overload virtual machine according to remaining operation quantity number be ranked up;Also, it is described Idle virtual machine in idle virtual machine queue is ranked up according to the morning and evening of free time;
The preset rules are as follows: distribute free time from more to few sequence according to remaining operation quantity for the overload virtual machine The idle virtual machine from morning to night.
3. according to the method described in claim 2, it is characterized in that, including that target overload is empty in aid in treatment request The serial number that quasi- machine sorts in the overload virtual machine queue.
4. according to the method described in claim 3, it is characterized in that, described true from the idle virtual machine according to preset rules Fixed target idle virtual machine corresponding with target overload virtual machine, comprising:
The aid in treatment request is parsed, first sequence of the target overload virtual machine in the overload virtual machine queue is obtained Number;
The idle virtual machine that the first serial number described in serial number is searched from idle virtual machine queue, is denoted as the target free virtual Machine.
5. the method according to claim 1, wherein the control target idle virtual machine assists the mesh Mark overload virtual machine completes remaining operation, comprising:
It is idle that the target is distributed into first of preset ratio in the remaining operation of target overload virtual machine remaining operation Virtual machine is handled;Wherein, the remaining operation includes the described first remaining operation and the second remaining operation;
Control the remaining operation of the target overload virtual machine processing described second.
6. the method according to claim 1, wherein after waking up the target idle virtual machine, further includes:
The target idle virtual machine is rejected from the idle virtual machine queue, and updates the idle virtual machine queue.
7. the method according to claim 1, wherein the condition for responding the aid in treatment request includes: described Idle virtual machine quantity in idle virtual machine queue is not less than the overload virtual machine quantity in the overload virtual machine queue.
8. a kind of job scheduling device characterized by comprising
Acquiring unit, the aid in treatment for sending in response to the target overload virtual machine in overload virtual machine queue are requested, are obtained Take the idle virtual machine in idle virtual machine queue;
Determination unit, for being determined from the idle virtual machine corresponding with target overload virtual machine according to preset rules Target idle virtual machine, and wake up the target idle virtual machine;
Control unit assists the target overload virtual machine to complete remaining operation for controlling the target idle virtual machine.
9. device according to claim 8, which is characterized in that
It is described overload virtual machine queue in overload virtual machine according to remaining operation quantity number be ranked up;Also, it is described Idle virtual machine in idle virtual machine queue is ranked up according to the morning and evening of free time;
The preset rules are as follows: distribute free time from more to few sequence according to remaining operation quantity for the overload virtual machine The idle virtual machine from morning to night.
10. device according to claim 9, which is characterized in that include that the target is overloaded in the aid in treatment request The serial number that virtual machine sorts in the overload virtual machine queue.
11. device according to claim 10, which is characterized in that the determination unit, comprising:
It is virtual in the overload to obtain the target overload virtual machine for parsing the aid in treatment request for parsing subunit The first serial number in fleet column;
Subelement is searched, for searching the idle virtual machine of the first serial number described in serial number from idle virtual machine queue, is denoted as The target idle virtual machine.
12. device according to claim 8, which is characterized in that described control unit, comprising:
Subelement is distributed, for distributing first of preset ratio in the remaining operation of target overload virtual machine the remaining operation It is handled to the target idle virtual machine;Wherein, the remaining operation includes that the described first remaining operation and second are remaining Operation;
Subelement is controlled, for controlling the remaining operation of the target overload virtual machine processing described second.
13. device according to claim 8, which is characterized in that after waking up the target idle virtual machine, further includes:
Updating unit for rejecting the target idle virtual machine from the idle virtual machine queue, and updates the sky Not busy virtual machine queue.
14. device according to claim 8, which is characterized in that it includes: described for responding the condition of the aid in treatment request Idle virtual machine quantity in idle virtual machine queue is not less than the overload virtual machine quantity in the overload virtual machine queue.
CN201811102507.2A 2018-09-20 2018-09-20 Job scheduling method and device Active CN109189581B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811102507.2A CN109189581B (en) 2018-09-20 2018-09-20 Job scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811102507.2A CN109189581B (en) 2018-09-20 2018-09-20 Job scheduling method and device

Publications (2)

Publication Number Publication Date
CN109189581A true CN109189581A (en) 2019-01-11
CN109189581B CN109189581B (en) 2021-08-31

Family

ID=64909180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811102507.2A Active CN109189581B (en) 2018-09-20 2018-09-20 Job scheduling method and device

Country Status (1)

Country Link
CN (1) CN109189581B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111930514A (en) * 2020-09-14 2020-11-13 北京英迈琪科技有限公司 Resource optimization allocation method and system
CN115328666A (en) * 2022-10-14 2022-11-11 浪潮电子信息产业股份有限公司 Device scheduling method, system, electronic device and computer readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488098A (en) * 2009-02-13 2009-07-22 华中科技大学 Multi-core computing resource management system based on virtual computing technology
CN102317917A (en) * 2011-06-30 2012-01-11 华为技术有限公司 Hot field virtual machine cpu dispatching method and virtual machine system (vms)
CN102508718A (en) * 2011-11-22 2012-06-20 杭州华三通信技术有限公司 Method and device for balancing load of virtual machine
CN103377092A (en) * 2012-04-12 2013-10-30 韩国电子通信研究院 Two-level resource management method and appratus for dynamic resource management
US20140181816A1 (en) * 2012-12-12 2014-06-26 Vmware, Inc. Methods and apparatus to manage virtual machines
CN104125166A (en) * 2014-07-31 2014-10-29 华为技术有限公司 Queue scheduling method and computing system
CN104239123A (en) * 2014-09-05 2014-12-24 北方工业大学 Campus-cloud-platform-oriented virtual machine management dispatching method and system
US20150286506A1 (en) * 2006-10-27 2015-10-08 Hewlett-Packard Development Company, L.P. Selecting one of plural layouts of virtual machines on physical machines
CN106980532A (en) * 2016-01-18 2017-07-25 西安中兴新软件有限责任公司 A kind of job scheduling method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150286506A1 (en) * 2006-10-27 2015-10-08 Hewlett-Packard Development Company, L.P. Selecting one of plural layouts of virtual machines on physical machines
CN101488098A (en) * 2009-02-13 2009-07-22 华中科技大学 Multi-core computing resource management system based on virtual computing technology
CN102317917A (en) * 2011-06-30 2012-01-11 华为技术有限公司 Hot field virtual machine cpu dispatching method and virtual machine system (vms)
CN102508718A (en) * 2011-11-22 2012-06-20 杭州华三通信技术有限公司 Method and device for balancing load of virtual machine
CN103377092A (en) * 2012-04-12 2013-10-30 韩国电子通信研究院 Two-level resource management method and appratus for dynamic resource management
US20140181816A1 (en) * 2012-12-12 2014-06-26 Vmware, Inc. Methods and apparatus to manage virtual machines
CN104125166A (en) * 2014-07-31 2014-10-29 华为技术有限公司 Queue scheduling method and computing system
CN104239123A (en) * 2014-09-05 2014-12-24 北方工业大学 Campus-cloud-platform-oriented virtual machine management dispatching method and system
CN106980532A (en) * 2016-01-18 2017-07-25 西安中兴新软件有限责任公司 A kind of job scheduling method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张照胜,李蜀瑜: "云计算环境下基于改进粒子群算法的任务调度", 《电子设计工程》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111930514A (en) * 2020-09-14 2020-11-13 北京英迈琪科技有限公司 Resource optimization allocation method and system
CN115328666A (en) * 2022-10-14 2022-11-11 浪潮电子信息产业股份有限公司 Device scheduling method, system, electronic device and computer readable storage medium

Also Published As

Publication number Publication date
CN109189581B (en) 2021-08-31

Similar Documents

Publication Publication Date Title
US8595722B2 (en) Preprovisioning virtual machines based on request frequency and current network configuration
CN106209682B (en) Business scheduling method, device and system
CN107025139A (en) A kind of high-performance calculation Scheduling Framework based on cloud computing
US8671134B2 (en) Method and system for data distribution in high performance computing cluster
CN108572875B (en) Resource allocation method, device and system
CN107291547A (en) A kind of task scheduling processing method, apparatus and system
CN103491024B (en) Job scheduling method and device for streaming data
CN106557369A (en) A kind of management method and system of multithreading
JP2020531967A (en) Distributed system Resource allocation methods, equipment, and systems
TWI747092B (en) Method, equipment and system for resource scheduling and central server thereof
CN103257896B (en) A kind of Max-D job scheduling method under cloud environment
CN108337275A (en) Task distribution method, device and equipment for Distributor
CN104199912B (en) A kind of method and device of task processing
US10606650B2 (en) Methods and nodes for scheduling data processing
CN109478147A (en) Adaptive resource management in distributed computing system
Delavar et al. A synthetic heuristic algorithm for independent task scheduling in cloud systems
CN103503412A (en) Method and device for scheduling resources
US11256547B2 (en) Efficient allocation of cloud computing resources to job requests
CN109189581A (en) A kind of job scheduling method and device
US8924481B2 (en) Apparatus for routing requests
CN105550025B (en) Distributed infrastructure services (IaaS) dispatching method and system
CN115952054A (en) Simulation task resource management method, device, equipment and medium
CN115421920A (en) Task management method and device for financial product, electronic equipment and storage medium
JP2004046372A (en) Distributed system, resource allocation method, program, and recording medium with which resource allocation program is recorded
JP2009087213A (en) Computer reserve capacity calculating device and computer reserve capacity calculating method

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