CN104063283A - Resource-scheduling method for resource manager - Google Patents

Resource-scheduling method for resource manager Download PDF

Info

Publication number
CN104063283A
CN104063283A CN201410254167.0A CN201410254167A CN104063283A CN 104063283 A CN104063283 A CN 104063283A CN 201410254167 A CN201410254167 A CN 201410254167A CN 104063283 A CN104063283 A CN 104063283A
Authority
CN
China
Prior art keywords
resource
resources
cache
resource pool
request
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
CN201410254167.0A
Other languages
Chinese (zh)
Other versions
CN104063283B (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.)
Beijing Haitai Fangyuan High Technology Co Ltd
Original Assignee
Beijing Haitai Fangyuan High 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 Beijing Haitai Fangyuan High Technology Co Ltd filed Critical Beijing Haitai Fangyuan High Technology Co Ltd
Priority to CN201410254167.0A priority Critical patent/CN104063283B/en
Publication of CN104063283A publication Critical patent/CN104063283A/en
Application granted granted Critical
Publication of CN104063283B publication Critical patent/CN104063283B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a resource-scheduling method for a resource manager. The resource-scheduling method comprises the following steps: A. accessing a resource pool to request resources: acquiring the resources if the resources exist in the resource pool; entering into the next step if the resources do not exist in the resource pool; B. accessing a cache resource pool to request the resources; acquiring the resources if the resources exist in the cache resource pool; entering into the next step if the resources do not existe in the cache resource pool; C. judging whether the resource quantity of the resource pool is smaller than a set quantity or not; setting up and acquiring the new resources if the resource quantity of the resource pool is smaller than the set quantity; otherwise, adding the request into a buffer queue if the resource quantity of the resource pool is not smaller than the set quantity; D. judging whether the buffer queue reaches a maximum or not; rejecting the request if the buffer queue reaches the maximum; entering into the next step if the buffer queue does not reach the maximum; E. accessing the cache resource pool through the buffer queue to request the resources; acquiring the resources if the resources exist in the cache resource pool; entering into the next step if the resources do not exist in the cache resource pool; F. judging whether the resource quantity of the cache buffer resource pool is smaller than the set quantity or not; setting up and acquiring the new resources if the resource quantity of the cache buffer resource pool is smaller than the set quantity; otherwise, increasing or decreasing the set quantity of the cache resource pool correspondingly according to the size of the buffer queue and returning to the step E. The method solves the problem existing in the resource-scheduling method of the conventional resource manager.

Description

