CN103186477B - Control method for cache region of server - Google Patents

Control method for cache region of server Download PDF

Info

Publication number
CN103186477B
CN103186477B CN201110458823.5A CN201110458823A CN103186477B CN 103186477 B CN103186477 B CN 103186477B CN 201110458823 A CN201110458823 A CN 201110458823A CN 103186477 B CN103186477 B CN 103186477B
Authority
CN
China
Prior art keywords
server
cache region
data file
upper limit
carried out
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.)
Active
Application number
CN201110458823.5A
Other languages
Chinese (zh)
Other versions
CN103186477A (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.)
Singularity Xinyuan International Technology Development (Beijing) Co.,Ltd.
Original Assignee
CHONGQING XINMEI AGRICULTURAL 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 CHONGQING XINMEI AGRICULTURAL INFORMATION TECHNOLOGY CO LTD filed Critical CHONGQING XINMEI AGRICULTURAL INFORMATION TECHNOLOGY CO LTD
Priority to CN201110458823.5A priority Critical patent/CN103186477B/en
Publication of CN103186477A publication Critical patent/CN103186477A/en
Application granted granted Critical
Publication of CN103186477B publication Critical patent/CN103186477B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a kind of control method for cache region of server, the method is by file effective time limit in cache region of server, three aspect structure adjusting of upper limit capacity and upper limit quantity of documents control, make while in cache region of server, the quantity of data file is effectively controlled, ensure that cache region of server is at any time all in the capacity storage scope of safety, will not be less because of file, capacity cannot trigger relatively greatly the safe memory range breaking through buffer area in the case of upper limit quantity of documents controls, and take into account the effect duration of each file in trace cache district, timely stale data file is rejected and vacate new spatial cache, cache region of server is made the most all to keep optimal state, it is favorably improved the data response speed of server, and possess multiple different embodiment and meet the demand of different situations.

Description

