CN103902364A - Physical resource management method and device and intelligent terminal - Google Patents

Physical resource management method and device and intelligent terminal Download PDF

Info

Publication number
CN103902364A
CN103902364A CN201210571761.3A CN201210571761A CN103902364A CN 103902364 A CN103902364 A CN 103902364A CN 201210571761 A CN201210571761 A CN 201210571761A CN 103902364 A CN103902364 A CN 103902364A
Authority
CN
China
Prior art keywords
resource
task
described task
ultimate value
use amount
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
CN201210571761.3A
Other languages
Chinese (zh)
Other versions
CN103902364B (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.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201210571761.3A priority Critical patent/CN103902364B/en
Publication of CN103902364A publication Critical patent/CN103902364A/en
Application granted granted Critical
Publication of CN103902364B publication Critical patent/CN103902364B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a physical resource management method and device and an intelligent terminal. The method includes the steps that the total resource usage amount of physical resources occupied by a control group is detected, wherein the physical resources include any type of memory resources, CPU resources, disk storage resources and network bandwidth resources; when the total resource usage amount is larger than a preset first resource limit value, the resource usage amount of physical resources occupied by tasks of the control group is detected; the resource usage amount of the tasks is compared with a preset second resource limit value, and if a comparison result meets an interruption condition, the tasks are interrupted and the resources occupied by the tasks are released. By means of the method, the physical resources can be flexibly interrupted so as to carry out corresponding task isolation or removal operations, and therefore the utilization ratio of the physical resources is effectively improved.

Description

A kind of physical resource management method, device and intelligent terminal
Technical field
The present invention relates to physical resource management technical field, relate in particular to a kind of physical resource management method, device and intelligent terminal.
Background technology
A group of planes (cluster) system is the set of interconnected multiple independent physical machine of calculating, and these physical machine can be PC, workstation or SMP (Symmetrical Multi-Processing, symmetrical multiprocessing) etc.A group of planes is a single system for outside, and it can provide the service of high performance calculation process environment and fast and reliable.
In the dispatching system of group of planes resource, need to carry out the resource of different task task in each physical machine is distributed and isolation at present.Task task is before operation, meeting is the system application physical resource to physical machine according to its default resource requirement, so that being this task task, system distribute suitable physical resource to move this task task, the resource isolation mode to task task wherein comprises Linux container mode, and specific implementation is:
Physical resource to task task arranges ultimate value, when the resource using in operational process as a certain task task exceedes this ultimate value, this task task can be removed immediately, what it was shared can be released such as internal memory, cpu resource, or the resource using in operational process as a certain task task also can continue operation while exceeding this ultimate value, only, in the time of internal memory, the CPU etc. of physical machine system inadequate resource, just carry out removing of this task task operated or isolated operation.
The problem of above-mentioned two kinds of implementations is: if resource value of overstepping the extreme limit that task task uses in operational process is removed, can require so like this user in the time that the ultimate value of task task is set, the maximum memory amount that need to use according to this task task is set, and this just likely causes the waste to physical resources such as internal memories; And another kind of mode easily causes Installed System Memory to exhaust the generation of the situations such as OOM, while making task task operation, uncertainty increases, and can affect the efficiency of task task.
Summary of the invention
Embodiment of the present invention technical matters to be solved is, a kind of physical resource management method, device and intelligent terminal are provided, and can carry out neatly the interruption of physical resource, to carry out corresponding task isolation or to remove operation.
In order to solve the problems of the technologies described above, the embodiment of the present invention provides a kind of physical resource management method, comprising:
Detect and control the total resources use amount of group to physical resource, described physical resource comprises any in memory source, central processor CPU resource, disk storage resource, network bandwidth resources;
In the time that described total resources use amount is greater than preset first resource ultimate value, detect the described resource use amount of controlling the physical resource of included task in group;
By the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task.
Wherein, described by the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task, comprising:
By the resource use amount of described task with compare for its preset Secondary resource ultimate value;
If the resource use amount of described task exceedes for its preset Secondary resource ultimate value, further judge the interrupt priority level of described task;
If the interrupt priority level of described task is high, determine that described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
Wherein, judge the interrupt priority level of described task, comprising: according to described task, the requirement of real-time is determined to interrupt priority level.
Wherein, described by the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task, comprising:
By the resource use amount of described task with compare for its preset Secondary resource ultimate value;
If the resource use amount of described task is greater than for its preset Secondary resource ultimate value, further judge whether the resource use amount of described task is greater than the resource that described task is applied for;
If be greater than, determine that described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
Wherein, described by the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task, comprising:
By the resource use amount of described task with compare for its preset Secondary resource ultimate value;
If the resource use amount of described task is greater than for its preset Secondary resource ultimate value, the resource that definite described task is used exceedes the amount of exceeding of Secondary resource ultimate value;
If the amount of exceeding of described task is greater than default exceeding threshold value or the amount of exceeding and the ratio of Secondary resource ultimate value are greater than to default ratio threshold value, described definite described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
Wherein, described detection control group, to before the total resources use amount of physical resource, also comprises:
For the preset first resource ultimate value of described control group, and the preset Secondary resource ultimate value of each task comprising for described control group, wherein, described Secondary resource ultimate value and be less than described first resource ultimate value.
Correspondingly, the embodiment of the present invention also provides a kind of physical resource management device, comprising:
Detection module, for detection of controlling the total resources use amount of group to physical resource, and in the time that described total resources use amount is greater than preset first resource ultimate value, detects the described resource use amount of controlling the physical resource of included task in group; Described physical resource comprises any in memory source, central processor CPU resource, disk storage resource, network bandwidth resources;
Processing module, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task.
Wherein, described processing module comprises:
The first comparing unit, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value;
The first judging unit, if exceed for its preset Secondary resource ultimate value for the resource use amount of described task, further judges the interrupt priority level of described task;
The first processing unit, if be high for the interrupt priority level of described task, determines that described task meets preset interrupt condition, interrupts described task, discharges the shared resource of described task.
Wherein, described the first judging unit is specifically for determining interrupt priority level according to described task to the requirement of real-time.
Wherein, described processing module comprises:
The second comparing unit, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value;
The second judging unit, if be greater than for its preset Secondary resource ultimate value for the resource use amount of described task, further judges whether the resource that described task is used is greater than the resource that described task is applied for;
The second processing unit, if for being greater than, determines that described task meets preset interrupt condition, interrupts described task, discharges the shared resource of described task.
Wherein, described processing module comprises:
The 3rd comparing unit, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value;
The 3rd judging unit, if be greater than for its preset Secondary resource ultimate value for the resource use amount of described task, the resource that definite described task is used exceedes the amount of exceeding of Secondary resource ultimate value;
The 3rd processing unit, if be greater than default exceeding threshold value or the amount of exceeding and the ratio of Secondary resource ultimate value are greater than to default ratio threshold value for the amount of exceeding of described task, described definite described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
Wherein, also comprise: preset module, is used to the preset first resource ultimate value of described control group, and is the described preset Secondary resource ultimate value of each task that group comprises of controlling, wherein, described Secondary resource ultimate value and be less than described first resource ultimate value.
Correspondingly, the embodiment of the present invention also provides a kind of intelligent terminal, comprises above-mentioned physical resource management device.
Implement the embodiment of the present invention, there is following beneficial effect:
By the first ultimate value that its resource use amount can not exceed being set for controlling group, and be to control task setting under group the second ultimate value exceeding of can having ready conditions, can more efficiently guarantee that some uses the large or user of undulate quantity to estimate that to the resource use amount of task task on the low side can normally move to resource, also can guarantee the problem that system can not cause system resource anxiety even to be collapsed because the total resource use amount of control group exceeds standard, effectively improve physical resource utilization factor.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the schematic flow sheet of a kind of physical resource management method of the embodiment of the present invention;
Fig. 2 is wherein a kind of schematic flow sheet of the judgement of interrupting and the processing of the embodiment of the present invention;
Fig. 3 is the wherein another kind of schematic flow sheet of the judgement of interrupting and the processing of the embodiment of the present invention;
Fig. 4 is wherein another schematic flow sheet of the judgement of interrupting and the processing of the embodiment of the present invention;
Fig. 5 is the structure composition schematic diagram of a kind of physical resource management device of the embodiment of the present invention;
Fig. 6 is the structure composition schematic diagram of the another kind of physical resource management device of the embodiment of the present invention;
Fig. 7 is wherein a kind of concrete structure schematic diagram of the processing module in Fig. 6;
Fig. 8 is wherein another concrete structure schematic diagram of the processing module in Fig. 6;
Fig. 9 is wherein another concrete structural scheme of mechanism of the processing module in Fig. 6.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Referring to Fig. 1, is the schematic flow sheet of a kind of physical resource management method of the embodiment of the present invention; The method can be applied in the group of planes resource scheduling system of single physical machine or cloud computing platform, realize comprising any the scheduling of physical resource in memory source, central processor CPU resource, disk storage resource, network bandwidth resources, concrete, described method comprises:
S101: detect and control the total resources use amount of group to physical resource, described physical resource comprises any in memory source, central processor CPU resource, disk storage resource, network bandwidth resources.
Control the cgroup of group (control group) and comprise one group of dividing according to certain standard of task task, in physical machine, any one task task can join in the control group of existing standard, also a task task can be moved to the cgroup of control group of another respective standard.In the embodiment of the present invention, the resource control of controlling the cgroup of group is first arranged to first resource ultimate value take the whole control cgroup of group as unit, then each the task task controlling under group is arranged to the second ultimate value.In the time that the whole total resources use amount of controlling group exceedes first resource ultimate value, carry out immediately corresponding interrupt operation, carry out corresponding judgement according to resource service condition and the second ultimate value of controlling each task task in group again, with isolation or remove the task task that some satisfies condition, and while not exceeding first resource ultimate value, even if control the second ultimate value that some the task task in group exceedes, do not do to interrupt judgement, do not isolate or remove processing.
Before described S101, can also comprise: be the preset first resource ultimate value of described control group, and the preset Secondary resource ultimate value of each task comprising for described control group, wherein, described Secondary resource ultimate value and be less than described first resource ultimate value.
S102: in the time that described total resources use amount is greater than preset first resource ultimate value, detect the described resource use amount of controlling the physical resource of included task in group.
Resource use amount in total resources use amount and S102 in described S101 can adopt such as the obtain manner of task manager and detect and obtain corresponding numerical value.
S103: by the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task.
In the time judging that a certain task task can interrupt, can directly remove this task, or adopt the mode of temporary transient isolation to isolate described task, so that in the time detecting that controlling group is less than the 3rd ultimate value to the total resources use amount of physical resource, from isolated area, recover described task, and continue the described task of operation, described the 3rd ultimate value is the bottom line value that user rule of thumb arranges, so that make full use of physical resource, avoid the wasting of resources.
In above-mentioned S102-S103, can detect and compare operation controlling each included task in group respectively simultaneously, also can start the order of the time of processing according to task each task is detected and compare operation.In S103 by the tasks interrupt that meets interrupt condition wherein so that remove or isolate, and for the task of not meeting interrupt condition, allow it to continue to carry out.
Further concrete, refer to Fig. 2, be wherein a kind of method flow schematic diagram of the judgement of interrupting and the processing of the embodiment of the present invention; The judgement of described terminal and the method for processing specifically comprise:
S1011: by the resource use amount of described task with compare for its preset Secondary resource ultimate value.Comprise the comparison of carrying out numerical value, specifically can adopt subtraction mode to compare.
S1012: if the resource use amount of described task exceedes for its preset Secondary resource ultimate value, further judge the interrupt priority level of described task.
Described interrupt priority level can judge according to the effect of this task definite, specifically can determine interrupt priority level to the requirement of real-time according to described task, if higher to requirement of real-time, interrupt priority level is low, otherwise, be height.For example, if this task is the audio frequency and video Processing tasks about video conference, the requirement of real-time that can determine this audio frequency and video Processing tasks is high, its interrupt priority level is low so, and for the document transmission processing task of some point-to-points, lower to requirement of real-time, interrupt priority level is high, can preferentially interrupt so that remove or isolate.
S1013: if the interrupt priority level of described task is high, determine that described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
In have no progeny, specifically can directly remove this task, discharge corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium.Or isolate this task, first discharge corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium, then controlling group when lower to the total resources use amount of physical resource, then this task is recovered from isolated area, to proceed this task.
Referring to Fig. 3, is the wherein another kind of schematic flow sheet of the judgement of interrupting and the processing of the embodiment of the present invention again; The judgement of described terminal and the method for processing specifically comprise:
S1021: by the resource use amount of described task with compare for its preset Secondary resource ultimate value.Comprise the comparison of carrying out numerical value, specifically can adopt subtraction mode to compare.
S1022: if the resource use amount of described task is greater than for its preset Secondary resource ultimate value, further judge whether the resource use amount of described task is greater than the resource that described task is applied for.
Any one task, before processing, need to be applied for the physical resource such as internal memory, CPU, storage of respective amount, so that can distribute the physical resource of respective amount to this task.If the resource use amount of described task has not only exceeded for the preset Secondary resource ultimate value of this task, and its resource use amount is while being greater than the resource that described task applies for, carries out interrupt operation.Otherwise, wouldn't carry out the interrupt operation to this task.
S1023: if be greater than, determine that described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
In have no progeny, specifically can directly remove this task, discharge corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium.Or isolate this task, first discharge corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium, then controlling group when lower to the total resources use amount of physical resource, then this task is recovered from isolated area, to proceed this task.
Fig. 4 is wherein another schematic flow sheet of the judgement of interrupting and the processing of the embodiment of the present invention;
S1031: by the resource use amount of described task with compare for its preset Secondary resource ultimate value.Comprise the comparison of carrying out numerical value, specifically can adopt subtraction mode to compare.
S1032: if the resource use amount of described task is greater than for its preset Secondary resource ultimate value, the resource that definite described task is used exceedes the amount of exceeding of Secondary resource ultimate value.Can by subtraction ask absolute value mode determine described in the amount of exceeding.
S1033: if the amount of exceeding of described task is greater than default exceeding threshold value or the amount of exceeding and the ratio of Secondary resource ultimate value are greater than to default ratio threshold value, described definite described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
In have no progeny, specifically can directly remove this task, discharge corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium.Or isolate this task, first discharge corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium, then controlling group when lower to the total resources use amount of physical resource, then this task is recovered from isolated area, to proceed this task.
Description by above-described embodiment is known, the concrete following advantage of the present invention:
By the first ultimate value that its resource use amount can not exceed being set for controlling group, and be to control task setting under group the second ultimate value exceeding of can having ready conditions, can more efficiently guarantee that some uses the large or user of undulate quantity to estimate that to the resource use amount of task task on the low side can normally move to resource, also can guarantee the problem that system can not cause system resource anxiety even to be collapsed because the total resource use amount of control group exceeds standard, effectively improve physical resource utilization factor.
Below the device of the embodiment of the present invention is elaborated.
Referring to Fig. 5, is the structure composition schematic diagram of a kind of physical resource management device of the embodiment of the present invention; The described physical resource management device of the embodiment of the present invention can be arranged on the group of planes resource scheduling system for the physical machine to single or cloud computing platform, or be set directly in all kinds of intelligent terminals, to complete any the management of physical resource comprising in memory source, central processor CPU resource, disk storage resource, network bandwidth resources, described device specifically comprises:
Detection module 1, for detection of controlling the total resources use amount of group to physical resource, and in the time that described total resources use amount is greater than preset first resource ultimate value, detects the described resource use amount of controlling the physical resource of included task in group; Described physical resource comprises any in memory source, central processor CPU resource, disk storage resource, network bandwidth resources;
Processing module 2, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task.
Control the cgroup of group and comprise one group of dividing according to certain standard of task task, in physical machine, any one task task can join in the control group of existing standard, also a task task can be moved to the cgroup of control group of another respective standard.In the embodiment of the present invention, the resource control of controlling the cgroup of group is first arranged to first resource ultimate value take the whole control cgroup of group as unit, then each the task task controlling under group is arranged to the second ultimate value.In the time that described detection module 1 detects that the whole total resources use amount of controlling group exceedes first resource ultimate value, carry out immediately corresponding interrupt operation by described processing module 2, be that processing module 2 is carried out corresponding judgement according to resource service condition and the second ultimate value of controlling each task task in group again, with isolation or remove the task task that some satisfies condition, and while not exceeding first resource ultimate value, even if control the second ultimate value that some the task task in group exceedes, do not do to interrupt judgement, do not isolate or remove processing.
The total resources use amount that described detection module 1 detects and resource use amount can adopt such as the obtain manner of task manager and detect and obtain corresponding numerical value.
In the time that described processing module 2 judges that a certain task task can interrupt, can directly remove this task, or adopt the mode of temporary transient isolation to isolate described task, so that in the time detecting that controlling group is less than the 3rd ultimate value to the total resources use amount of physical resource, from isolated area, recover described task, and continue the described task of operation, described the 3rd ultimate value is the bottom line value that user rule of thumb arranges, so that make full use of physical resource, avoid the wasting of resources.
Described physical resource management device can detect and compare operation controlling each included task in group respectively by described detection module 1 and processing module 2 simultaneously, also can start the order of the time of processing according to task each task is detected and compare operation.Described processing module 2 so that remove or isolate, and for the task of not meeting interrupt condition, allows it to continue to carry out the tasks interrupt that meets interrupt condition wherein.
Description by above-described embodiment is known, and the present invention has the following advantages:
By the first ultimate value that its resource use amount can not exceed being set for controlling group, and be to control task setting under group the second ultimate value exceeding of can having ready conditions, can more efficiently guarantee that some uses the large or user of undulate quantity to estimate that to the resource use amount of task task on the low side can normally move to resource, also can guarantee the problem that system can not cause system resource anxiety even to be collapsed because the total resource use amount of control group exceeds standard, effectively improve physical resource utilization factor.
Fig. 6 is the structure composition schematic diagram of the another kind of physical resource management device of the embodiment of the present invention; The described physical resource management device of the embodiment of the present invention can be arranged on the group of planes resource scheduling system for the physical machine to single or cloud computing platform, or be set directly in all kinds of intelligent terminals, to complete any the management of physical resource comprising in memory source, central processor CPU resource, disk storage resource, network bandwidth resources, described device specifically comprises detection module 1 and the processing module 2 in above-described embodiment, in embodiments of the present invention, described device also comprises:
Preset module 3, is used to the preset first resource ultimate value of described control group, and the preset Secondary resource ultimate value of each task comprising for described control group, wherein, described Secondary resource ultimate value and be less than described first resource ultimate value.
Further concrete, then refer to Fig. 7, be wherein a kind of concrete structure schematic diagram of the processing module in Fig. 6, in embodiments of the present invention, described processing module 2 specifically can comprise:
The first comparing unit 21, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value;
The first judging unit 22, if exceed for its preset Secondary resource ultimate value for the resource use amount of described task, further judges the interrupt priority level of described task;
The first processing unit 23, if be high for the interrupt priority level of described task, determines that described task meets preset interrupt condition, interrupts described task, discharges the shared resource of described task.
Described the first comparing unit 21 can compare for the more specific subtraction mode that can adopt of actual figure value.Described the first judging unit 22 is specifically for determining interrupt priority level according to described task to the requirement of real-time, described interrupt priority level can judge and determine according to the effect of this task, specifically can determine interrupt priority level to the requirement of real-time according to described task, if higher to requirement of real-time, interrupt priority level is low, otherwise, be height.For example, if this task is the audio frequency and video Processing tasks about video conference, the requirement of real-time that can determine this audio frequency and video Processing tasks is high, its interrupt priority level is low so, and for the document transmission processing task of some point-to-points, lower to requirement of real-time, interrupt priority level is high, can preferentially interrupt so that remove or isolate.
In have no progeny, described the first processing unit 23 specifically can directly remove this task, discharges corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium.Or described first processing unit 23 these tasks of isolation, first discharge corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium, then controlling group when lower to the total resources use amount of physical resource, again this task is recovered from isolated area, to proceed this task.
Further concrete, then refer to Fig. 8, be wherein another concrete structure schematic diagram of the processing module in Fig. 6, in embodiments of the present invention, described processing module 2 can comprise:
The second comparing unit 24, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value;
The second judging unit 25, if be greater than for its preset Secondary resource ultimate value for the resource use amount of described task, further judges whether the resource that described task is used is greater than the resource that described task is applied for;
The second processing unit 26, if for being greater than, determines that described task meets preset interrupt condition, interrupts described task, discharges the shared resource of described task.
Described the second comparing unit 24 comprises that specifically for carrying out the more specific subtraction mode that can adopt of carrying out numerical value compares.
Any one task, before processing, need to be applied for the physical resource such as internal memory, CPU, storage of respective amount, so that can distribute the physical resource of respective amount to this task.If described the second judging unit 25 judges that the resource use amount of described task has not only exceeded the Secondary resource ultimate value preset as this task, and its resource use amount is while being greater than the resource that described task applies for, carry out interrupt operation by described the second processing unit 26, otherwise, wouldn't carry out the interrupt operation to this task.
In have no progeny, described the second processing unit 26 specifically can directly remove this task, discharges corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium.Or described second processing unit 26 these tasks of isolation, first discharge corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium, then controlling group when lower to the total resources use amount of physical resource, again this task is recovered from isolated area, to proceed this task.
Further concrete, then refer to Fig. 9, be wherein another concrete structural scheme of mechanism of the processing module in Fig. 6.Described processing module 2 can also comprise:
The 3rd comparing unit 27, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value;
The 3rd judging unit 28, if be greater than for its preset Secondary resource ultimate value for the resource use amount of described task, the resource that definite described task is used exceedes the amount of exceeding of Secondary resource ultimate value;
The 3rd processing unit 29, if be greater than default exceeding threshold value or the amount of exceeding and the ratio of Secondary resource ultimate value are greater than to default ratio threshold value for the amount of exceeding of described task, described definite described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
Described the 3rd comparing unit 27 comprises that specifically for carrying out the more specific subtraction mode that can adopt of carrying out numerical value compares.Described the 3rd judging unit 28 can by subtraction ask absolute value mode determine described in the amount of exceeding.
In have no progeny, described the 3rd processing unit 29 specifically can directly remove this task, discharges corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium.Or described the 3rd processing unit 29 these tasks of isolation, first discharge corresponding memory source, central processor CPU resource, disk storage resource, network bandwidth resources medium, then controlling group when lower to the total resources use amount of physical resource, again this task is recovered from isolated area, to proceed this task.
It should be noted that, the described processing module 2 of the present embodiment specifically can comprise in above-mentioned three kinds simultaneously specifically can arrange any or multiple combination according to user's needs, so that complete the operations such as corresponding comparison, judgement and interruption.
Description by above-described embodiment is known, and the present invention has the following advantages:
By the first ultimate value that its resource use amount can not exceed being set for controlling group, and be to control task setting under group the second ultimate value exceeding of can having ready conditions, can more efficiently guarantee that some uses the large or user of undulate quantity to estimate that to the resource use amount of task task on the low side can normally move to resource, also can guarantee the problem that system can not cause system resource anxiety even to be collapsed because the total resource use amount of control group exceeds standard, effectively improve physical resource utilization factor.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, can carry out the hardware that instruction is relevant by computer program to complete, described program can be stored in a computer read/write memory medium, this program, in the time carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosed is only preferred embodiment of the present invention, certainly can not limit with this interest field of the present invention, and the equivalent variations of therefore doing according to the claims in the present invention, still belongs to the scope that the present invention is contained.

Claims (13)

1. a physical resource management method, is characterized in that, comprising:
Detect and control the total resources use amount of group to physical resource, described physical resource comprises any in memory source, central processor CPU resource, disk storage resource, network bandwidth resources;
In the time that described total resources use amount is greater than preset first resource ultimate value, detect the described resource use amount of controlling the physical resource of included task in group;
By the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task.
2. the method for claim 1, is characterized in that, described by the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task, comprising:
By the resource use amount of described task with compare for its preset Secondary resource ultimate value;
If the resource use amount of described task exceedes for its preset Secondary resource ultimate value, further judge the interrupt priority level of described task;
If the interrupt priority level of described task is high, determine that described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
3. method as claimed in claim 2, is characterized in that, judges the interrupt priority level of described task, comprising:
According to described task, the requirement of real-time is determined to interrupt priority level.
4. the method for claim 1, is characterized in that, described by the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task, comprising:
By the resource use amount of described task with compare for its preset Secondary resource ultimate value;
If the resource use amount of described task is greater than for its preset Secondary resource ultimate value, further judge whether the resource use amount of described task is greater than the resource that described task is applied for;
If be greater than, determine that described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
5. the method for claim 1, is characterized in that, described by the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task, comprising:
By the resource use amount of described task with compare for its preset Secondary resource ultimate value;
If the resource use amount of described task is greater than for its preset Secondary resource ultimate value, the resource that definite described task is used exceedes the amount of exceeding of Secondary resource ultimate value;
If the amount of exceeding of described task is greater than default exceeding threshold value or the amount of exceeding and the ratio of Secondary resource ultimate value are greater than to default ratio threshold value, described definite described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
6. the method as described in claim 1-5 any one, is characterized in that, described detection control group, to before the total resources use amount of physical resource, also comprises:
For the preset first resource ultimate value of described control group, and the preset Secondary resource ultimate value of each task comprising for described control group, wherein, described Secondary resource ultimate value and be less than described first resource ultimate value.
7. a physical resource management device, is characterized in that, comprising:
Detection module, for detection of controlling the total resources use amount of group to physical resource, and in the time that described total resources use amount is greater than preset first resource ultimate value, detects the described resource use amount of controlling the physical resource of included task in group; Described physical resource comprises any in memory source, central processor CPU resource, disk storage resource, network bandwidth resources;
Processing module, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value, if comparative result meets interrupt condition, interrupt described task, discharge the shared resource of described task.
8. device as claimed in claim 7, is characterized in that, described processing module comprises:
The first comparing unit, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value;
The first judging unit, if exceed for its preset Secondary resource ultimate value for the resource use amount of described task, further judges the interrupt priority level of described task;
The first processing unit, if be high for the interrupt priority level of described task, determines that described task meets preset interrupt condition, interrupts described task, discharges the shared resource of described task.
9. device as claimed in claim 8, is characterized in that, described the first judging unit is specifically for determining interrupt priority level according to described task to the requirement of real-time.
10. device as claimed in claim 7, is characterized in that, described processing module comprises:
The second comparing unit, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value;
The second judging unit, if be greater than for its preset Secondary resource ultimate value for the resource use amount of described task, further judges whether the resource that described task is used is greater than the resource that described task is applied for;
The second processing unit, if for being greater than, determines that described task meets preset interrupt condition, interrupts described task, discharges the shared resource of described task.
11. devices as claimed in claim 7, is characterized in that, described processing module comprises:
The 3rd comparing unit, for by the resource use amount of described task with compare for its preset Secondary resource ultimate value;
The 3rd judging unit, if be greater than for its preset Secondary resource ultimate value for the resource use amount of described task, the resource that definite described task is used exceedes the amount of exceeding of Secondary resource ultimate value;
The 3rd processing unit, if be greater than default exceeding threshold value or the amount of exceeding and the ratio of Secondary resource ultimate value are greater than to default ratio threshold value for the amount of exceeding of described task, described definite described task meets preset interrupt condition, interrupt described task, discharge the shared resource of described task.
12. devices as described in claim 7-11 any one, is characterized in that, also comprise:
Preset module, is used to the preset first resource ultimate value of described control group, and the preset Secondary resource ultimate value of each task comprising for described control group, wherein, described Secondary resource ultimate value and be less than described first resource ultimate value.
13. 1 kinds of intelligent terminals, is characterized in that, comprise the physical resource management device as described in claim 7-11 any one.
CN201210571761.3A 2012-12-25 2012-12-25 A kind of physical resource management method, apparatus and intelligent terminal Active CN103902364B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210571761.3A CN103902364B (en) 2012-12-25 2012-12-25 A kind of physical resource management method, apparatus and intelligent terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210571761.3A CN103902364B (en) 2012-12-25 2012-12-25 A kind of physical resource management method, apparatus and intelligent terminal

Publications (2)

Publication Number Publication Date
CN103902364A true CN103902364A (en) 2014-07-02
CN103902364B CN103902364B (en) 2018-10-30

Family

ID=50993703

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210571761.3A Active CN103902364B (en) 2012-12-25 2012-12-25 A kind of physical resource management method, apparatus and intelligent terminal

Country Status (1)

Country Link
CN (1) CN103902364B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105320559A (en) * 2014-07-30 2016-02-10 中国移动通信集团广东有限公司 Scheduling method and device of cloud computing system
CN106161559A (en) * 2015-04-21 2016-11-23 阿尔卡特朗讯 Method and device for the distribution of distributed storage network system shared resource
WO2017080276A1 (en) * 2015-11-09 2017-05-18 深圳市万普拉斯科技有限公司 Resource management method and system, and computer storage medium
WO2017080273A1 (en) * 2015-11-09 2017-05-18 深圳市万普拉斯科技有限公司 Task management methods and system, and computer storage medium
CN106776041A (en) * 2016-12-30 2017-05-31 广东欧珀移动通信有限公司 A kind of data processing method and device
CN106951321A (en) * 2017-02-13 2017-07-14 深信服科技股份有限公司 The management method and device of CPU resources of virtual machine
CN109582442A (en) * 2018-11-30 2019-04-05 北京微播视界科技有限公司 Processing method, electronic equipment and the computer storage medium of memory spilling OOM
CN110888675A (en) * 2018-09-11 2020-03-17 深圳云天励飞技术有限公司 Hardware system and electronic device
CN112948075A (en) * 2021-02-04 2021-06-11 北京淇瑀信息科技有限公司 Task congestion processing method and device and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110055370A1 (en) * 2009-08-25 2011-03-03 International Business Machines Corporation Dynamically Balancing Resources In A Server Farm
CN102708011A (en) * 2012-05-11 2012-10-03 南京邮电大学 Multistage load estimating method facing task scheduling of cloud computing platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110055370A1 (en) * 2009-08-25 2011-03-03 International Business Machines Corporation Dynamically Balancing Resources In A Server Farm
CN102708011A (en) * 2012-05-11 2012-10-03 南京邮电大学 Multistage load estimating method facing task scheduling of cloud computing platform

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105320559A (en) * 2014-07-30 2016-02-10 中国移动通信集团广东有限公司 Scheduling method and device of cloud computing system
CN105320559B (en) * 2014-07-30 2019-02-19 中国移动通信集团广东有限公司 A kind of dispatching method and device of cloud computing system
CN106161559A (en) * 2015-04-21 2016-11-23 阿尔卡特朗讯 Method and device for the distribution of distributed storage network system shared resource
WO2017080273A1 (en) * 2015-11-09 2017-05-18 深圳市万普拉斯科技有限公司 Task management methods and system, and computer storage medium
WO2017080276A1 (en) * 2015-11-09 2017-05-18 深圳市万普拉斯科技有限公司 Resource management method and system, and computer storage medium
US10467054B2 (en) 2015-11-09 2019-11-05 Oneplus Technology (Shenzhen) Co., Ltd. Resource management method and system, and computer storage medium
US10802877B2 (en) 2015-11-09 2020-10-13 Oneplus Technology (Shenzhen) Co., Ltd. Task management methods and system, and computer storage medium
CN106776041A (en) * 2016-12-30 2017-05-31 广东欧珀移动通信有限公司 A kind of data processing method and device
CN106776041B (en) * 2016-12-30 2020-01-14 Oppo广东移动通信有限公司 Data processing method and device
CN106951321A (en) * 2017-02-13 2017-07-14 深信服科技股份有限公司 The management method and device of CPU resources of virtual machine
CN110888675A (en) * 2018-09-11 2020-03-17 深圳云天励飞技术有限公司 Hardware system and electronic device
CN109582442A (en) * 2018-11-30 2019-04-05 北京微播视界科技有限公司 Processing method, electronic equipment and the computer storage medium of memory spilling OOM
CN112948075A (en) * 2021-02-04 2021-06-11 北京淇瑀信息科技有限公司 Task congestion processing method and device and electronic equipment
CN112948075B (en) * 2021-02-04 2024-02-27 北京淇瑀信息科技有限公司 Task congestion processing method and device and electronic equipment

Also Published As

Publication number Publication date
CN103902364B (en) 2018-10-30

Similar Documents

Publication Publication Date Title
CN103902364A (en) Physical resource management method and device and intelligent terminal
RU2577476C2 (en) Method, apparatus and system for scheduling processor core in multiprocessor core system
CN102027453B (en) System and method for optimizing interrupt processing in virtualized environments
CN102681895B (en) Dynamic self-migrating cloud service method
CN100517237C (en) Virtual machine system and its CPU scheduling method
US20150295970A1 (en) Method and device for augmenting and releasing capacity of computing resources in real-time stream computing system
US20150286492A1 (en) Optimized resource allocation and management in a virtualized computing environment
CN104598426A (en) task scheduling method applied to a heterogeneous multi-core processor system
CN103365726A (en) Resource management method and system facing GPU (Graphic Processing Unit) cluster
CN103210379A (en) Server system, management method and device
CN103473142A (en) Virtual machine transferring method and device under cloud computing operating system
CN103179048A (en) Method and system for changing main machine quality of service (QoS) strategies of cloud data center
CN105321346A (en) Method for utilizing cloud computing basic resource pool to control urban intelligent traffic
CN104539708A (en) Capacity reduction method, device and system for cloud platform resources
CN103559077A (en) Optimized automatic transfer method and system for virtual machines
US20110051734A1 (en) Energy efficient control of data link groups
CN103473115A (en) Virtual machine placing method and device
US20150113167A1 (en) Optimized Consumption of Third-Party Web Services in a Composite Service
CN109324983A (en) A kind of method, storage medium, equipment and the system of automatic cleaning cache file
CN113326097A (en) Virtual machine speed limiting method, device, equipment and computer storage medium
CN104391736A (en) Method for setting up sleep mode of virtual machine and device
CN110618946A (en) Stack memory allocation method, device, equipment and storage medium
CN112291326B (en) Load balancing method, load balancing device, storage medium and electronic equipment
WO2015180111A1 (en) Method, apparatus and device for managing system resource
CN103973811A (en) High-availability cluster management method capable of conducting dynamic migration

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190805

Address after: Shenzhen Futian District City, Guangdong province 518057 Zhenxing Road, SEG Science Park 2 East Room 403

Co-patentee after: Tencent cloud computing (Beijing) limited liability company

Patentee after: Tencent Technology (Shenzhen) Co., Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518057 Zhenxing Road, SEG Science Park 2 East Room 403

Patentee before: Tencent Technology (Shenzhen) Co., Ltd.