A kind of resource regulating method of explorer
Technical field
The present invention relates to a kind of resource regulating method of explorer.
Background technology
In the prior art, explorer from fixed the resource pool of boundary value by the mode Gains resources of unlocked resource queue or establishing resource.In the time that resource request is too much, explorer is waited for idling-resource by the mode of thread block or request queue.
There is following problem in above-mentioned prior art:
1. owing to having set the resource pool of fixed edge dividing value, like this, after the idle certain hour of monitored slack resources, can be moved out of resource pool.Now, in the time that the request of resource is exceeded to idling-resource, need establishing resource again, expend thus the more time.
2. used the mode of thread block or request queue, stand-by period imprevision.When occurring in the situation that resource is taken for a long time, can cause any request all to can not get the situation of respective feedback, system is without response.
3. in the time that peak is appearred in the request of resource, can, due to settings such as resource pool boundary sizes, border life span, border time-out times, cause equipment efficiency of usage not high, performance cannot all be brought into play.
4. for having set the resource acquiring method of explorer in cache resources pond, can, according to each critical value of current how many dynamic setting resource pools to resource request, in order to improve equipment efficiency of usage, improve performance.But the cache object of setting up is thus still in current resource pool, and depend on the restriction of current resource pool, use dirigibility poor.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of resource regulating method of explorer, to address the above problem.
The resource regulating method of a kind of explorer provided by the invention, comprises the following steps:
A, access resources pond, acquisition request resource: if there is resource in the resource collection not locking in resource pool, direct Gains resources; Otherwise, enter next step;
B, access cache resource pool, acquisition request resource: if there is resource in the unlocked resource set in cache resources pond, direct Gains resources; Otherwise, enter next step;
C, judge whether the resource quantity in resource pool is less than the setting capacity of resource pool: if be less than, create and obtain new resources; Otherwise, by the request of the current Gains resources buffer queue that joins request;
D, judge request buffer queue whether reach max cap.; If reach max cap., refuse this request, interrupt this resource acquisition; Otherwise, enter next step;
E, by described request buffer queue access cache resource pool, acquisition request resource: if there is resource in the unlocked resource set in cache resources pond, direct Gains resources; Otherwise, enter next step;
F, judge whether the resource quantity in cache resources pond is less than the setting capacity in cache resources pond: if be less than, create and obtain new resources; Otherwise according to the size of described request buffer queue, the setting capacity in corresponding increase and decrease cache resources pond, then returns to above-mentioned steps E.
In above-mentioned method, further comprising the steps of after step F:
G, verify and the validity of used resource effective resource is put back into described resource pool, destroy invalid resource.
In above-mentioned method, while accessing described resource pool, described cache resources pond, therefrom scan free time exceed set peaked resource of time-to-live, these resources are shifted out and are destroyed pond from described resource pool, described cache resources.
As seen from the above, when cannot be from the direct Gains resources of resource pool:
1. first the inventive method considers that access is such as the such cache resources pond of L2 cache resource pool, instead of selects block or add queuing, can avoid thus blocking the system causing without response problem.
2. request buffer queue does not carry out any direct interaction with the resource pool of fixed boundary, and carry out alternately in the cache resources pond that only can dynamically adjust with boundary value.Like this, can as resource pool, not be subject to the restriction of fixed boundary and need to often shift out slack resources, and often re-create resource in the time that request buffer queue is filed a request, shorten thus the resource acquisition time.
3. in the time of each request of access buffer queue, all want the amount of capacity of scan request buffer queue, dynamically to adjust resource time-to-live maximal value in cache resources tankage and cache resources pond according to the real time capacity of request buffer queue.That is to say, according to the increase and decrease of resource request, correspondingly increase/slow down and deposit resource pool capacity or correspondingly subtract/increase resource time-to-live maximal value in cache resources pond, further to reduce taking and consuming device resource.
Brief description of the drawings
Fig. 1 is the process flow diagram of the resource regulating method of explorer provided by the invention.
Embodiment
First, hand over the false code of the inventive method implementation process (Pseudocode), wherein each parameter declaration is as follows:
POOL: resource pool;
UNLOCKED: the resource collection not locking in resource pool;
LOCKED: the resource collection locking in resource pool;
POOL_MAX: the setting capacity (being equivalent to UNLOCKED+LOCKED) of resource pool;
POOL_CACHE: cache resources pond;
UNLOCKED_CACHE: the resource collection not locking in cache resources pond;
LOCKED_CACHE: the resource collection locking in cache resources pond;
POOL_CACHE_MAX: the setting capacity (being equivalent to UNLOCKED_CACHE+LOCKED_CACHE) in cache resources pond;
QUEUE: request buffer queue;
QUEUE_MAX: the setting capacity of request buffer queue;
KEEPALIVETIME: the resource survival maximum time in the unlocked resource set of resource pool;
TIMEOUTTIME: the resource survival maximum time locking in resource collection of resource pool;
KEEPALIVETIME_CACHE: the resource survival maximum time in the unlocked resource set in cache resources pond;
TIMEOUTTIME_CACHE: the resource survival maximum time locking in resource collection in cache resources pond.
In order further to help to understand the resource regulating method of above-mentioned explorer, below in conjunction with accompanying drawing, it is described in detail.
As shown in Figure 1, the resource regulating method of above-mentioned explorer comprises the following steps:
Step 100: access resources pond, acquisition request resource: if there is resource in the resource collection not locking in resource pool, direct Gains resources; Otherwise, enter next step.
Step 200: access cache resource pool, acquisition request resource: if there is resource in the unlocked resource set in cache resources pond, direct Gains resources; Otherwise, enter next step.
In said process, if cannot be from the direct Gains resources of resource pool time, first consider that access is such as the such cache resources pond of L2 cache resource pool, instead of select block or add queuing, can avoid thus blocking the system causing without response problem.
Step 300: judge whether the resource quantity (resource collection not locking in resource pool and the resource collection sum locking) in resource pool is less than the setting capacity of resource pool: if be less than, create and obtain new resources; Otherwise, by the request of the current Gains resources buffer queue that joins request.
Step 400: judge whether request buffer queue reaches max cap.; If reach max cap., refuse this request, interrupt this resource acquisition; Otherwise, enter next step.
Step 500: by described request buffer queue access cache resource pool, acquisition request resource: if there is resource in the unlocked resource set in cache resources pond, direct Gains resources; Otherwise, enter next step.
In said process, request buffer queue does not carry out any direct interaction with the resource pool of fixed boundary, and carry out alternately in the cache resources pond that only can dynamically adjust with boundary value.Like this, can as resource pool, not be subject to the restriction of fixed boundary and need to often shift out slack resources, and often re-create resource in the time that request buffer queue is filed a request, shorten thus the resource acquisition time.
Step 600: judge whether the resource quantity (resource collection not locking and the resource collection sum locking) in cache resources pond is less than the setting capacity in cache resources pond: if be less than, create newly and obtain new resources; Otherwise according to the size of current request buffer queue, the setting capacity in corresponding increase and decrease cache resources pond, then returns to above-mentioned steps 500.
In this step, when current request buffer queue in certain critical value is larger, when the request in current request buffer queue of that is to say is more, increase the setting capacity in cache resources pond, improved thus equipment efficiency of usage, brought into play better equipment performance.
In the time of each request of access buffer queue, all want the amount of capacity of scan request buffer queue, dynamically to adjust resource in cache resources tankage and cache resources pond (comprising unlocked resource set in cache resources pond and the resource locking in resource collection) time-to-live maximal value according to the real time capacity of request buffer queue.That is to say, according to the increase and decrease of resource request, correspondingly increase/slow down and deposit resource pool capacity or correspondingly subtract/increase resource time-to-live maximal value in cache resources pond, further to reduce taking and consuming device resource.
Step 700: reclaim used resource.
In this step, for used resource, first its validity is verified, then reclaiming still effective resource (is put back in resource pool, can try one's best and not set up new resource thus, with further saving resource scheduling time), destroy invalid resource.
In addition, in the time of each access resources pond, cache resources pond, all will scan free time exceedes and sets peaked resource of time-to-live, these resources is shifted out to resource pool and buffer memory resource pool and destroys, to reduce as far as possible taking and consuming device resource.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (3)

1. a resource regulating method for explorer, comprises the following steps:
A, access resources pond, acquisition request resource: if there is resource in the resource collection not locking in resource pool, direct Gains resources; Otherwise, enter next step;
B, access cache resource pool, acquisition request resource: if there is resource in the unlocked resource set in cache resources pond, direct Gains resources; Otherwise, enter next step;
C, judge whether the resource quantity in resource pool is less than the setting capacity of resource pool: if be less than, create and obtain new resources; Otherwise, by the request of the current Gains resources buffer queue that joins request;
D, judge request buffer queue whether reach max cap.; If reach max cap., refuse this request, interrupt this resource acquisition; Otherwise, enter next step;
E, by described request buffer queue access cache resource pool, acquisition request resource: if there is resource in the unlocked resource set in cache resources pond, direct Gains resources; Otherwise, enter next step;
F, judge whether the resource quantity in cache resources pond is less than the setting capacity in cache resources pond: if be less than, create and obtain new resources; Otherwise according to the size of described request buffer queue, the setting capacity in corresponding increase and decrease cache resources pond, then returns to above-mentioned steps E.
2. method according to claim 1, is characterized in that, further comprising the steps of after step F:
G, verify and the validity of used resource effective resource is put back into described resource pool, destroy invalid resource.
3. method according to claim 1 and 2, is characterized in that,
While accessing described resource pool, described cache resources pond, therefrom scan free time exceed set peaked resource of time-to-live, these resources are shifted out and are destroyed pond from described resource pool, described cache resources.
CN201410254167.0A 2014-06-09 2014-06-09 A kind of resource regulating method of explorer Active CN104063283B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410254167.0A CN104063283B (en) 2014-06-09 2014-06-09 A kind of resource regulating method of explorer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410254167.0A CN104063283B (en) 2014-06-09 2014-06-09 A kind of resource regulating method of explorer

Publications (2)

Publication Number Publication Date
CN104063283A true CN104063283A (en) 2014-09-24
CN104063283B CN104063283B (en) 2017-06-16

Family

ID=51551006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410254167.0A Active CN104063283B (en) 2014-06-09 2014-06-09 A kind of resource regulating method of explorer

Country Status (1)

Country Link
CN (1) CN104063283B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260244A (en) * 2015-10-30 2016-01-20 北京奇艺世纪科技有限公司 Task scheduling method and device for distributed system
CN105407488A (en) * 2015-12-18 2016-03-16 重庆邮电大学 Optimization method for resource pool size adjustment based on D2D terminal feedback value
CN111858034A (en) * 2020-06-29 2020-10-30 苏州浪潮智能科技有限公司 Resource management method, system, device and medium
WO2021128904A1 (en) * 2019-12-27 2021-07-01 苏州浪潮智能科技有限公司 Dynamic multi-level caching method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070028068A1 (en) * 2005-07-29 2007-02-01 International Business Machines Corporation System and method for managing resources in a distributed storage system
CN101572918A (en) * 2008-04-29 2009-11-04 中国移动通信集团设计院有限公司 Method, device and system for allocating radio resources
US20100083272A1 (en) * 2008-10-01 2010-04-01 Microsoft Corporation Managing pools of dynamic resources
CN101968752A (en) * 2010-10-29 2011-02-09 南京财经大学 Model of cloud computing resource pool and performance analysis method
CN102103522A (en) * 2009-12-18 2011-06-22 中兴通讯股份有限公司 Resource management method and system
CN103220337A (en) * 2013-03-22 2013-07-24 合肥工业大学 Cloud computing resource optimizing collocation method based on self-adaptation elastic control

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070028068A1 (en) * 2005-07-29 2007-02-01 International Business Machines Corporation System and method for managing resources in a distributed storage system
CN101572918A (en) * 2008-04-29 2009-11-04 中国移动通信集团设计院有限公司 Method, device and system for allocating radio resources
US20100083272A1 (en) * 2008-10-01 2010-04-01 Microsoft Corporation Managing pools of dynamic resources
CN102103522A (en) * 2009-12-18 2011-06-22 中兴通讯股份有限公司 Resource management method and system
CN101968752A (en) * 2010-10-29 2011-02-09 南京财经大学 Model of cloud computing resource pool and performance analysis method
CN103220337A (en) * 2013-03-22 2013-07-24 合肥工业大学 Cloud computing resource optimizing collocation method based on self-adaptation elastic control

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260244A (en) * 2015-10-30 2016-01-20 北京奇艺世纪科技有限公司 Task scheduling method and device for distributed system
CN105260244B (en) * 2015-10-30 2019-11-22 北京奇艺世纪科技有限公司 A kind of method and apparatus of distributed system task schedule
CN105407488A (en) * 2015-12-18 2016-03-16 重庆邮电大学 Optimization method for resource pool size adjustment based on D2D terminal feedback value
WO2021128904A1 (en) * 2019-12-27 2021-07-01 苏州浪潮智能科技有限公司 Dynamic multi-level caching method and device
CN111858034A (en) * 2020-06-29 2020-10-30 苏州浪潮智能科技有限公司 Resource management method, system, device and medium
CN111858034B (en) * 2020-06-29 2023-01-06 苏州浪潮智能科技有限公司 Resource management method, system, device and medium

Also Published As

Publication number Publication date
CN104063283B (en) 2017-06-16

Similar Documents

Publication Publication Date Title
US20230319102A1 (en) Method, System and Device for Dynamically Preventing Traffic Attacks, and Storage Medium
JP5744707B2 (en) Computer-implemented method, computer program, and system for memory usage query governor (memory usage query governor)
CN110677305B (en) Automatic scaling method and system in cloud computing environment
CN104063283A (en) Resource-scheduling method for resource manager
US20140189267A1 (en) Method and apparatus for managing memory space
CN107197053A (en) A kind of load-balancing method and device
CN104102543A (en) Load regulation method and load regulation device in cloud computing environment
CN103037109B (en) Multicore equipment energy consumption management method and device
WO2016169166A1 (en) Virtual machine scheduling method and device
CN111367693B (en) Method, system, device and medium for scheduling plug-in tasks based on message queue
CN105938437B (en) Resist under a kind of cloud environment with the virtual machine deployment method stayed
CN110647392A (en) Intelligent elastic expansion method based on container cluster
WO2016086800A1 (en) Method and apparatus for controlling concurrent operation of mysql database
CN102970244A (en) Network message processing method of multi-CPU (Central Processing Unit) inter-core load balance
CN105975398A (en) Method for memory fragmentation management
CN108255608B (en) Management method of memory pool
CN108595259B (en) Memory pool management method based on global management
WO2014190557A1 (en) Physical resource adjustment method, device and controller
CN102567113A (en) Foreground program allocating system and realizing method
CN102426539B (en) Timer task automatic processing method and system
WO2020088078A1 (en) Fpga-based data processing method, apparatus, device and medium
JP2006107197A (en) Memory control method and program and terminal equipment
TWI646435B (en) Serverless system and execution method thereof
CN106200866A (en) A kind of application freezing method and mobile terminal
CN116149841A (en) Processor resource dynamic superdivision method based on cloud database instance load

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100094, Beijing, Haidian District, West Road, No. 8, Zhongguancun Software Park, building 9, international software building E, one floor, two layers

Applicant after: BEIJING HAITAI FANGYUAN HIGH TECHNOLOGY CO., LTD.

Address before: 100094, Beijing, Haidian District, West Road, No. 8, Zhongguancun Software Park, building 9, international software building E, one floor, two layers

Applicant before: Beijing Haitai Fangyuan High Technology Co., Ltd.

COR Change of bibliographic data
GR01 Patent grant