Control method for cache region of server
Technical field
The present invention relates to communication network technology and server technical field, be specifically related to a kind of control method for cache region of server.
Background technology
Server, refers to that in computer communication network management resource externally provides the high-performance computer of business service.Type of server has a lot, such as data server, file server, web page server, streaming media server, search server etc., they are intercepted in computer communication network from computer client or the service request of client mobile communication end, and service request responded and processes, and then provide various different business service for computer client or client mobile communication end, enrich network application.
The quality of the provided service of server, largely shows its response speed aspect.And in the prioritization scheme of speed of response of server, the optimization to cache region of server is one of most important optimization project;Reasonably distribution, control cache region of server, it is possible to improve the response speed of the server data file to calling in the recent period to a great extent.The most how more rationally, effectively cache region of server is controlled can then become an important research direction of server technology.
Summary of the invention
For above-mentioned deficiency present in prior art, it is an object of the invention to provide a kind of control method for cache region of server, control, to improve the response speed of server with adjustment reasonable, that effectively cache region of server is more optimized.
For achieving the above object, present invention employs following technological means:
A kind of control method for cache region of server, by pre-seting the file effective time limit of cache region of server, upper limit capacity and upper limit quantity of documents, the memory space of cache region of server is carried out upper limit capacity control, and the data file of storage in cache region of server is carried out file effective time limit and upper limit quantity of documents controls, it is achieved the structure adjusting to cache region of server residue memory capacity.
May select scheme as one, the method specifically includes following steps:
A1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step a2 when there being data file to enter buffer area);
A2) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step a4), otherwise perform step a3);
A3) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step a4), otherwise return step a1);
A4) delete current time and be stored in a data file of cache region of server the earliest, be then back to step a1).
May select scheme as one, the method specifically includes following steps:
B1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step b2 when there being data file to enter buffer area);
B2) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step b4), otherwise perform step b3);
B3) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step b4), otherwise return step b1);
B4) delete current time and be stored in a data file of cache region of server the earliest, then perform step b5);
B5) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if returning step b4), otherwise return step b1).
May select scheme as one, the method specifically includes following steps:
C1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step c2 when there being data file to enter buffer area);
C2) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step c4), otherwise perform step c3);
C3) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step c4), otherwise return step c1);
C4) delete current time and be stored in a data file of cache region of server the earliest, be then back to step c1).
May select scheme as one, the method specifically includes following steps:
D1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step d2 when there being data file to enter buffer area);
D2) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step d4), otherwise perform step d3);
D3) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step d6), otherwise return step d1);
D4) delete current time and be stored in a data file of cache region of server the earliest, then perform step d5);
D5) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if returning step d4), otherwise return step d1);.
D6) delete current time and be stored in a data file of cache region of server the earliest, be then back to step d1).
In above-mentioned control method for cache region of server, further, during in real time to cache region of server, each data file of storage carries out the tracking timing of correspondence, newly call if data file is thought highly of by service, then the tracking timing of its correspondence resets and is again tracked timing.
Compared to prior art, having the beneficial effects that of the inventive method, by to file effective time limit in cache region of server, three aspect structure adjusting of upper limit capacity and upper limit quantity of documents control, make while in cache region of server, the quantity of data file is effectively controlled, ensure that cache region of server is at any time all in the capacity storage scope of safety, will not be less because of file, capacity cannot trigger relatively greatly the safe memory range breaking through buffer area in the case of upper limit quantity of documents controls, and take into account the effect duration of each file in trace cache district, timely stale data file is rejected and vacate new spatial cache, cache region of server is made the most all to keep optimal state, it is favorably improved the data response speed of server.
Detailed description of the invention
Unlike the prior art, present invention employs a kind of control method for cache region of server by pre-seting the file effective time limit of cache region of server, upper limit capacity and upper limit quantity of documents, the memory space of cache region of server is carried out upper limit capacity control, and the data file of storage in cache region of server is carried out file effective time limit and upper limit quantity of documents controls, it is achieved the structure adjusting to cache region of server residue memory capacity.Thus, make while in cache region of server, the quantity of data file is effectively controlled, ensure that cache region of server is at any time all in the capacity storage scope of safety, and take into account the effect duration of each file in trace cache district, timely stale data file is rejected and vacate new spatial cache so that cache region of server the most all keeps optimal state.
Being embodied as mode of operation and can have various ways of control method for cache region of server of the present invention.
A: upper limit quantity of documents is preferential:
The upper limit quantity of documents priority scheme of control method for cache region of server of the present invention, carries out Comprehensive Control by preferentially considering upper limit quantity of documents to cache region of server, is more suitable for the applicable cases having caching quantity demand for control preferential, and its idiographic flow is as follows:
A1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step a2 when there being data file to enter buffer area);
A2) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step a4), otherwise perform step a3);
A3) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step a4), otherwise return step a1);
A4) delete current time and be stored in a data file of cache region of server the earliest, be then back to step a1).
B: upper limit quantity of documents preferentially takes into account upper limit capacity cycle detection:
In above-mentioned upper limit quantity of documents preferential (mode A), data file if there is newly entering buffer area is relatively big and the situation memory capacity of causing exceedes the situation of upper limit capacity, if the data Documents Comparison that current time is stored in cache region of server the earliest is little, then it is difficult to ensure that cache region of server recovers optimum state in time.Accordingly, as the optimization of limit quantity of documents preferential (mode A), present invention also offers upper limit quantity of documents and preferentially take into account the embodiment of upper limit capacity control cycle detection, its idiographic flow is as follows:
B1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step b2 when there being data file to enter buffer area);
B2) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step b4), otherwise perform step b3);
B3) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step b4), otherwise return step b1);
B4) delete current time and be stored in a data file of cache region of server the earliest, then perform step b5);
B5) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if returning step b4), otherwise return step b1).
C, upper limit capacity are preferential:
The applicable cases preferential for not caching quantity demand for control, then function is more suitable for upper limit capacity priority scheme, and its idiographic flow is as follows:
C1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step c2 when there being data file to enter buffer area);
C2) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step c4), otherwise perform step c3);
C3) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step c4), otherwise return step c1);
C4) delete current time and be stored in a data file of cache region of server the earliest, be then back to step c1).
D, upper limit capacity preferentially take into account cycle detection:
Only upper limit capacity is preferential (mode C), still have that the data file of newly entering buffer area is relatively big and the problem that cache region of server is difficult in time recover optimum state, therefore it is further proposed that the upper limit capacity optimized preferentially takes into account cycle detection mode, its idiographic flow is as follows:
D1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step d2 when there being data file to enter buffer area);
D2) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step d4), otherwise perform step d3);
D3) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step d6), otherwise return step d1);
D4) delete current time and be stored in a data file of cache region of server the earliest, then perform step d5);
D5) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if returning step d4), otherwise return step d1);.
D6) delete current time and be stored in a data file of cache region of server the earliest, be then back to step d1).
But no matter use any embodiment of above-mentioned A ~ D, effectively cache region of server can be carried out file effective time limit, upper limit capacity and upper limit quantity of documents three aspect and take into account monitoring, the adjustment that cache region of server is more optimized controls, and is favorably improved response speed and the operational performance of server.
As further optimizing, control method for cache region of server of the present invention can be in the way of taking into account the renewal of file expiry date further, during i.e. in real time to cache region of server, each data file of storage carries out the tracking timing of correspondence, newly call if data file is thought highly of by service, then the tracking timing of its correspondence resets and is again tracked timing.The data file being so newly called in making buffer area can obtain the expiry date of renewal, remains that cache region of server responds rapidly to newly calling data.
Finally illustrate is, above example is only in order to illustrate technical scheme and unrestricted, although the present invention being described in detail with reference to embodiment, it will be understood by those within the art that, technical scheme can be modified or equivalent, without deviating from objective and the scope of technical solution of the present invention, it all should be contained in the middle of scope of the presently claimed invention.

