CN107038127A - Application system and its buffer control method and device - Google Patents

Application system and its buffer control method and device Download PDF

Info

Publication number
CN107038127A
CN107038127A CN201710069505.7A CN201710069505A CN107038127A CN 107038127 A CN107038127 A CN 107038127A CN 201710069505 A CN201710069505 A CN 201710069505A CN 107038127 A CN107038127 A CN 107038127A
Authority
CN
China
Prior art keywords
parameter value
specified
hit rate
cache hit
caching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710069505.7A
Other languages
Chinese (zh)
Inventor
李渠成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710069505.7A priority Critical patent/CN107038127A/en
Publication of CN107038127A publication Critical patent/CN107038127A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0875Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with dedicated cache, e.g. instruction or stack

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The embodiment of the present application provides a kind of application system and its buffer control method and device, and this method includes:Obtain the first of caching and specify parameter value scope and the second specified parameter value scope;The cache hit rate corresponding to each first specified parameter value in the range of the described first specified parameter value is obtained, and determines wherein to meet the first specified parameter value corresponding to the cache hit rate of first condition;The parameter value for specifying parameter by the first of the caching is adjusted to the first specified parameter value met corresponding to the cache hit rate of first condition;The cache hit rate corresponding to each second specified parameter value in the range of the described second specified parameter value is obtained, and determines wherein to meet the second specified parameter value corresponding to the cache hit rate of second condition;The parameter value for specifying parameter by the second of the caching is adjusted to the second specified parameter value met corresponding to the cache hit rate of second condition.The embodiment of the present application can improve the cache hit rate of application system.

Description