Claims (3)

1. a control method for cache region of server, it is characterized in that, by pre-seting the file effective time limit of cache region of server, upper limit capacity and upper limit quantity of documents, the memory space of cache region of server is carried out upper limit capacity control, and the data file of storage in cache region of server is carried out file effective time limit and upper limit quantity of documents controls, it is achieved the structure adjusting to cache region of server residue memory capacity;The data file stored in server buffer carries out the control of effective time limit and refers in real time each data file of storage in cache region of server be carried out the tracking timing of correspondence, and in this tracking timing course, newly call if data file is thought highly of by service, then the tracking timing of its correspondence resets and is again tracked timing;
Described control method comprises the steps:
A1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step a2 when there being data file to enter buffer area);
A2) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step a4), otherwise perform step a3);
A3) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step a4), otherwise return step a1);
A4) delete current time and be stored in a data file of cache region of server the earliest, be then back to step a1);
Or described control method comprises the steps:
C1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step c2 when there being data file to enter buffer area);
C2) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step c4), otherwise perform step c3);
C3) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step c4), otherwise return step c1);
C4) delete current time and be stored in a data file of cache region of server the earliest, be then back to step c1).
Control method for cache region of server the most according to claim 1, it is characterised in that the method specifically includes following steps:
B1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step b2 when there being data file to enter buffer area);
B2) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step b4), otherwise perform step b3);
B3) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step b4), otherwise return step b1);
B4) delete current time and be stored in a data file of cache region of server the earliest, then perform step b5);
B5) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if returning step b4), otherwise return step b1).
Control method for cache region of server the most according to claim 1, it is characterised in that the method specifically includes following steps:
D1) in real time each data file of storage in cache region of server is carried out the tracking timing of correspondence, be deleted when the tracking timing that data file is corresponding arrives file effective time limit, and triggering performs step d2 when there being data file to enter buffer area);
D2) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if being carried out step d4), otherwise perform step d3);
D3) judge that the quantity of documents stored in current time cache region of server has exceeded upper limit quantity of documents the most, if being carried out step d6), otherwise return step d1);
D4) delete current time and be stored in a data file of cache region of server the earliest, then perform step d5);
D5) judge that the memory capacity taken in current time cache region of server has exceeded upper limit capacity the most, if returning step d4), otherwise return step d1);
D6) delete current time and be stored in a data file of cache region of server the earliest, be then back to step d1).
CN201110458823.5A 2011-12-31 2011-12-31 Control method for cache region of server Active CN103186477B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110458823.5A CN103186477B (en) 2011-12-31 2011-12-31 Control method for cache region of server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110458823.5A CN103186477B (en) 2011-12-31 2011-12-31 Control method for cache region of server