Application system and its buffer control method and device
Technical field
The application is related to buffer control technical field, more particularly, to a kind of application system and its buffer control method and dress Put.
Background technology
It is well known that caching is the buffering area (being referred to as Cache) of data exchange.General, in order to improve application system Performance (such as response time, handling capacity), can usually introduce different types of caching.And for caching, cache hit rate It is to judge one of key factor of its acceleration effect quality.When user's access cache, if having been cached in the caching to be interviewed Referred to as cache hit during the data asked;Otherwise it is exactly to be referred to as cache miss, at this time, it may be necessary to from downstream (such as database Deng) access evidence.
As can be seen here, the height of the cache hit rate of application system directly affects the quality of application system performance.Therefore, such as It is technical problem urgently to be resolved hurrily at present that what, which improves cache hit rate,.
The content of the invention
The purpose of the embodiment of the present application is to provide a kind of application system and its buffer control method and device, answered with improving With the cache hit rate of system.
To reach above-mentioned purpose, on the one hand, the embodiment of the present application provides a kind of buffer control method, including following step Suddenly:
Obtain the first of caching and specify parameter value scope and the second specified parameter value scope;
The cache hit rate corresponding to each first specified parameter value in the range of the described first specified parameter value is obtained, and It is determined that wherein meeting the first specified parameter value corresponding to the cache hit rate of first condition;
The parameter value for specifying parameter by the first of the caching is adjusted to the cache hit rate institute for meeting first condition Corresponding first specifies parameter value;
The cache hit rate corresponding to each second specified parameter value in the range of the described second specified parameter value is obtained, and It is determined that wherein meeting the second specified parameter value corresponding to the cache hit rate of second condition;
The parameter value for specifying parameter by the second of the caching is adjusted to the cache hit rate institute for meeting second condition Corresponding second specifies parameter value.
On the other hand, the embodiment of the present application provides a kind of buffer control device, including:
Span acquisition module, parameter value scope and the second specified parameter value are specified for obtaining the first of caching Scope;
First hit rate acquisition module, each first specified parameter in the range of parameter value is specified for obtaining described first The corresponding cache hit rate of value, and determine wherein to meet the first specified parameter corresponding to the cache hit rate of first condition Value;
First specifies parameter adjustment module, for specifying the parameter value of parameter to be adjusted to described full by the first of the caching First corresponding to the cache hit rate of sufficient first condition specifies parameter value;
Second hit rate acquisition module, each second specified parameter in the range of parameter value is specified for obtaining described second The corresponding cache hit rate of value, and determine wherein to meet the second specified parameter corresponding to the cache hit rate of second condition Value;
Second specifies parameter adjustment module, for specifying the parameter value of parameter to be adjusted to described full by the second of the caching Second corresponding to the cache hit rate of sufficient second condition specifies parameter value.
On the other hand, the embodiment of the present application provides a kind of application system, including:
Processor;
Memory, for memory buffers control device;
Wherein, when the buffer control device is handled by the processor, following steps are performed:
Obtain the first of caching and specify parameter value scope and the second specified parameter value scope;
The cache hit rate corresponding to each first specified parameter value in the range of the described first specified parameter value is obtained, and It is determined that wherein meeting the first specified parameter value corresponding to the cache hit rate of first condition;
The parameter value for specifying parameter by the first of the caching is adjusted to the cache hit rate institute for meeting first condition Corresponding first specifies parameter value;
The cache hit rate corresponding to each second specified parameter value in the range of the described second specified parameter value is obtained, and It is determined that wherein meeting the second specified parameter value corresponding to the cache hit rate of second condition;
The parameter value for specifying parameter by the second of the caching is adjusted to the cache hit rate institute for meeting second condition Corresponding second specifies parameter value.
The technical scheme provided from above the embodiment of the present application, the embodiment of the present application is referred to by obtaining the first of caching The cache hit rate corresponding to each first specified parameter value of parameter value scope is determined, it is determined that wherein meeting first condition First corresponding to cache hit rate specifies parameter value, and then specify parameter by the first of caching first specifies parameter value to adjust Whole the first specified parameter value met for this corresponding to cache hit rate of first condition;On this basis, it is slow further through obtaining Second deposited specifies the cache hit rate corresponding to each second specified parameter value of parameter value scope, it is determined that wherein meeting Second corresponding to the cache hit rate of second condition specifies parameter value, and then specify parameter by the second of caching second is specified Parameter value be adjusted to this meet corresponding to the cache hit rate of second condition second specify parameter value, and first specify parameter The parameter that parameter is all important influence cache hit rate is specified with second, therefore, is adjusted to improve compared with the figure of merit and answers With the cache hit rate of system.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments described in application, for those of ordinary skill in the art, are not paying the premise of creative labor Under, other accompanying drawings can also be obtained according to these accompanying drawings.In the accompanying drawings:
Fig. 1 is the flow chart of the buffer control method of the embodiment of the application one;
Fig. 2 specifies each first specified parameter value in the range of parameter value right to obtain first in the embodiment of the application one The flow chart for the cache hit rate answered;
Fig. 3 specifies each second specified parameter value in the range of parameter value right to obtain second in the embodiment of the application one The flow chart for the cache hit rate answered;
Fig. 4 is the structured flowchart of the buffer control device of the embodiment of the application one;
Fig. 5 is the structured flowchart of the application system of the embodiment of the application one.
Embodiment
In order that those skilled in the art more fully understand the technical scheme in the application, it is real below in conjunction with the application The accompanying drawing in example is applied, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described implementation Example only some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, this area is common The every other embodiment that technical staff is obtained under the premise of creative work is not made, should all belong to the application protection Scope.
With reference to shown in Fig. 1, the buffer control method of the embodiment of the present application comprises the following steps:
S101, the first specified parameter value scope for obtaining caching and second specify parameter value scope.
In the embodiment of the present application, described caching can be local cache or distributed caching.The application's In one embodiment, the local cache for example can be local memory caching.In one embodiment of the application, described point Cloth caching is such as can be Memcached distributed cachings, Redis distributed cachings, Tair distributed cachings.The application In embodiment, described caching can also be map cachings, and the map cachings are i.e. by the map interfaces in java with key- Value (key-value pair) mode data storage.
It is general, influence the cache hit rate of caching parameter have a lot, such as buffer memory capacity be cached with the effect phase.And The embodiment of the present application then can realize the lifting of cache hit rate by adjusting cache hit rate affecting parameters that some specify.Example As in the embodiment of the present application, the lifting of cache hit rate can be realized by adjusting buffer memory capacity and being cached with the effect phase.Wherein, Described first specifies parameter to be buffer memory capacity, and corresponding, described second specifies parameter to be to be cached with the effect phase.Certainly, Described first specifies parameter to be the caching term of validity, and corresponding, described second specifies parameter to be buffer memory capacity.And In the application another embodiment, as needed can also by adjust more or less cache hit rate affecting parameters come Realize.
In the embodiment of the present application, because the first specified parameter value scope and second specifies parameter value scope to be usually root It is pre-configured according to needing.Therefore, parameter and second is specified to specify the corresponding configuration information of parameter can by reading first Parameter value scope is specified with corresponding the first specified parameter value scope and second that obtains.
S102, acquisition described first specify the cache hit corresponding to each first specified parameter value in the range of parameter value Rate, and determine wherein to meet the first specified parameter value corresponding to the cache hit rate of first condition.
In one embodiment of the application, it is described obtain it is described first specify parameter value in the range of each first specify Cache hit rate corresponding to parameter value, and determine wherein to meet the first specified ginseng corresponding to the cache hit rate of first condition Numerical value.In one embodiment of the application, the cache hit rate for meeting first condition can be:Each described first finger Determine the soprano in the cache hit rate corresponding to parameter value.It is described to meet first in another embodiment of the application The cache hit rate of part can also be:Predetermined threshold value is reached in cache hit rate corresponding to each described first specified parameter value 's.This step implement can with as shown in Fig. 2 including:
S1021, determine described first specify parameter value in the range of be not present correspondence cache hit rate first specify ginseng Numerical value, constitutes first and specifies set of parameter values.
In the embodiment of the present application, the first specified parameter value corresponding to the cache hit rate of first condition is met for acquisition, The cache hit rate corresponding to each first specified parameter value in the range of the described first specified parameter value can be obtained, with therefrom It is determined that wherein meeting the first specified parameter value corresponding to the cache hit rate of first condition.It is thus necessary to determine that described first Specify parameter value in the range of be not present correspondence cache hit rate first specify parameter value, and by these first specify parameter value Constitute first and specify set of parameter values.
S1022, the specified parameter value of taking-up one first from the described first specified set of parameter values.
S1023, by the first of the caching specify parameter parameter value be adjusted to this first specify parameter value.
The cache hit rate under the first specified parameter value is buffered in described in S1024, acquisition.
The application one embodiment, typically can be by delaying in the statistical unit time such as default counter (or measurement period) The access request number of times and hit-count deposited, then by calculating the ratio of hit-count and access request number of times, can be obtained The cache hit rate of the caching in the current statistic cycle, and cache hit rate record is preserved, so as to be ordered by reading the caching Middle rate record can obtain the cache hit rate being buffered under some first specified parameter value.
S1025, judge first specify in set of parameter values with the presence or absence of it is remaining be not provided with first specify parameter value.If In the presence of step S1022 is then performed, step S1026 is otherwise performed.By that analogy, until getting described first specifies parameter value collection Untill each in conjunction first specifies the cache hit rate corresponding to parameter value.
S1026, by described first specify parameter value in the range of each first specify parameter value corresponding to cache hit Rate is ranked up, and parameter value is specified to determine wherein to meet first corresponding to the cache hit rate of first condition.
In the embodiment of the present application, the sequence can be descending order sequence, may thereby determine that the first cis-position Cache hit rate be highest cache hit rate.Certainly, the sequence can also be ascending order sequence, so as to It is determined that the cache hit rate of last position is highest cache hit rate.
S103, by the first of the caching specify parameter parameter value be adjusted to the cache hit for meeting first condition First corresponding to rate specifies parameter value.
S104, acquisition described second specify the cache hit corresponding to each second specified parameter value in the range of parameter value Rate, and determine wherein to meet the second specified parameter value corresponding to the cache hit rate of second condition.
In one embodiment of the application, institute is adjusted in the parameter value for specifying parameter by the first of the caching State meet corresponding to the cache hit rate of first condition first specify parameter value on the basis of, it is described obtain it is described second specify Cache hit rate in the range of parameter value corresponding to each second specified parameter value, and determine wherein to meet the slow of second condition Deposit second corresponding to hit rate and specify parameter value, in one embodiment of the application, the caching for meeting second condition Hit rate can be:The soprano in cache hit rate corresponding to each described second specified parameter value.In the another of the application In one embodiment, the cache hit rate for meeting second condition can also be:Each described second specified parameter value institute is right Predetermined threshold value is reached in the cache hit rate answered.This step implement can with as shown in figure 3, including:
S1031, determine described second specify parameter value in the range of be not present correspondence cache hit rate second specify ginseng Numerical value, constitutes second and specifies set of parameter values.
In the embodiment of the present application, the second specified parameter value corresponding to the cache hit rate of second condition is met for acquisition, The cache hit rate corresponding to each second specified parameter value in the range of the described second specified parameter value can be obtained, with therefrom It is determined that wherein meeting the second specified parameter value corresponding to the cache hit rate of second condition.It is thus necessary to determine that described second Specify parameter value in the range of be not present correspondence cache hit rate second specify parameter value, and by these second specify parameter value Constitute second and specify set of parameter values.
S1032, the specified parameter value of taking-up one second from the described second specified set of parameter values.
S1033, by the second of the caching specify parameter parameter value be adjusted to this second specify parameter value.
The cache hit rate under the second specified parameter value is buffered in described in S1034, acquisition.
The application one embodiment, typically can be by delaying in the statistical unit time such as default counter (or measurement period) The access request number of times and hit-count deposited, then can be worked as by calculating the ratio of hit-count and access request number of times In preceding measurement period the cache hit rate of the caching and preserve cache hit rate record so that by reading the cache hit rate Record can obtain the cache hit rate being buffered under some second specified parameter value.
S1035, judge second specify in set of parameter values with the presence or absence of it is remaining be not provided with second specify parameter value.If In the presence of step S1032 is then performed, step S1036 is otherwise performed.By that analogy, until getting described second specifies parameter value collection Untill each in conjunction second specifies the cache hit rate corresponding to parameter value.
S1036, by described second specify parameter value in the range of each second specify parameter value corresponding to cache hit Rate is ranked up, and parameter value is specified to determine wherein to meet second corresponding to the cache hit rate of second condition.
S105, by the second of the caching specify parameter parameter value be adjusted to the cache hit for meeting second condition Second corresponding to rate specifies parameter value.
In one embodiment of the application, the first specified parameter value scope and the second specified ginseng for obtaining caching Number span, can be performed when receiving timing buffer control task.The timing buffer control task is used as one Individual timing drives message, for determining the frequency of caching adjustment, often receives to a timing buffer control task, is carried out once Caching adjustment control.Because the cache hit rate of caching is counted within the unit interval, the caching of different statistical time ranges is ordered Middle rate might have difference, therefore, and the embodiment of the present application can cause the caching of caching to order by this strategy periodically adjusted Middle rate adapts to this change as far as possible, in favor of improving the cache hit rate of caching.
In another embodiment of the application, the first specified parameter value scope and second that the acquisition is cached are specified Parameter value scope, can be performed when receiving timing buffer control task.The first specified ginseng for obtaining caching Number spans and second specify parameter value scope or current receiving timing buffer control task and system Portfolio is less than what is performed during predetermined threshold value.That is, in the embodiment of the present application, receiving timing buffer control task When, it can also determine whether whether the current portfolio of system is less than predetermined threshold value, if be less than predetermined threshold value, perform The timing buffer control task, the normal operation of system may be influenceed to avoid caching in the adjustment of peak traffic phase as far as possible;It is no Then, this timing buffer control task is abandoned.
In the embodiment above, it is the accuracy of raising cache hit rate, described first specifies each in the range of parameter value Individual first specifies the cache hit rate corresponding to parameter value, can be counted under same buffered hit rate measurement period.Example Such as all with 1 hour for measurement period.Corresponding, described second specifies each second specified parameter value institute in the range of parameter value right The cache hit rate answered or counted under same buffered hit rate measurement period.
In one embodiment of the application, above-mentioned buffer control method can also comprise the following steps:
In advance specified data object is put into the caching, and the caching term of validity of the specified data object is set to Never fail;So that map is cached as an example, the caching term of validity to the specified data object is set to never fail, can be with It is set to never fail for the term of validity to key values corresponding to the specified data object.
It is corresponding, after the response for access request is received, confirm whether the data object in the response belongs to institute State specified data object;
If it is confirmed that the data object in the response belongs to the specified data object, then by the data in the response Object is updated to the caching.
In embodiments herein, the specified data object includes predictable hyperpyrexia degrees of data object, in this Shen Please be under an exemplary scenario, the data object for example can be net purchase platform (such as Jingdone district net purchase platform, Amazon net purchase Platform etc.) on the good commodity specified or the service for preparing to urge pin of planning.So, in advance by predictable hyperpyrexia degrees of data object (data object for both having reached presupposed information heat degree threshold), which is put into caching, can improve the hit rate of caching.Certainly, it is above-mentioned to be only Illustrated by taking the shopping scene of net purchase platform as an example, without constituting its limitation, in the application other embodiment, for search Other scenes such as scene, download scene are also applicable.
In another embodiment of the application, it is contemplated that non-designated data object is it could also be possible that hyperpyrexia degrees of data pair As therefore, if it is confirmed that the data object in the response is not belonging to the specified data object, then can further obtain institute State the heatrate value of the data object in response;
Then judge whether described information hot value reaches default heatrate threshold value;Described information hot value for example may be used Think click hot value and/or search hot value etc.;
If described information hot value reaches described information heat degree threshold, confirm the data object in the response more The new extremely caching, that is, confirm that its heatrate value reaches that the data object of presupposed information heat degree threshold is hyperpyrexia degrees of data pair As, thus put it into caching in can improve the hit rate of caching;Otherwise, it is not high temperature data pair to confirm the data object As caching need not be put it into.
In the embodiment of the present application, described information hot value can be calculated to obtain according to the temperature model built in advance, Described temperature model can be a kind of heatrate computational algorithm, and the computational algorithm is for example by temperature affecting parameters The heatrate value of data object is asked in the weighted sum of (access times etc.).
The embodiment of the present application specifies each the first of parameter value scope to specify parameter value by obtaining the first of caching Corresponding cache hit rate, it is determined that wherein meeting the first specified parameter value corresponding to the cache hit rate of first condition, so Specifying the first of parameter by the first of caching afterwards, to specify parameter value to be adjusted to the cache hit rate institute that this meets first condition right First answered specifies parameter value;On this basis, each the second of parameter value scope is specified further through obtain caching second The cache hit rate corresponding to parameter value is specified, it is determined that wherein meeting the second finger corresponding to the cache hit rate of second condition Determine parameter value, then specify parameter by the second of caching second specifies parameter value to be adjusted to the caching for meeting second condition Second corresponding to hit rate specifies parameter value, and first specifies parameter and second to specify parameter to be all important influence caching life The parameter of middle rate, therefore, is adjusted to that compared with the figure of merit cache hit rate can be improved.
With reference to shown in Fig. 4, the buffer control device of the embodiment of the present application includes:
Span acquisition module 41, parameter value scope and the second specified parameter are specified available for obtain caching first Span;
First hit rate acquisition module 42, available for obtain described first specify parameter value in the range of each first specify Cache hit rate corresponding to parameter value, and determine wherein to meet the first specified ginseng corresponding to the cache hit rate of first condition Numerical value;
First specifies parameter adjustment module 43, specifies the parameter value of parameter to be adjusted to institute available for by the first of the caching State meet corresponding to the cache hit rate of first condition first specify parameter value;
Second hit rate acquisition module 44, available for obtain described second specify parameter value in the range of each second specify Cache hit rate corresponding to parameter value, and determine wherein to meet the second specified ginseng corresponding to the cache hit rate of second condition Numerical value;
Second specifies parameter adjustment module 45, specifies the parameter value of parameter to be adjusted to institute available for by the second of the caching State meet corresponding to the cache hit rate of second condition second specify parameter value.
The buffer control device of the embodiment of the present application is corresponding with the buffer control method shown in above-mentioned Fig. 1, therefore, is related to The details of the buffer control device of the embodiment of the present application, refers to the corresponding content of the buffer control method shown in above-mentioned Fig. 1.
The embodiment of the present application specifies each the first of parameter value scope to specify parameter value by obtaining the first of caching Corresponding cache hit rate, it is determined that wherein meeting the first specified parameter value corresponding to the cache hit rate of first condition, so Specifying the first of parameter by the first of caching afterwards, to specify parameter value to be adjusted to the cache hit rate institute that this meets first condition right First answered specifies parameter value;On this basis, each the second of parameter value scope is specified further through obtain caching second The cache hit rate corresponding to parameter value is specified, it is determined that wherein meeting the second finger corresponding to the cache hit rate of second condition Determine parameter value, then specify parameter by the second of caching second specifies parameter value to be adjusted to the caching for meeting second condition Second corresponding to hit rate specifies parameter value, and first specifies parameter and second to specify parameter to be all important influence caching life The parameter of middle rate, therefore, is adjusted to that compared with the figure of merit cache hit rate can be improved.
With reference to shown in Fig. 5, the application system of the embodiment of the present application the embodiment of the present application can include processing in hardware view Device, internal bus, memory and internal memory etc., are also possible that the hardware required for other business certainly.Processor is from memory It is middle to read corresponding computer program into internal memory and then run, buffer control device is formed on logic level.Certainly, except Outside software realization mode, the embodiment of the present application is not precluded from other implementations, such as logical device or software and hardware combining Mode etc., that is to say, that the executive agent of following handling process is not limited to each logic unit or hardware Or logical device.Wherein, memory, for memory buffers control device;The buffer control device is handled by the processor When, it can perform following steps:
Obtain the first of caching and specify parameter value scope and the second specified parameter value scope;
The cache hit rate corresponding to each first specified parameter value in the range of the described first specified parameter value is obtained, and It is determined that wherein meeting the first specified parameter value corresponding to the cache hit rate of first condition;
The parameter value for specifying parameter by the first of the caching is adjusted to the cache hit rate institute for meeting first condition Corresponding first specifies parameter value;
The cache hit rate corresponding to each second specified parameter value in the range of the described second specified parameter value is obtained, and It is determined that wherein meeting the second specified parameter value corresponding to the cache hit rate of second condition;
The parameter value for specifying parameter by the second of the caching is adjusted to the cache hit rate institute for meeting second condition Corresponding second specifies parameter value.
In the embodiment of the present application, described application system can be any application system, for example, provide the net of shopping service Purchasing platform (such as Jingdone district net purchase platform, Amazon net purchase platform), there is provided the search engine (such as hundred of the services such as inquiry, download Degree search, Google search) there is provided payment transaction service Third-party payment platform etc. (for example wechat payment, Baidu's wallet, PayPal, drawing OK a karaoke club etc.).
The embodiment of the present application specifies each the first of parameter value scope to specify parameter value by obtaining the first of caching Corresponding cache hit rate, it is determined that wherein meeting the first specified parameter value corresponding to the cache hit rate of first condition, so Specifying the first of parameter by the first of caching afterwards, to specify parameter value to be adjusted to the cache hit rate institute that this meets first condition right First answered specifies parameter value;On this basis, each the second of parameter value scope is specified further through obtain caching second The cache hit rate corresponding to parameter value is specified, it is determined that wherein meeting the second finger corresponding to the cache hit rate of second condition Determine parameter value, then specify parameter by the second of caching second specifies parameter value to be adjusted to the caching for meeting second condition Second corresponding to hit rate specifies parameter value, and first specifies parameter and second to specify parameter to be all important influence caching life The parameter of middle rate, therefore, is adjusted to that the cache hit rate of application system can be improved compared with the figure of merit.And cache hit rate is carried The high performance including response time and handling capacity etc. for lifting application system is highly beneficial.
Although procedures described above flow includes the multiple operations occurred with particular order, it should however be appreciated that understand, These processes can include more or less operations, and these operations can sequentially be performed or performed parallel (such as using parallel Processor or multi-thread environment).
In the 1990s, for a technology improvement can clearly distinguish be on hardware improvement (for example, Improvement to circuit structures such as diode, transistor, switches) or software on improvement (for the improvement of method flow).So And, with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit. Designer nearly all obtains corresponding hardware circuit by the way that improved method flow is programmed into hardware circuit.Cause This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, PLD (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, its logic function is determined by user to device programming.By designer Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, without asking chip maker to design and make Special IC chip.Moreover, nowadays, substitution manually makes IC chip, and this programming is also used instead mostly " patrols Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development, And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL is also not only a kind of, but have many kinds, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL (Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also should This understands, it is only necessary to slightly programming in logic and be programmed into method flow in integrated circuit with above-mentioned several hardware description languages, The hardware circuit for realizing the logical method flow can be just readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing Device and storage can by the computer of the computer readable program code (such as software or firmware) of (micro-) computing device Read medium, gate, switch, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller includes but is not limited to following microcontroller Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that except with Pure computer readable program code mode is realized beyond controller, can be made completely by the way that method and step is carried out into programming in logic Obtain controller and come real in the form of gate, switch, application specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. Existing identical function.Therefore this controller is considered a kind of hardware component, and various for realizing to including in it The device of function can also be considered as the structure in hardware component.Or even, can be by for realizing that the device of various functions is regarded For that not only can be the software module of implementation method but also can be the structure in hardware component.
System, device, module or unit that above-described embodiment is illustrated, can specifically be realized by computer chip or entity, Or realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet PC, wearable device or these equipment The combination of equipment.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented The function of each unit can be realized in same or multiple softwares and/or hardware during application.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the present invention can be used in one or more computers for wherein including computer usable program code The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability Comprising so that process, method, commodity or equipment including a series of key elements are not only including those key elements, but also wrap Include other key elements being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described Also there is other identical element in process, method, commodity or the equipment of element.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product. Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code The shape for the computer program product that storage media is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can be described in the general context of computer executable instructions, such as program Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these DCEs, by Remote processing devices connected by communication network perform task.In a distributed computing environment, program module can be with Positioned at including in the local and remote computer-readable storage medium including storage device.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.It is real especially for system Apply for example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
Embodiments herein is the foregoing is only, the application is not limited to.For those skilled in the art For, the application can have various modifications and variations.It is all any modifications made within spirit herein and principle, equivalent Replace, improve etc., it should be included within the scope of claims hereof.

Claims (20)

1. a kind of buffer control method, it is characterised in that comprise the following steps:
Obtain the first of caching and specify parameter value scope and the second specified parameter value scope;
The cache hit rate corresponding to each first specified parameter value in the range of the described first specified parameter value is obtained, and is determined Wherein meet first corresponding to the cache hit rate of first condition and specify parameter value;
Specify the parameter value of parameter to be adjusted to described by the first of the caching to meet corresponding to the cache hit rate of first condition First specify parameter value;
The cache hit rate corresponding to each second specified parameter value in the range of the described second specified parameter value is obtained, and is determined Wherein meet second corresponding to the cache hit rate of second condition and specify parameter value;
Specify the parameter value of parameter to be adjusted to described by the second of the caching to meet corresponding to the cache hit rate of second condition Second specify parameter value.
2. buffer control method according to claim 1, it is characterised in that described first, which specifies parameter to include caching, holds Amount, described second specifies parameter to include the caching term of validity.
3. buffer control method according to claim 1, it is characterised in that the first of the acquisition caching specifies parameter to take It is worth scope and the second specified parameter value scope, is performed when receiving timing buffer control task.
4. buffer control method according to claim 1, it is characterised in that the first of the acquisition caching specifies parameter to take It is worth scope and second specifies parameter value scope, is to receive timing buffer control task and the current portfolio of system is less than Performed during predetermined threshold value.
5. buffer control method according to claim 1, it is characterised in that parameter value is specified in the acquisition described first In the range of each first specify cache hit rate corresponding to parameter value, and determine wherein to meet the cache hit rate of first condition Corresponding first specifies parameter value, including:
Determine that described first specifies and the first of correspondence cache hit rate is not present in the range of parameter value specifies parameter value, constitute the One specifies set of parameter values;
One first, which is taken out, from the described first specified set of parameter values specifies parameter value;
The parameter value for specifying parameter by the first of the caching is adjusted to the first specified parameter value;
The cache hit rate under the first specified parameter value is buffered in described in obtaining;
By that analogy, until getting the caching in the described first specified set of parameter values corresponding to each first specified parameter value Untill hit rate;
The cache hit rate in the range of parameter value corresponding to each first specified parameter value is specified to be ranked up by described first, Parameter value is specified to determine wherein to meet first corresponding to the cache hit rate of first condition.
6. buffer control method according to claim 1, it is characterised in that parameter value is specified in the acquisition described second In the range of each second specify cache hit rate corresponding to parameter value, and determine wherein to meet the cache hit rate of second condition Corresponding second specifies parameter value, including:
Determine that described second specifies and the second of correspondence cache hit rate is not present in the range of parameter value specifies parameter value, constitute the Two specify set of parameter values;
One second, which is taken out, from the described second specified set of parameter values specifies parameter value;
The parameter value for specifying parameter by the second of the caching is adjusted to the second specified parameter value;
The cache hit rate under the second specified parameter value is buffered in described in obtaining;
By that analogy, until getting the caching in the described second specified set of parameter values corresponding to each second specified parameter value Untill hit rate;
The cache hit rate in the range of parameter value corresponding to each second specified parameter value is specified to be ranked up by described second, Parameter value is specified to determine wherein to meet second corresponding to the cache hit rate of second condition.
7. buffer control method according to claim 1, it is characterised in that the caching includes local cache and distribution Any one in caching.
8. buffer control method according to claim 1, it is characterised in that described first specifies each in the range of parameter value Individual first specifies the cache hit rate corresponding to parameter value, is counted under same buffered hit rate measurement period.
9. the buffer control method according to claim 1 or 8, it is characterised in that described second specifies parameter value scope Cache hit rate corresponding to each interior second specified parameter value, is counted under same buffered hit rate measurement period.
10. buffer control method according to claim 1, it is characterised in that also include:
In advance specified data object is put into the caching, and the caching term of validity of the specified data object is set to never Failure;
It is corresponding, after the response for access request is received, confirm whether the data object in the response belongs to the finger Determine data object;
If it is confirmed that the data object in the response belongs to the specified data object, then by the data object in the response It is updated to the caching.
11. buffer control method according to claim 10, it is characterised in that the caching is cached including map;
Corresponding, the caching term of validity to the specified data object is set to never fail, and specifically includes:
The term of validity to key values corresponding to the specified data object is set to never fail.
12. buffer control method according to claim 10, it is characterised in that also include:
If it is confirmed that the data object in the response is not belonging to the specified data object, then the data in the response are obtained The heatrate value of object;
Judge whether described information hot value reaches default heatrate threshold value;
If described information hot value reaches described information heat degree threshold, the data object in the response is updated to described Caching.
13. buffer control method according to claim 12, it is characterised in that described information hot value includes:Click on heat Angle value and/or search hot value.
14. the buffer control method according to claim 11 to 13 any one, it is characterised in that the specified data pair As including:The commodity specified or service.
15. a kind of buffer control device, it is characterised in that including:
Span acquisition module, parameter value scope and the second specified parameter value model are specified for obtaining the first of caching Enclose;
First hit rate acquisition module, each first specified parameter value institute in the range of parameter value is specified for obtaining described first Corresponding cache hit rate, and determine wherein to meet the first specified parameter value corresponding to the cache hit rate of first condition;
First specifies parameter adjustment module, and the parameter value for specifying parameter by the first of the caching is adjusted to described and meets the First corresponding to the cache hit rate of one condition specifies parameter value;
Second hit rate acquisition module, each second specified parameter value institute in the range of parameter value is specified for obtaining described second Corresponding cache hit rate, and determine wherein to meet the second specified parameter value corresponding to the cache hit rate of second condition;
Second specifies parameter adjustment module, and the parameter value for specifying parameter by the second of the caching is adjusted to described and meets the Second corresponding to the cache hit rate of two conditions specifies parameter value.
16. buffer control device according to claim 15, it is characterised in that described first, which specifies parameter to include caching, holds Amount, described second specifies parameter to include the caching term of validity.
17. buffer control device according to claim 15, it is characterised in that described first specifies parameter to include being cached with The effect phase, described second specifies parameter to include buffer memory capacity.
18. buffer control device according to claim 15, it is characterised in that the first of the acquisition caching specifies parameter Span and the second specified parameter value scope, are performed when receiving timing buffer control task.
19. buffer control device according to claim 15, it is characterised in that the first of the acquisition caching specifies parameter Span and second parameter value scope is specified, be to receive timing buffer control task and the current portfolio of system is low Performed when predetermined threshold value.
20. a kind of application system, it is characterised in that including:
Processor;
Memory, for memory buffers control device;
Wherein, when the buffer control device is handled by the processor, following steps are performed:
Obtain the first of caching and specify parameter value scope and the second specified parameter value scope;
The cache hit rate corresponding to each first specified parameter value in the range of the described first specified parameter value is obtained, and is determined Wherein meet first corresponding to the cache hit rate of first condition and specify parameter value;
Specify the parameter value of parameter to be adjusted to described by the first of the caching to meet corresponding to the cache hit rate of first condition First specify parameter value;
The cache hit rate corresponding to each second specified parameter value in the range of the described second specified parameter value is obtained, and is determined Wherein meet second corresponding to the cache hit rate of second condition and specify parameter value;
Specify the parameter value of parameter to be adjusted to described by the second of the caching to meet corresponding to the cache hit rate of second condition Second specify parameter value.
CN201710069505.7A 2017-02-08 2017-02-08 Application system and its buffer control method and device Pending CN107038127A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710069505.7A CN107038127A (en) 2017-02-08 2017-02-08 Application system and its buffer control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710069505.7A CN107038127A (en) 2017-02-08 2017-02-08 Application system and its buffer control method and device

Publications (1)

Publication Number Publication Date
CN107038127A true CN107038127A (en) 2017-08-11

Family

ID=59533294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710069505.7A Pending CN107038127A (en) 2017-02-08 2017-02-08 Application system and its buffer control method and device

Country Status (1)

Country Link
CN (1) CN107038127A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107645547A (en) * 2017-09-14 2018-01-30 郑州云海信息技术有限公司 Data temperature based on storage device determines method, equipment and system
CN108875046A (en) * 2018-06-28 2018-11-23 郑州云海信息技术有限公司 A kind of storage system access method, device and electronic equipment
CN109818767A (en) * 2017-11-21 2019-05-28 网宿科技股份有限公司 A kind of method, apparatus and storage medium of the adjustment of Redis cluster capacity
CN109947665A (en) * 2017-12-20 2019-06-28 阿里巴巴集团控股有限公司 A kind of caching method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004017640A1 (en) * 2002-08-13 2004-02-26 Renesas Technology Corp. Signal processor and system
CN103246612A (en) * 2012-02-13 2013-08-14 阿里巴巴集团控股有限公司 Method and device for data caching
CN106027642A (en) * 2016-05-19 2016-10-12 乐视控股(北京)有限公司 Method and system for determining number of disks of CDN (Content Delivery Network) node
CN106325776A (en) * 2016-08-24 2017-01-11 浪潮(北京)电子信息产业有限公司 Method and device for real-time adjustment of cache elimination strategy

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004017640A1 (en) * 2002-08-13 2004-02-26 Renesas Technology Corp. Signal processor and system
CN103246612A (en) * 2012-02-13 2013-08-14 阿里巴巴集团控股有限公司 Method and device for data caching
CN106027642A (en) * 2016-05-19 2016-10-12 乐视控股(北京)有限公司 Method and system for determining number of disks of CDN (Content Delivery Network) node
CN106325776A (en) * 2016-08-24 2017-01-11 浪潮(北京)电子信息产业有限公司 Method and device for real-time adjustment of cache elimination strategy

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107645547A (en) * 2017-09-14 2018-01-30 郑州云海信息技术有限公司 Data temperature based on storage device determines method, equipment and system
CN109818767A (en) * 2017-11-21 2019-05-28 网宿科技股份有限公司 A kind of method, apparatus and storage medium of the adjustment of Redis cluster capacity
CN109818767B (en) * 2017-11-21 2021-08-03 网宿科技股份有限公司 Method and device for adjusting Redis cluster capacity and storage medium
CN109947665A (en) * 2017-12-20 2019-06-28 阿里巴巴集团控股有限公司 A kind of caching method and device
CN109947665B (en) * 2017-12-20 2023-06-13 阿里巴巴集团控股有限公司 Caching method and device
CN108875046A (en) * 2018-06-28 2018-11-23 郑州云海信息技术有限公司 A kind of storage system access method, device and electronic equipment

Similar Documents

Publication Publication Date Title
CN108460523A (en) A kind of air control rule generating method and device
CN108305158A (en) A kind of method, apparatus and equipment of trained air control model and air control
CN107679700A (en) Business flow processing method, apparatus and server
CN107038127A (en) Application system and its buffer control method and device
CN109003075A (en) A kind of Risk Identification Method and device
CN107526667A (en) A kind of Indexes Abnormality detection method, device and electronic equipment
JP2020501232A (en) Risk control event automatic processing method and apparatus
CN108345539A (en) A kind of method and apparatus for carrying out AB tests
CN110852503B (en) Payment channel selection method and device and payment channel route
CN108460490A (en) A kind of prediction technique, device and the equipment of business occurrence quantity
CN107633347A (en) A kind of data target statistical method and device
CN106897144A (en) A kind of resource allocation methods and device
CN108243032A (en) A kind of acquisition methods of class of service information, device and equipment
CN107578338A (en) A kind of service publishing method, device and equipment
CN108615184A (en) A kind of method and device of book keeping operation
CN108681542A (en) A kind of method and device of abnormality detection
CN110297837A (en) A kind of data-updating method and device, data query method and apparatus
CN105893224A (en) Resource measurement method and device
CN109597678A (en) Task processing method and device
CN109615171A (en) Characteristic threshold value determines that method and device, problem objects determine method and device
CN109345221A (en) The checking method and device of resource circulation
CN108255471A (en) A kind of system configuration item configuration device based on configuration external member, method and apparatus
CN110264213A (en) A kind of processing method of information, device and equipment
CN109919357A (en) A kind of data determination method, device, equipment and medium
CN108921375A (en) A kind of data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20201016

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201016

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: Greater Cayman, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20170811

RJ01 Rejection of invention patent application after publication