Publications (2)

Publication Number Publication Date
CN103186477A CN103186477A (en) 2013-07-03
CN103186477B true CN103186477B (en) 2016-08-03

Family

ID=48677652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110458823.5A Active CN103186477B (en) 2011-12-31 2011-12-31 Control method for cache region of server

Country Status (1)

Country Link
CN (1) CN103186477B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5590300A (en) * 1991-03-05 1996-12-31 Zitel Corporation Cache memory utilizing address translation table
US6032227A (en) * 1996-09-30 2000-02-29 International Business Machines Corporation System and method for cache management in mobile user file systems
CN1822009A (en) * 2005-02-14 2006-08-23 精工爱普生株式会社 File operation limiting system, file operation limiting program, file operation limiting method, electronic device and printing apparatus
CN102221986A (en) * 2010-04-15 2011-10-19 研祥智能科技股份有限公司 High-speed data cache and collection system based on PCI (Peripheral Component Interconnect) bus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003153229A (en) * 2001-11-15 2003-05-23 Mitsubishi Electric Corp Apparatus and method for data communication

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5590300A (en) * 1991-03-05 1996-12-31 Zitel Corporation Cache memory utilizing address translation table
US6032227A (en) * 1996-09-30 2000-02-29 International Business Machines Corporation System and method for cache management in mobile user file systems
CN1822009A (en) * 2005-02-14 2006-08-23 精工爱普生株式会社 File operation limiting system, file operation limiting program, file operation limiting method, electronic device and printing apparatus
CN102221986A (en) * 2010-04-15 2011-10-19 研祥智能科技股份有限公司 High-speed data cache and collection system based on PCI (Peripheral Component Interconnect) bus

Also Published As

Publication number Publication date
CN103186477A (en) 2013-07-03

Similar Documents

Publication Publication Date Title
CN102130938B (en) Resource supply method oriented to Web application host platform
US9330004B2 (en) Data processing method, cache node, collaboration controller, and system
CN101519078B (en) Method for synchronizing multi-region data of comprehensive monitoring system
CN102333126B (en) Streaming media on demand method based on Hadoop and virtual streaming media server cluster
CN101883012B (en) Processing method of storage resource in network edge node
CN101426024B (en) Data flow controlling method, system and apparatus
CN103645904B (en) A kind of cache implementing method of interface interchange
CN104572502B (en) A kind of storage system cache policy adaptive approach
CN106844740A (en) Data pre-head method based on memory object caching system
CN106502578B (en) Capacity changes suggesting method and device
CN103716343A (en) Distributed service request processing method and system based on data cache synchronization
CN102833352A (en) Distributed cache management system and method for implementing distributed cache management
CN106021608A (en) Distributed crawler system and implementing method thereof
CN102724314B (en) A kind of distributed caching client based on metadata management
CN105376229A (en) Method for actively defending against cache pollution attack of content-centric network
CN104539744B (en) A kind of the media edge cloud dispatching method and device of two benches cooperation
CN102821164A (en) Efficient parallel-distribution type data processing system
CN102104494B (en) Metadata server, out-of-band network file system and processing method of system
CN105979273A (en) Cloud monitor and cloud operation of intelligent commercial TVs based on big data and cloud computation
CN103078933A (en) Method and device for determining data migration time
CN103475714A (en) System and method for operation log recording and uploading on basis of Active X technique
CN102694847A (en) Method and device for capturing user dynamic state in third-party open platform
CN103064779B (en) A kind of method of quick process log information
CN107341091A (en) Distributed memory system power consumption management method and device
CN103186477B (en) Control method for cache region of server

Legal Events

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

Effective date of registration: 20200605

Address after: Room 502-1, floor 5, building 2, courtyard 10, KEGU 1st Street, economic development zone, Daxing District, Beijing 100081

Patentee after: Singularity Xinyuan International Technology Development (Beijing) Co.,Ltd.

Address before: The 401121 northern New District of Chongqing municipality Mount Huangshan Road 5 south of Mercury Technology Building 1 floor office No. 3

Patentee before: A-MEDIA COMMUNICATION TECH Co.,Ltd.