CN103685062A - Cache management method and device - Google Patents

Cache management method and device Download PDF

Info

Publication number
CN103685062A
CN103685062A CN201310637601.9A CN201310637601A CN103685062A CN 103685062 A CN103685062 A CN 103685062A CN 201310637601 A CN201310637601 A CN 201310637601A CN 103685062 A CN103685062 A CN 103685062A
Authority
CN
China
Prior art keywords
queue
flow queue
flow
cache
threshold
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
CN201310637601.9A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310637601.9A priority Critical patent/CN103685062A/en
Publication of CN103685062A publication Critical patent/CN103685062A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

An embodiment of the invention provides a cache management method and device. The cache management method includes: judging whether a stream queue with queue length exceeding a queue cache threshold exists in first stream queues or not; if so, executing dequeuing operation to the stream queue exceeding the queue cache threshold. By the method and device, utilization rate of caches can be increased.

Description

Buffer memory management method and device
Technical field
The embodiment of the present invention relates to network technology, relates in particular to a kind of buffer memory management method and device.
Background technology
Along with increasing rapidly of multimedia data stream demand, it is especially important that the cache management of switch becomes.Shared buffer memory is conventional buffer structure in machine in return, and all input and output ports are all shared a spatial cache.The management method of conventional shared buffer memory in prior art, mainly comprises static threshold method and dynamic threshold method.
Static threshold method, for being fixed as the buffer memory that each queue and/or port assignment are certain, other buffer memorys or port can not be seized, although can guarantee the fairness that buffer memory is shared, the utilance of buffer memory is lower.Dynamic threshold method, for each queue and/or the certain buffer memory occupation proportion factor of port arrangement, in application process, according to remaining shared buffer memory, is each queue assignment available cache memory dynamically.The method is because layoutprocedure makes being subject to certain restrictions of the Buffer Utilization that can improve compared with complicated.
In prior art, the Buffer Utilization of buffer memory management method is lower.
Summary of the invention
The embodiment of the present invention provides a kind of buffer memory management method and device, to solve the low problem of Buffer Utilization in prior art.
First aspect, the embodiment of the present invention provides a kind of buffer memory management method, comprising:
Whether judge in first-class queue exists queue length to exceed the flow queue of queue buffer memory threshold value;
If exist queue length to exceed the flow queue of described queue buffer memory threshold value in described first-class queue, the described flow queue that exceeds described queue buffer memory threshold value carried out out to team's operation.
According to first aspect, in the first mode in the cards of first aspect, the described queue length that judges first-class queue also comprises before whether exceeding queue buffer memory threshold value:
Judge whether current system exists port length to exceed the virtual port of buffer to ports threshold value;
If described current system does not exist port length to exceed the virtual port of buffer to ports threshold value, the flow queue that described current system is had is defined as described first-class queue.
According to the first of first aspect mode in the cards, in the second mode in the cards, described queue buffer memory threshold value comprises the buffer memory threshold value of at least two different priorities;
Describedly judge in first-class queue whether exist queue length to exceed the flow queue of queue buffer memory threshold value, to comprise:
The buffer memory threshold value of limit priority in the queue length of flow queue in described first-class queue and described queue buffer memory threshold value is compared, judge in first-class queue and whether exist queue length to exceed the flow queue of the buffer memory threshold value of described limit priority;
If exist queue length to exceed the flow queue of described queue buffer memory threshold value in described first-class queue, the described flow queue that exceeds described queue buffer memory threshold value is carried out out to team's operation, comprising:
If exist queue length to exceed the flow queue of the buffer memory threshold value of described limit priority in described first-class queue, the described flow queue that exceeds the buffer memory threshold value of described limit priority carried out out to team's operation.
According to the second of first aspect mode in the cards, in the third mode in the cards, described method, also comprises:
If do not exist queue length to exceed the flow queue of the buffer memory threshold value of described limit priority in described first-class queue, determine the virtual port of described current system middle port buffer memory threshold value and port length difference minimum, and the flow queue that the virtual port of described buffer to ports threshold value and port length difference minimum is had is defined as second queue;
According to the priority orders of each buffer memory threshold value in described queue buffer memory threshold value, judge successively in described second queue and whether exist queue length to exceed the flow queue of the buffer memory threshold value in described queue buffer memory threshold value;
If exist queue length to exceed the flow queue of a buffer memory threshold value in described second queue, carry out out team's operation to exceeding the flow queue of this buffer memory threshold value.
According to the third mode in the cards of first aspect, in the 4th kind of mode in the cards, described method, also comprises:
If do not exist queue length to exceed the flow queue of the buffer memory threshold value of lowest priority in described queue buffer memory threshold value in described second queue, send the first alarm prompt; Described the first alarm indication information comprises configuration error information.
According to the second of first aspect mode in the cards, in the 5th kind of mode in the cards, if described current system exists port length to exceed the virtual port of buffer to ports threshold value, determine the virtual port of described current system middle port length and buffer to ports threshold difference maximum, and the flow queue that the virtual port of described port length and buffer to ports threshold difference maximum is had is defined as described first-class queue.
According in the 5th of first aspect the kind of mode in the cards, in the 6th kind of mode in the cards, describedly judge in first-class queue whether exist queue length to exceed the flow queue of queue buffer memory threshold value, also to comprise:
If do not exist queue length to exceed the flow queue of the buffer memory threshold value of described limit priority in described first-class queue, according to the priority orders of each buffer memory threshold value in described queue buffer memory threshold value, judge successively in described first-class queue and whether exist queue length to exceed the flow queue of the buffer memory threshold value in described queue buffer memory threshold value;
If exist queue length to exceed the flow queue of described queue buffer memory threshold value in described first-class queue, the described flow queue that exceeds described queue buffer memory threshold value is carried out out to team's operation, also comprise:
If exist queue length to exceed the flow queue of a buffer memory threshold value in described first-class queue, carry out out team's operation to exceeding the flow queue of this buffer memory threshold value.
According to the 6th of first aspect the kind of mode in the cards, in the 7th kind of mode in the cards, described method, also comprises:
If do not exist queue length to exceed the flow queue of the buffer memory threshold value of lowest priority in described queue buffer memory threshold value in described first-class queue, send the second alarm prompt; Described the second alarm indication information comprises configuration error information.
According to the 4th of first aspect the kind or the 7th kind of mode in the cards, in the 8th kind of mode in the cards, described, whether exist in judging first-class queue before queue length exceeds the flow queue of queue buffer memory threshold value, also comprise:
According to the priority of described first-class queue, described queue buffer memory threshold value is set.
According to the first of first aspect mode in the cards, the 9th kind of mode in the cards, the buffer to ports threshold value sum of the flow queue having in described current system is less than or equal to N times of shared buffer memory; Total buffer memory of described current system comprises described shared buffer memory;
Described N is the buffer to ports threshold value sum of flow queue that has in described current system and the ratio of the real cache of described current system.
According to the 9th of first aspect the kind of mode in the cards, in the tenth kind of mode in the cards, describedly judge that whether current system exists before port length exceeds the virtual port of buffer to ports threshold value, also comprises:
Judge whether the free buffer of described current system is less than the threshold value of protection buffer memory; Total buffer memory of described current system, also comprises described protection buffer memory;
When the free buffer of described current system is less than the threshold value of described protection buffer memory, carries out and judge whether described current system exists port length to exceed the operation of the virtual port of buffer to ports threshold value.
According to the tenth of first aspect the kind of mode in the cards, in the 11 kind of mode in the cards, before whether the described free buffer that judges described current system is less than protection buffer memory threshold value, also comprise:
According to the time delay of process information in described current system, described protection buffer memory is configured.
According to the 8th of first aspect the kind of mode in the cards, in the 12 kind of mode in the cards, described the described flow queue that exceeds queue buffer memory threshold value is carried out out to team operation, comprising:
In the described flow queue that exceeds queue buffer memory threshold value, select a flow queue;
The information that the flow queue of described selection is corresponding passes to queue management device, so that described queue management device goes out team's operation to the information and executing of a storage bag in information corresponding to the flow queue of described selection.
According to the 12 of first aspect the kind of mode in the cards, in the 13 kind of mode in the cards, described method, also comprises:
The aging Indication message corresponding according to the flow queue of described selection, judges whether the flow queue of described selection is to need aging flow queue;
The aging flow queue of described needs is carried out to aging operation.
According to the 12 of first aspect the kind of mode in the cards, in the 14 kind of mode in the cards, described information corresponding to the flow queue of described selection is passed to queue management device after, also comprise:
According to described queue management device, in to information corresponding to the flow queue of described selection, the information and executing of a storage bag goes out team's operation, and what produce afterwards goes out group Indication message, and the value that goes out group counter that the flow queue of described selection is corresponding adds 1.
According to the 14 of first aspect the kind of mode in the cards, in the 15 kind of mode in the cards, the described aging Indication message corresponding according to the flow queue of described selection, judges whether the flow queue of described selection is to need aging flow queue, comprising:
If described in go out group counter value be greater than out group frequency threshold value, the aging Indication message that the flow queue of described selection is corresponding is configured to 1; If described in go out group counter value go out group frequency threshold value described in being less than or equal to, the aging Indication message that the flow queue of described selection is corresponding is configured to 0;
In predetermined period, if aging Indication message corresponding to the flow queue of described selection is continuously 1, determine that the flow queue of described selection is the flow queue that described needs are aging.
According to the 15 of first aspect the kind of mode in the cards, in the 16 kind of mode in the cards, after the flow queue of described definite described selection is the flow queue that described needs are aging, also comprise:
Reduce the configuration of the queue buffer memory threshold value that the flow queue of described selection is corresponding;
In described predetermined period, if aging Indication message corresponding to the flow queue of described selection is continuously 0, recover the configuration of the queue buffer memory threshold value that the flow queue of described selection is corresponding.
Second aspect, the embodiment of the present invention also provides a kind of cache management device, comprising:
Judge module, for judging whether first-class queue exists queue length to exceed the flow queue of queue buffer memory threshold value;
Executive Module, if exist queue length to exceed the flow queue of described queue buffer memory threshold value for described first-class queue, carries out out team's operation to the described flow queue that exceeds described queue buffer memory threshold value.
According to second aspect, in the first mode in the cards of second aspect, described judge module, also, for before whether exceeding queue buffer memory threshold value in the described queue length that judges first-class queue, judges whether current system exists port length to exceed the virtual port of buffer to ports threshold value;
Described device, also comprises:
Determination module, if do not exist port length to exceed the virtual port of buffer to ports threshold value for described current system, the flow queue that described current system is had is defined as described first-class queue.
According to the first of second aspect mode in the cards, in the second mode in the cards, described queue buffer memory threshold value comprises the buffer memory threshold value of at least two different priorities;
Described judge module, for the buffer memory threshold value of limit priority in the queue length of described first-class queue flow queue and described queue buffer memory threshold value is compared, judge in first-class queue and whether exist queue length to exceed the flow queue of the buffer memory threshold value of described limit priority;
Described Executive Module, if exist queue length to exceed the flow queue of the buffer memory threshold value of described limit priority for described first-class queue, carries out out team's operation to the described flow queue that exceeds the buffer memory threshold value of described limit priority.
According to the second of second aspect mode in the cards, in the third mode in the cards, described determination module, if also do not exist queue length to exceed the flow queue of the buffer memory threshold value of described limit priority for described first-class queue, determine the virtual port of described current system middle port buffer memory threshold value and port length difference minimum, and the flow queue that the virtual port of described buffer to ports threshold value and port length difference minimum is had is defined as second queue;
Whether described judge module, also, for according to the priority orders of described each buffer memory threshold value of queue buffer memory threshold value, judge successively in described second queue and exist queue length to exceed the flow queue of the buffer memory threshold value in described queue buffer memory threshold value;
Described Executive Module, if also exist queue length to exceed the flow queue of a buffer memory threshold value for described second queue, carries out out team's operation to exceeding the flow queue of this buffer memory threshold value.
According to the third mode in the cards of second aspect, in the 4th kind of mode in the cards, described device, also comprises:
The first sending module, if do not exist queue length to exceed the flow queue of the buffer memory threshold value of lowest priority in described queue buffer memory threshold value for described second queue, sends the first alarm prompt; Described the first alarm indication information comprises configuration error information.
According to the second of second aspect mode in the cards, in the 5th kind of mode in the cards, described determination module, if also exist port length to exceed the virtual port of buffer to ports threshold value for described current system, determine the virtual port of described current system middle port length and buffer to ports threshold difference maximum, and the flow queue that the virtual port of described port length and buffer to ports threshold difference maximum is had is defined as described first-class queue.
According to the 5th of second aspect the kind of mode in the cards, in the 6th kind of mode in the cards, described judge module, if also do not exist queue length to exceed the flow queue of the buffer memory threshold value of described limit priority for described first-class queue, according to the priority orders of each buffer memory threshold value in described queue buffer memory threshold value, judge successively in described first-class queue and whether exist queue length to exceed the flow queue of the buffer memory threshold value in described queue buffer memory threshold value;
Described Executive Module, if also exist queue length to exceed the flow queue of a buffer memory threshold value for described first-class queue, carries out out team's operation to exceeding the flow queue of this buffer memory threshold value.
According to the 6th of second aspect the kind of mode in the cards, in the 7th kind of mode in the cards, described device, also comprises:
The second sending module, if do not exist queue length to exceed the flow queue of the buffer memory threshold value of lowest priority in described queue buffer memory threshold value for described first-class queue, sends the second alarm prompt; Described the second alarm indication information comprises configuration error information.
According to the 4th of second aspect the kind or the 7th kind of mode in the cards, in the 8th kind of mode in the cards, described device, also comprises:
Configuration module, for judging that described whether first-class queue exists before queue length exceeds the flow queue of queue buffer memory threshold value, according to the priority of described first-class queue, arranges described queue buffer memory threshold value.
According to the first of second aspect mode in the cards, in the 9th kind of mode in the cards, the buffer to ports threshold value sum of the flow queue having in described current system is less than or equal to N times of shared buffer memory; Total buffer memory of described current system comprises described shared buffer memory;
Described N is the buffer to ports threshold value sum of flow queue that has in described current system and the ratio of the real cache of described current system.
According to the 9th of second aspect the kind of mode in the cards, in the tenth kind of mode in the cards, described judge module, also for described, judge that whether current system exists before port length exceeds the virtual port of buffer to ports threshold value, judges whether the free buffer of described current system is less than the threshold value of protection buffer memory; Total buffer memory of described current system, also comprises described protection buffer memory; When the free buffer of described current system is less than the threshold value of described protection buffer memory, carries out and judge whether described current system exists port length to exceed the operation of the virtual port of buffer to ports threshold value.
According to the tenth of second aspect the kind of mode in the cards; in the 11 kind of mode in the cards; described configuration module; also for before whether being less than protection buffer memory threshold value in the described free buffer that judges described current system; according to the time delay of process information in described current system, described protection buffer memory is configured.
According to the 8th of second aspect the kind of mode in the cards, in the 12 kind of mode in the cards, described Executive Module, specifically for selecting a flow queue in the described flow queue that exceeds queue buffer memory threshold value;
Described sending module, also for information corresponding to the flow queue of described selection is passed to queue management device, so that described queue management device goes out team's operation to the information and executing of a storage bag in information corresponding to the flow queue of described selection.
According to the 12 of second aspect the kind of mode in the cards, in the 13 kind of mode in the cards, described judge module, also for the aging Indication message corresponding according to the flow queue of described selection, judges whether the flow queue of described selection is to need aging flow queue;
Described Executive Module, also for carrying out aging operation to the aging flow queue of described needs.
According to the 12 of second aspect the kind of mode in the cards, in the 14 kind of mode in the cards, described device, also comprises:
Counting module, for described information corresponding to the flow queue of described selection is passed to queue management device after, according to described queue management device, in to information corresponding to the flow queue of described selection, the information and executing of a storage bag goes out team's operation, what produce afterwards goes out group Indication message, and the value that goes out group counter that the flow queue of described selection is corresponding adds 1.
According to the 14 of second aspect the kind of mode in the cards, in the 15 kind of mode in the cards, described configuration module, if also for described in go out group counter value be greater than out group frequency threshold value, the aging Indication message that the flow queue of described selection is corresponding is configured to 1; If described in go out group counter value go out group frequency threshold value described in being less than or equal to, the aging Indication message that the flow queue of described selection is corresponding is configured to 0;
Described determination module, also in predetermined period, if aging Indication message corresponding to the flow queue of described selection is continuously 1, determines that the flow queue of described selection is the flow queue that described needs are aging.
According to the 15 of second aspect the kind of mode in the cards, in the 16 kind of mode in the cards, described configuration module, also for after the described flow queue of determining described selection is the flow queue that described needs are aging, reduce the configuration of the queue buffer memory threshold value that the flow queue of described selection is corresponding; In described predetermined period, if aging Indication message corresponding to the flow queue of described selection is continuously 0, recover the configuration of the queue buffer memory threshold value that the flow queue of described selection is corresponding.
The buffer memory management method that the embodiment of the present invention provides and device, by queue length in first-class queue being exceeded to the flow queue of queue buffer memory threshold value, carry out out team and operate, the shared spatial cache of the flow queue cache information current with it adapted, improve Buffer Utilization.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, by the accompanying drawing of required use in embodiment or description of the Prior Art being done to one, introduce simply below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The flow chart of the buffer memory management method that Fig. 1 provides for the embodiment of the present invention one;
The flow chart of the buffer memory management method that Fig. 2 provides for the embodiment of the present invention two;
The flow chart of the buffer memory management method that Fig. 3 provides for the embodiment of the present invention three;
The flow chart of the buffer memory management method that Fig. 4 provides for the embodiment of the present invention four;
The flow chart of the buffer memory management method that Fig. 5 provides for the embodiment of the present invention five;
The flow chart of the buffer memory management method that Fig. 6 provides for the embodiment of the present invention six;
The flow chart of the buffer memory management method that Fig. 7 provides for the embodiment of the present invention seven;
The structural representation of the cache management device that Fig. 8 provides for the embodiment of the present invention eight.
Embodiment
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
It should be noted that, the related buffer memory threshold value of various embodiments of the present invention is releases threshold value (Push Out with Threshold is called for short POT), related goes out team's operation, refers to Push Out and goes out team, and improperly go out team.Normally going out team refers to, to carry out out cache information in the flow queue of team and move to the process of internal memory or the hard disk of current system, yet Push Out goes out team to be referred to, the cache information that this is carried out out in the flow queue of team is released and is abandoned, thereby reaches the process that buffer memory discharges.
Embodiment mono-
The flow chart of the buffer memory management method that Fig. 1 provides for the embodiment of the present invention one.The method is carried out by cache management device, and this device is realized in the mode of hardware and/or software conventionally, is integrated in the network switch or routing device.The method of the present embodiment comprises the steps:
Step 101, judge in first-class queue whether exist queue length to exceed the flow queue of queue buffer memory threshold value.
Particularly, according to the difference of customer service demand, Business Stream corresponding to different flow queue (Flow Queue is called for short FQ), this different flow queue can be used for storing the data message of this different business stream.The queue length of flow queue can be for example the bit number of the data message stored of flow queue.The data message that flow queue is stored, changes along with the variation of the current processing business of user, and the queue length of this flow queue also changes along with the variation of the current processing business of user so.The data message of Business Stream can be multi-media network data, according to the difference of customer service demand, can be, the network data of internet, as voice, video etc., the streaming data information such as Web TV, the networking telephone and related protocol message or configuration information.
The queue buffer memory threshold value of various flows queue can be identical, also can be different.When the type of the corresponding Business Stream of various flows queue institute's storing data information is identical, the queue buffer memory threshold value of this various flows queue is identical; When the corresponding traffic flow types of various flows queue institute storing data information is different, the queue buffer memory threshold value of this various flows queue is different.Wherein, queue buffer memory threshold value can represent by fq_thld, and queue length can represent by fq_qlen.
This first-class queue comprises a plurality of flow queues.Whether judge in this first-class queue exists queue length to exceed the flow queue of queue buffer memory threshold value, can be by the queue length of the plurality of flow queue respectively the queue buffer memory threshold value corresponding with it compare to judge, can also be to judge according to the queue of the flow queue indication of transfiniting.Queue is transfinited to indicate and for example can be represented that the queue length of this flow queue is greater than the flow queue of its corresponding queue buffer memory threshold value by flag bit 1, corresponding, can represent that the queue length of this flow queue is less than or equal to the flow queue of its corresponding queue buffer memory threshold value by flag bit 0.
If exist queue length to exceed the flow queue of queue buffer memory threshold value in the first-class queue of step 102, the flow queue that this is exceeded to queue buffer memory threshold value is carried out out team's operation.
Particularly, the queue length of flow queue does not exceed queue buffer memory threshold value, and namely the current spatial cache distributing for this flow queue is sufficient, can be stored normally and transfer, thereby the processing speed of raising system reduces time delay by the information of this flow queue buffer memory.
Corresponding, the queue length of flow queue exceeds queue buffer memory threshold value, the current shared spatial cache of this flow queue has exceeded the spatial cache configuring for it, because the spatial cache that current system is total is certain, that is to say that this flow queue has taken script and by configuration, distributed to the spatial cache of other flow queues, may affect other flow queue memory buffers information, Buffer Utilization is lower.Therefore, the flow queue that need to exceed queue buffer memory threshold value to this is carried out out team's operation, to vacate the spatial cache of other shared flow queues of the former flow queue that should exceed queue buffer memory threshold value, in the situation that the total spatial cache of current system is certain, guarantee better the utilance of buffer memory.
To exceeding the flow queue of queue buffer memory threshold value in first-class queue, carry out out team's operation, can be that the flow queue that all queue lengths in this first-class queue are exceeded to queue buffer memory threshold value is all carried out out team's operation, also can be that queue length exceeds and in the flow queue of queue buffer memory threshold value, selects the flow queue of predetermined number to carry out out team's operation in this first-class queue.
To exceeding the flow queue of queue buffer memory threshold value, carry out out team's operation, refer to, the data message that the flow queue that exceeds queue buffer memory threshold value is stored is released corresponding flow queue, can be that those data messages are abandoned, so that this flow queue is carried out to buffer memory release, thereby improve Buffer Utilization.
The buffer memory management method that the present embodiment provides, by queue length in first-class queue being exceeded to the flow queue of queue buffer memory threshold value, carry out out team and operate, the traffic data information of the shared spatial cache storage current with it of flow queue is adapted, improve Buffer Utilization.
Meanwhile, owing to having improved the utilance of buffer memory, thereby avoid buffer memory to take the caused data cached problem abandoning, thereby the present embodiment scheme also reduces the grouping packet loss of system, can meet the quality of service requirement of multimedia network communication.
Embodiment bis-
The present embodiment also provides a kind of buffer memory management method.The flow chart of the buffer memory management method that Fig. 2 provides for the embodiment of the present invention two.In step 101, judge in the above-described embodiments in first-class queue and whether exist queue length to exceed the flow queue of queue buffer memory threshold value, before, the method, also comprises:
Step 201, judge whether current system exists port length to exceed the virtual port of buffer to ports threshold value.
In the cache management scheme of this embodiment, by the spatial cache of current system virtual be divided into N part, this N part is N virtual port.The corresponding a plurality of flow queues of each virtual port, the corresponding relation of this virtual port and flow queue, as can be by configuring the mode of mapping relations table, for each virtual port configures its corresponding flow queue.For each virtual port configures its corresponding flow queue, can be the priority height according to flow queue, flow queue same or that approach same priority is mapped to same virtual port.The priority of flow queue, the type that can be the traffic data information of storing according to flow queue is determined, as higher in the flow queue priority of storage protocol message or configuration information, its priority of flow queue of store video class data is lower, and for the priority of the flow queue of voice data, high compared with the priority of the flow queue of video class data.
The port length of virtual port, can represent by vi_qlen, can be the queue length sum of the corresponding flow queue of current this virtual port.Due to the corresponding various flows queue of each virtual port, the priority of its this various flows queue is different, and the corresponding buffer to ports threshold value of each virtual port is different so.Wherein, buffer to ports threshold value can represent by vi_thld, and the corresponding buffer to ports threshold value of each virtual port can be the queue buffer memory threshold value sum of the corresponding flow queue of each virtual port.
According to the difference of cache management strategy, by the virtual virtual port that is divided into different numbers of the spatial cache of current system.
Whether judge in current system exists port length to exceed the virtual port of buffer to ports threshold value, can be by the queue length of a plurality of virtual ports of dividing respectively the buffer to ports threshold value corresponding with it compare to judge, can also be that the indication of transfiniting judges according to the port of virtual port.Port transfinites to indicate and for example can represent that port length is greater than the virtual port of buffer to ports threshold value by flag bit 1, corresponding, can represent that port length is less than or equal to the virtual port of buffer to ports threshold value by flag bit 0.
If step 202 current system does not exist port length to exceed the virtual port of buffer to ports threshold value, the flow queue that this current system is had is defined as first-class queue.
Port length does not exceed the virtual port of buffer to ports threshold value, refer to, the queue length sum of the corresponding a plurality of flow queues of this virtual port, it is port length, do not exceed the buffer to ports threshold value of this virtual port, and may exist queue length to exceed the flow queue of queue buffer memory threshold value in the corresponding a plurality of flow queues of this virtual port.Therefore, if determine in current system and do not exist port length to exceed the virtual port of buffer to ports threshold value by above-mentioned steps 201, also need using flow queues all in current system as first-class queue, to carry out the scheme of above-described embodiment, judge in the flow queue that current system has and whether exist queue length to exceed the flow queue of queue buffer memory threshold value, the flow queue that then queue length is exceeded to queue buffer memory threshold value goes out team.
The present embodiment scheme, if current system does not exist port length to exceed the virtual port of buffer to ports threshold value, the flow queue that this current system is had is as first-class queue, then carry out the judgement that queue is transfinited, on the basis of above-described embodiment scheme, the scope of judgement flow queue is more accurate, thereby guarantees better the utilance of buffer memory.
Further, in the present embodiment scheme, queue buffer memory threshold value comprises the buffer memory threshold value of at least two different brackets.
The buffer memory threshold value of these at least two different brackets, its priority is higher, represents that the buffer memory threshold value of this grade is larger, corresponding, the buffer memory threshold value that priority is lower is less.
In such scheme, in step 101, judge in first-class queue and whether exist queue length to exceed the flow queue of queue buffer memory threshold value, specifically to comprise:
Step 203, the buffer memory threshold value of limit priority in the queue length of flow queue in first-class queue and this queue buffer memory threshold value is compared, judge in this first-class queue and whether exist queue length to exceed the flow queue of the buffer memory threshold value of this limit priority.
If exist queue length to exceed the flow queue of this queue buffer memory threshold value in such scheme in step 100 in first-class queue, the flow queue that this is exceeded to this queue buffer memory threshold value is carried out out team's operation, comprising:
If exist queue length to exceed the flow queue of the buffer memory threshold value of this limit priority in this first-class queue of step 204, carry out out team's operation to exceeding the flow queue of the buffer memory threshold value of this limit priority.
, also there is the another kind of situation outside step 204 in the judged result of above-mentioned steps 203, comprising:
If do not exist queue length to exceed the flow queue of the buffer memory threshold value of this limit priority in this first-class queue of step 205, determine the virtual port of this current system middle port buffer memory threshold value and port length difference minimum, and the flow queue that the virtual port of this buffer to ports threshold value and port length difference minimum is had is defined as second queue.
If determine by step 201 virtual port that current system has, its port length does not all surpass buffer to ports threshold value, and obtain by step 203 judgement in such scheme the flow queue that current system has, its queue length does not all surpass the buffer memory threshold value of limit priority, only can represent current time, the buffer memory of system is in a safe condition.Therefore, also need the flow queue that the virtual port of this current system middle port buffer memory threshold value and port length difference minimum is had as second queue, namely follow-up, port length most possibly exceeds the virtual port of buffer to ports threshold value, can be described as the virtual port that has potential hazard, corresponding flow queue.
Step 206, according to the priority orders of each buffer memory threshold value in this queue buffer memory threshold value, judge successively in this second queue and whether exist queue length to exceed the flow queue of the buffer memory threshold value in this queue buffer memory threshold value.
If so, perform step 207; If not, continue to carry out this step 206.Priority orders according to buffer memory threshold value in queue buffer memory threshold value, judges successively, if exist queue length to exceed the flow queue of a buffer memory threshold value in this second queue, this buffer memory threshold value buffer memory threshold value is below without judging.When judging the buffer memory threshold value of an extremely last grade, if so, continue execution step 207; If not, perform step 208.Owing to being according to the priority orders of buffer memory threshold value in queue buffer memory threshold value, judge successively, the buffer memory threshold value of last grade is the minimum buffer memory threshold value of this queue buffer memory threshold value medium priority.
If exist queue length to exceed the flow queue of a buffer memory threshold value in this second queue of step 207, carry out out team's operation to exceeding the flow queue of this buffer memory threshold value.
If do not exist queue length to exceed the flow queue of the buffer memory threshold value of lowest priority in this queue buffer memory threshold value in this second queue of step 208, send the first alarm prompt.This first alarm indication information comprises configuration error information.
If, in this second queue, do not exist queue length to exceed the flow queue of the buffer memory threshold value of lowest priority in this queue buffer memory threshold value, illustrate that pre-configured queue buffer memory threshold value is excessive.Thereby this configuration error prompting message can configure excessive prompting message for threshold value.
Step 206~step 208, by the relatively judgement of ladder, determine in this second queue, queue length most possibly exceeds the flow queue of queue buffer memory threshold value, carry out out team's operation, thereby can provide a more perfect cache management scheme, it not only can be to the flow queue in " buffer memory critical days ", be that the flow queue that queue length exceeds queue buffer memory threshold value is carried out out team's operation, also the flow queue classification in " potential buffer memory critical days " is judged, cache management scheme is become more meticulous more, guarantee better the utilance of buffer memory.
Further, on the basis of such scheme, in step 101, judge and in first-class queue, whether exist before queue length exceeds the flow queue of queue buffer memory threshold value, also comprise:
According to the priority of first-class queue, this queue buffer memory threshold value is configured.
The priority of first-class queue is higher, and the queue buffer memory threshold value of configuration is larger, corresponding, the priority of first-class queue is lower, and the queue buffer memory threshold value of configuration is less.
The buffer to ports threshold value sum of the virtual port having in current system further, is less than or equal to N times of shared buffer memory; Total buffer memory of this current system comprises shared buffer memory;
This N is the ratio of the buffer memory threshold value of limit priority and the buffer memory threshold value of lowest priority.
Before shared buffer memory does not also exhaust, the flow queue of any priority and/or message all preferentially take the space of this shared buffer memory, and different flow queues and/or message adopt the mode that first come first serve, take certain spatial cache.
The buffer to ports threshold value sum of the virtual port having in current system, refers to, the buffer memory threshold value of current system.The buffer memory threshold value configuration of current system is too small, and its buffer memory is difficult to be fully used, so this buffer memory threshold value at least should be greater than shared buffer memory; If configure excessively, be difficult to, by this buffer memory management method, flow queue is gone out to team, be prone to configuration error prompting.
The buffer memory threshold value of current system also equals high level cache threshold value sum in the queue buffer memory threshold value of the flow queue that has in current system.The queue buffer memory threshold value of flow queue, for example, can comprise and the buffer memory threshold value of four grades be followed successively by according to the priority fq_thld, fq_thld*1/2, fq_thld*1/4, fq_thld*1/8.
The ratio of the buffer memory threshold value of limit priority and the buffer memory threshold value of lowest priority, is 8, and the buffer to ports threshold value sum of the virtual port having in current system is less than or equal to 8 times of shared buffer memory.If the buffer memory threshold value of lowest priority is fq_thld*1/16, the buffer to ports threshold value sum of the virtual port having in current system is less than or equal to 16 times of shared buffer memory.
This embodiment scheme, on the basis of above-described embodiment scheme, a more perfect cache management scheme is provided, it not only can be to the flow queue in " buffer memory critical days ", be that the flow queue that queue length exceeds queue buffer memory threshold value is carried out out team's operation, also the flow queue classification in " potential buffer memory critical days " is judged, cache management scheme is become more meticulous more, guarantee better the utilance of buffer memory.
Embodiment tri-
The present embodiment also provides a kind of buffer memory management method.The flow chart of the buffer memory management method that Fig. 3 provides for the embodiment of the present invention three., also there is another kind of situation in the judged result of step 201 in the above-described embodiments except above-mentioned steps 202, specifically comprises:
If step 301 current system exists port length to exceed the virtual port of buffer to ports threshold value, determine the virtual port of this current system middle port length and buffer to ports threshold difference maximum, and the flow queue that the virtual port of this port length and buffer to ports threshold difference maximum is had is defined as this first-class queue.
Particularly, the present embodiment, on the basis of above-described embodiment 2 schemes, also provides a kind of current system to exist port length to exceed the buffer memory management method in the virtual port situation of buffer to ports threshold value.The method, by the virtual port of current system middle port length and buffer to ports threshold difference maximum, the flow queue having carries out as first-class queue the operation that queue is transfinited and judged.
On the basis of such scheme, in such scheme, in step 101, judge in first-class queue and whether exist queue length to exceed the flow queue of queue buffer memory threshold value, also to comprise:
If do not exist queue length to exceed the flow queue of the buffer memory threshold value of this limit priority in this first-class queue of step 302, according to the priority orders of each buffer memory threshold value in described queue buffer memory threshold value, judge successively in this first-class queue and whether exist queue length to exceed the flow queue of the buffer memory threshold value in this queue buffer memory threshold value.
Corresponding, if exist queue length to exceed the flow queue of queue buffer memory threshold value in such scheme in step 102 in first-class queue, to exceeding the flow queue of this queue buffer memory threshold value, carry out out team's operation, also comprise:
If exist queue length to exceed the flow queue of a buffer memory threshold value in this first-class queue of step 303, carry out out team's operation to exceeding the flow queue of this buffer memory threshold value.
Further, the method, also comprises:
If do not exist queue length to exceed the flow queue of the buffer memory threshold value of lowest priority in this queue buffer memory threshold value in this first-class queue of step 304, send the second alarm prompt; This second alarm indication information comprises configuration error information.
Further, in such scheme step 101, judge and in first-class queue, whether exist before queue length exceeds the flow queue of queue buffer memory threshold value, also comprise:
According to the priority of this first-class queue, this queue buffer memory threshold value is set.
The buffer to ports threshold value sum of the flow queue having in current system is less than or equal to N times of shared buffer memory; Total buffer memory of this current system comprises shared buffer memory;
N is the buffer to ports threshold value sum of flow queue that has in this current system and the ratio of the real cache of this current system.
The scheme of this embodiment scheme and above-described embodiment, be applicable to respectively no scene, it not only can be to the flow queue in " buffer memory critical days ", be that the flow queue that queue length exceeds queue buffer memory threshold value is carried out out team's operation, also the flow queue classification in " potential buffer memory critical days " is judged, cache management scheme is become more meticulous more, guarantee better the utilance of buffer memory.
Embodiment tetra-
The present embodiment also provides a kind of buffer memory management method.The flow chart of the buffer memory management method that Fig. 4 provides for the embodiment of the present invention four.In above-described embodiment scheme, step 201 judges whether current system exists before port length exceeds the virtual port of buffer to ports threshold value, and the method also comprises:
Whether step 401, the free buffer that judges current system are less than the threshold value of protection buffer memory.
For making this cache management scheme operation more stable, on the basis of such scheme, the total spatial cache of current system also comprises protection buffer memory except shared buffer memory.Protection buffer memory, for going out group process carrying out flow queue, absorbs and processes the message in the path delay of time.Wherein, free buffer can represent by idle_buf, protects buffer memory threshold value, can represent by glb_buf.
The free buffer of current system refers to, and total spatial cache deducts, the corresponding port length sum of all virtual ports in current system, the real cache of current system namely, remaining spatial cache.Whether the free buffer that judges current system is less than protection buffer memory threshold value, and actual is whether the shared buffer memory that judges current system exhausts.
If the free buffer of this current system of step 402 is less than the threshold value of this protection buffer memory, carries out and judge whether this current system exists port length to exceed the operation of the virtual port of buffer to ports threshold value.
The spatial cache of front system is less than protection buffer memory threshold value; be that the shared buffer memory of saying current system exhausts, need to carry out cache management strategy, wherein predetermined flow queue is gone out to team; to vacate corresponding spatial cache, thereby guarantee the total Buffer Utilization of current system.
If the free buffer of this current system is more than or equal to this protection buffer memory threshold value, illustrates that the shared buffer memory of current system also has residue, thereby without by cache management strategy, carry out the team that of flow queue.
Further, before step 401 judges whether the free buffer of described current system is less than protection buffer memory threshold value, also comprise:
According to the time delay of process information in this current system, the threshold value of protection buffer memory is set.
As larger in the time delay of current system process information; may cause after flow queue carries out out team; the corresponding queue length of this flow queue does not upgrade in time; thereby cause the free buffer of current system not upgrade in time; and if the protection buffer memory threshold value setting of current system is too small; can make this current system to go out team too frequent, easily cause overflowing of cache information, thereby affect the stability of system.Thereby as larger in the time delay of current system process information, configurable large protection buffer memory threshold value, can avoid overflowing of cache information.Corresponding, as less in the time delay of current system process information, its protection buffer memory threshold value is configurable less.
The present embodiment scheme, can avoid overflowing of cache information, thereby guarantees the stability of current system.
Embodiment five
The present embodiment also provides a kind of buffer memory management method, this embodiment explains above-described embodiment scheme by instantiation, wherein queue buffer memory threshold value comprises: fq_thld, fq_thld*1/2, fq_thld*1/4, fq_thld*1/8, fq_thld priority is the highest, and fq_thld*1/8 priority is minimum.The flow chart of the buffer memory management method that Fig. 5 provides for the embodiment of the present invention five.As shown in Figure 5, the method comprises:
The idle_buf<glb_buf of step 501, judgement current system.If so, perform step 502; If not, this cache management scheme finishes.
Step 502, judge whether current system exists the virtual port of vi_qlen>vi_thld.If so, perform step 503; If not, perform step 504.
Step 503, determine the virtual port of vi_qlen-vi_thld difference maximum in current system, and the flow queue that virtual port is had is defined as first-class queue.
After step 503, continue execution step 505.
Step 504, the flow queue that this current system is had are defined as first-class queue.
After step 504, continue execution step 514.
Step 505, judge the flow queue that whether has fq_qlen>fq_thld in first-class queue.If so, perform step 506; If not, perform step 507.
Step 506, in exceeding the flow queue of queue buffer memory threshold value, this select a flow queue to carry out out team's operation.
Step 507, judge the flow queue that whether has fq_qlen>fq_thld*1/2 in this first-class queue.If so, perform step 508; As no, perform step 509.
Step 508, in exceeding the flow queue of queue buffer memory threshold value 1/2, this select a flow queue to carry out out team's operation.
Step 509, judge the flow queue that whether has fq_qlen>fq_thld*1/4 in this first-class queue.If so, perform step 510; If not, perform step 511.
Step 510, in exceeding the flow queue of queue buffer memory threshold value 1/4, this select a flow queue to carry out out team's operation.
Step 511, judge the flow queue that whether has fq_qlen>fq_thld*1/8 in this first-class queue.If so, perform step 512; If not, perform step 513.
Step 512, in exceeding the flow queue of queue buffer memory threshold value 1/8, this select a flow queue to carry out out team's operation.
Step 513, transmission the second alarm prompt, this second alarm indication information comprises configuration error information.
Step 514, judge the flow queue that whether has fq_qlen>fq_thld in first-class queue.If so, perform step 515; If not, perform step 516.
This step 514 is with step 505 difference, the object difference that its first-class queue comprises.
Step 515, in exceeding the flow queue of queue buffer memory threshold value, this select a flow queue to carry out out team's operation.
Step 516, determine the virtual port of vi_thld-vi_qlen difference minimum in current system, and the flow queue that virtual port is had is defined as second queue.
Step 517, judge the flow queue that whether has fq_qlen>fq_thld*1/2 in this second queue.If so, perform step 518; If not, perform step 519.
Step 518, in exceeding the flow queue of queue buffer memory threshold value 1/2, this select a flow queue to carry out out team's operation.
Step 519, judge the flow queue that whether has fq_qlen>fq_thld*1/4 in this second queue.If so, perform step 520; If not, perform step 521.
Step 520, in exceeding the flow queue of queue buffer memory threshold value 1/4, this select a flow queue to carry out out team's operation.
Step 521, judge the flow queue that whether has fq_qlen>fq_thld*1/8 in this second queue.If so, perform step 522; If not, perform step 523.
Step 522, in exceeding the flow queue of queue buffer memory threshold value 1/8, this select a flow queue to carry out out team's operation.
Step 523, transmission the first alarm prompt, this first alarm indication information comprises configuration error information.
The present embodiment scheme is on the basis of above-described embodiment scheme, by instantiation, explains, and implementation procedure and beneficial effect that it is concrete are similar to the above embodiments, do not repeat them here.
Embodiment six
The embodiment of the present invention six provides a kind of buffer memory management method.The flow chart of the buffer memory management method that Fig. 6 provides for the embodiment of the present invention six.
As shown in Figure 6, further, in above-described embodiment scheme, in step 102, to exceeding the flow queue of queue buffer memory threshold value, carry out out team's operation, specifically comprise the steps:
Step 601, in the flow queue that exceeds queue buffer memory threshold value, select a flow queue.
Particularly, this flow queue that exceeds queue buffer memory threshold value can be a plurality of flow queues, can be also a flow queue.For avoiding as far as possible the impact that team causes system that of flow queue, this embodiment scheme optimization, from exceed the flow queue of queue buffer memory threshold value, select a flow queue to go out team.
Step 602, information corresponding to the flow queue of selection is passed to queue management device, so that this queue management device goes out team's operation to the information and executing of a storage bag in information corresponding to the flow queue of this selection.
Flow queue is carried out out to team's operation, refer to the data message of flow queue institute buffer memory is carried out out to team's operation.There are a plurality of storage bags in each flow queue, the buffer unit cache information that flow queue has by it.This embodiment scheme optimization, in step 601, in the information of the flow queue of team selected to be gone out institute buffer memory, select the information of a storage bag to go out team.Corresponding, after carrying out out team's operation, the queue length of the flow queue of this selection, reduces the message length that a storage is wrapped.
This embodiment scheme, on the basis of above-described embodiment scheme, specifically, in surpassing the flow queue of queue buffer memory threshold value, select a flow queue, then the information and executing of a storage bag in information corresponding to this flow queue is gone out to team's operation, thereby avoid out as much as possible team's operation current system to be processed to the impact of business.
Embodiment seven
The embodiment of the present invention seven provides a kind of buffer memory management method.The flow chart of the buffer memory management method that Fig. 7 provides for the embodiment of the present invention seven.
As shown in Figure 7, further, on the basis of such scheme, the method also comprises:
Step 701, according to aging Indication message corresponding to flow queue of selecting, judge whether the flow queue of this selection is to need aging flow queue.
Step 702, the aging flow queue of these needs is carried out to aging operation.
Wherein, aging Indication message, for example, can be to represent by flush_ind.Whether by the entrained information of this flush_ind, identify flow queue is to need aging flow queue.
In prior art, according to the storage in flow queue, wrap in the timestamp of printing when data are joined the team, carry out queue aging.Because each flow queue has a plurality of storage bags, and each storage is wrapped to time-write interval stamp, take a large amount of timestamp resources, cause the waste of resource.This embodiment scheme, without printing loaded down with trivial details timestamp, can realize the aging of flow queue, reduces the waste of system resource.
In such scheme step 602, after information corresponding to the flow queue of selection is passed to queue management device, also comprise:
According to queue management device, in to information corresponding to the flow queue of this selection, the information and executing of a storage bag goes out team's operation, and what produce afterwards goes out group Indication message, and the value that goes out group counter that the flow queue of this selection is corresponding adds 1.
Going out group Indication message, for example, can be to represent by fq_dep_ind.Go out group counter, for example, can represent by fq_pot_cnt.After the flow queue of this selection is carried out out team operation, its correspondence go out group Indication message, fq_dep_ind can be configured to 1.As fq_dep_ind=1 detected, and can be by group counter that goes out of its correspondence, the value of fq_pot_cnt adds one.
Each flow queue exists each self-correspondingly to go out group timer, and this goes out group counter and goes out occasion number for what record its corresponding flow queue, and the every execution of flow queue once goes out team's operation, and its value that goes out group counter adds one.
Further, above-mentioned steps 701, according to aging Indication message corresponding to flow queue of selecting, judges whether the flow queue of this selection is to need aging flow queue, comprising:
If go out the value of group counter, be greater than out group frequency threshold value, the aging Indication message that the flow queue of this selection is corresponding is configured to 1; If go out group frequency threshold value described in this value that goes out group counter is less than or equal to, the aging Indication message that the flow queue of this selection is corresponding is configured to 0;
In predetermined period, if aging Indication message corresponding to the flow queue of this selection is continuously 1, determine that the flow queue of this selection is for needing aging flow queue.
Particularly, this embodiment scheme, in the situation that flow queue all has group counter, at least also has group frequency threshold value.Different flow queues can, according to the priority of its corresponding virtual port, have the different group frequency threshold value that goes out.Flow queue go out group frequency threshold value, for example can pass through fq_pot_thld.
When going out the value of group counter, be greater than out group frequency threshold value, i.e. fq_pot_cnt>fq_pot_thld, this flow queue of surface to go out team too frequent, illustrate that this flow queue is congested, its cache information of storing can not get for a long time nature and goes out team.Therefore, can be by corresponding aging Indication message, flush_ind is configured to 1, then this flow queue is carried out to the aging operation of queue according to queue aging mode.In predetermined period, if aging Indication message corresponding to the flow queue of this selection, flush_ind is continuously 1, that is to say, the continuing of the flow queue of this selection, in the queue length state that transfinites, needs queue repeatedly go out team, and the flow queue of this selection of surface belongs to long-term congested queue.Therefore, this long-term congested queue can be defined as needing aging flow queue, then carry out queue operation, the cache information of the current storage of this flow queue is transferred to other queues or port.
Further, determining that the flow queue of selecting, for after needing aging flow queue, also comprises:
Reduce the configuration of the queue buffer memory threshold value that the flow queue of this selection is corresponding.
In predetermined period, if aging Indication message corresponding to flow queue of selecting is continuously 0, recover the configuration of the queue buffer memory threshold value that the flow queue of this selection is corresponding.
Particularly, if the flow queue of this selection is while needing aging flow queue, for avoiding the follow-up queue easily causing while carrying out the buffer memory of information by this flow queue congested, can be by queue buffer memory threshold value corresponding to this pre-configured flow queue, reduce, thereby improve the possibility that this flow queue may be carried out out team, reduce the aging possibility of queue.The queue buffer memory threshold value that this pre-configured flow queue is corresponding, for example, can represent by fq_thld.Reduce the configuration of the queue buffer memory threshold value that the flow queue of this selection is corresponding, i.e. the configuration of fq_thld.
If the aging Indication message that the flow queue of this selection is corresponding, flush_ind is continuously 0, that is to say, this flow queue is not congested queue, without carrying out queue aging, and in stable condition, the configuration that therefore recovers the queue buffer memory threshold value that the flow queue of this selection is corresponding.The configuration that recovers the queue buffer memory threshold value that the flow queue of this selection is corresponding, reduces the possibility that this flow queue may be carried out out team, and that avoids out team's operation repeatedly carries out the wasting of resources causing.
Further, for needing aging flow queue in system except long-term congested queue, also comprising, only there is the flow queue of team and only have the flow queue of joining the team.In predetermined period, as the fq_dep_ind that this flow queue is corresponding detected and be continuously 1, this flow queue, for only there being the flow queue of team, can be carried out the aging operation of queue to this flow queue, after carrying out the aging operation of queue, fq_dep_ind can be reset to 0.For empty flow queue, that is to say when the queue length of this flow queue being detected and be 0, also fq_dep_ind corresponding to this flow queue is updated to 1.Therefore in predetermined period, as the fq_dep_ind that this flow queue is corresponding detected and be continuously 0, this flow queue is without going out team's operation, for only there being the flow queue of joining the team, when carrying out the aging operation of queue to this flow queue.
The present embodiment scheme, can improve in above-described embodiment scheme on the basis of system cache utilance, also can save the resource of system.
Embodiment eight
The embodiment of the present invention eight provides a kind of cache management device.The structural representation of the cache management device that Fig. 8 provides for the embodiment of the present invention eight.As shown in Figure 8, this cache management device 801, comprising:
Judge module 802, for judging whether first-class queue exists queue length to exceed the flow queue of queue buffer memory threshold value.
Executive Module 803, if exist queue length to exceed the flow queue of this queue buffer memory threshold value for this first-class queue, carries out out team's operation to exceeding the flow queue of this queue buffer memory threshold value.
On the basis of such scheme, judge module 802, before also whether exceeding queue buffer memory threshold value for the queue length judging first-class queue, judges whether current system exists port length to exceed the virtual port of buffer to ports threshold value.
Cache management device 801, also comprises:
Determination module, if do not exist port length to exceed the virtual port of buffer to ports threshold value for current system, the flow queue that this current system is had is defined as described first-class queue.
In above-described embodiment scheme, queue buffer memory threshold value comprises the buffer memory threshold value of at least two different priorities.
Corresponding, judge module 802, for the buffer memory threshold value of limit priority in the queue length of this first-class queue flow queue and this queue buffer memory threshold value is compared, judge in first-class queue and whether exist queue length to exceed the flow queue of the buffer memory threshold value of this limit priority.
Executive Module 803, if exist queue length to exceed the flow queue of the buffer memory threshold value of this limit priority for this first-class queue, carries out out team's operation to exceeding the flow queue of the buffer memory threshold value of this limit priority.
Further, determination module in such scheme, if also do not exist queue length to exceed the flow queue of the buffer memory threshold value of this limit priority for this first-class queue, determine the virtual port of current system middle port buffer memory threshold value and port length difference minimum, and the flow queue that the virtual port of this buffer to ports threshold value and port length difference minimum is had is defined as second queue.
Corresponding, whether judge module 802, also, for according to the priority orders of this each buffer memory threshold value of queue buffer memory threshold value, judge successively in this second queue and exist queue length to exceed the flow queue of the buffer memory threshold value in this queue buffer memory threshold value.
Executive Module 803, if also exist queue length to exceed the flow queue of a buffer memory threshold value for this second queue, carries out out team's operation to exceeding the flow queue of this buffer memory threshold value.
Further, cache management device 801, also comprises:
The first sending module, if do not exist queue length to exceed the flow queue of the buffer memory threshold value of lowest priority in this queue buffer memory threshold value for this second queue, sends the first alarm prompt; This first alarm indication information comprises configuration error information.
Wherein, determination module, if also exist port length to exceed the virtual port of buffer to ports threshold value for this current system, determine the virtual port of this current system middle port length and buffer to ports threshold difference maximum, and the flow queue that the virtual port of this port length and buffer to ports threshold difference maximum is had is defined as this first-class queue.
On the basis of above-described embodiment scheme, judge module 802, if also do not exist queue length to exceed the flow queue of the buffer memory threshold value of this limit priority for this first-class queue, according to the priority orders of each buffer memory threshold value in this queue buffer memory threshold value, judge successively in this first-class queue and whether exist queue length to exceed the flow queue of the buffer memory threshold value in this queue buffer memory threshold value;
Executive Module 803, if also exist queue length to exceed the flow queue of a buffer memory threshold value for first-class queue, carries out out team's operation to exceeding the flow queue of this buffer memory threshold value.
Further, on the basis of above-described embodiment scheme, cache management device 801, also comprises:
The second sending module, if do not exist queue length to exceed the flow queue of the buffer memory threshold value of lowest priority in this queue buffer memory threshold value for this first-class queue, sends the second alarm prompt; This second alarm indication information comprises configuration error information.
Further, cache management device 801, also comprises:
Configuration module, for judging that whether first-class queue exists before queue length exceeds the flow queue of queue buffer memory threshold value, according to the priority of this first-class queue, arranges queue buffer memory threshold value.
In above-described embodiment scheme, the buffer to ports threshold value sum of the flow queue having in current system is less than or equal to N times of shared buffer memory; Total buffer memory of this current system comprises shared buffer memory;
Wherein, N is the buffer to ports threshold value sum of flow queue that has in this current system and the ratio of the real cache of this current system.
Further, judge module 802, also for judging that whether current system exists before port length exceeds the virtual port of buffer to ports threshold value, judges whether the free buffer of this current system is less than the threshold value of protection buffer memory; Total buffer memory of this current system, also comprises protection buffer memory; When the free buffer of current system is less than the threshold value of this protection buffer memory, carries out and judge whether this current system exists port length to exceed the operation of the virtual port of buffer to ports threshold value.
On the basis of such scheme, further, configuration module, before also whether being less than protection buffer memory threshold value for the free buffer judging this current system, according to the time delay of process information in this current system, arranges the threshold value of protection buffer memory.
Further, Executive Module 803, selects a flow queue specifically for exceeding at this in flow queue of queue buffer memory threshold value;
Sending module, also for information corresponding to the flow queue of this selection is passed to queue management device, so that this queue management device goes out team's operation to the information and executing of a storage bag in information corresponding to the flow queue of this selection.
On the basis of such scheme, judge module 802, also for the aging Indication message corresponding according to the flow queue of this selection, judges whether the flow queue of this selection is to need aging flow queue;
Executive Module 803, also for carrying out aging operation to the aging flow queue of these needs.
Further, cache management device 801, also comprises:
Counting module, for after information corresponding to the flow queue of this selection is passed to queue management device, according to this queue management device, in to information corresponding to the flow queue of this selection, the information and executing of a storage bag goes out team's operation, what produce afterwards goes out group Indication message, and the value that goes out group counter that the flow queue of this selection is corresponding adds 1.
Further, configuration module, if the value that also goes out group counter for this is greater than out group frequency threshold value, the aging Indication message that the flow queue of this selection is corresponding is configured to 1; If this value that goes out group counter is less than or equal to this, go out group frequency threshold value, the aging Indication message that the flow queue of this selection is corresponding is configured to 0; Determination module, also in predetermined period, if aging Indication message corresponding to the flow queue of this selection is continuously 1, determines that the flow queue of this selection is for needing aging flow queue.
On the basis of above-described embodiment scheme, configuration module, also for the flow queue determining this selection for after needing aging flow queue, reduce the configuration of the queue buffer memory threshold value that the flow queue of this selection is corresponding;
In this predetermined period, if aging Indication message corresponding to the flow queue of this selection is continuously 0, recover the configuration of the queue buffer memory threshold value that the flow queue of this selection is corresponding.
The cache management device that the present embodiment provides can be carried out the buffer memory management method that above-mentioned arbitrary embodiment provides, and the implementation procedure that it is concrete and explain does not similar to the above embodimentsly repeat them here.
One of ordinary skill in the art will appreciate that: all or part of step that realizes above-mentioned each embodiment of the method can complete by the relevant hardware of program command.Aforesaid program can be stored in a computer read/write memory medium.This program, when carrying out, is carried out the step that comprises above-mentioned each embodiment of the method; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
Finally it should be noted that: each embodiment, only in order to technical scheme of the present invention to be described, is not intended to limit above; Although the present invention is had been described in detail with reference to aforementioned each embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or some or all of technical characterictic is wherein equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (34)

1.一种缓存管理方法,其特征在于,包括:1. A cache management method, characterized in that, comprising: 判断第一流队列中是否存在队列长度超出队列缓存阈值的流队列;Judging whether there is a flow queue whose queue length exceeds the queue buffer threshold in the first flow queue; 若所述第一流队列中存在队列长度超出所述队列缓存阈值的流队列,则对所述超出所述队列缓存阈值的流队列执行出队操作。If there is a flow queue whose queue length exceeds the queue buffer threshold in the first flow queue, perform a dequeue operation on the flow queue whose queue length exceeds the queue buffer threshold. 2.根据权利要求1所述的方法,其特征在于,所述判断第一流队列的队列长度是否超出队列缓存阈值之前,还包括:2. The method according to claim 1, wherein before the judging whether the queue length of the first flow queue exceeds the queue cache threshold, further comprising: 判断当前系统是否存在端口长度超出端口缓存阈值的虚拟端口;Determine whether the current system has a virtual port whose port length exceeds the port cache threshold; 若所述当前系统不存在端口长度超出端口缓存阈值的虚拟端口,将所述当前系统所具有的流队列确定为所述第一流队列。If the current system does not have a virtual port whose port length exceeds the port cache threshold, determine the flow queue owned by the current system as the first flow queue. 3.根据权利要求2所述的方法,其特征在于,所述队列缓存阈值包括至少两个不同优先级的缓存阈值;3. The method according to claim 2, wherein the queue cache threshold comprises at least two cache thresholds with different priorities; 所述判断第一流队列中是否存在队列长度超出队列缓存阈值的流队列,包括:The judging whether there is a flow queue whose queue length exceeds the queue buffer threshold in the first flow queue includes: 将所述第一流队列中流队列的队列长度与所述队列缓存阈值中最高优先级的缓存阈值进行比较,判断第一流队列中是否存在队列长度超出所述最高优先级的缓存阈值的流队列;Comparing the queue length of the flow queue in the first flow queue with the highest priority cache threshold in the queue cache threshold, and determining whether there is a flow queue in the first flow queue whose queue length exceeds the highest priority cache threshold; 若所述第一流队列中存在队列长度超出所述队列缓存阈值的流队列,则对所述超出所述队列缓存阈值的流队列执行出队操作,包括:If there is a flow queue whose queue length exceeds the queue cache threshold in the first flow queue, performing a dequeue operation on the flow queue that exceeds the queue cache threshold includes: 若所述第一流队列中存在队列长度超出所述最高优先级的缓存阈值的流队列,则对所述超出所述最高优先级的缓存阈值的流队列执行出队操作。If there is a flow queue whose queue length exceeds the highest-priority cache threshold in the first flow queue, perform a dequeue operation on the flow queue that exceeds the highest-priority cache threshold. 4.根据权利要求3所述的方法,其特征在于,还包括:4. The method according to claim 3, further comprising: 若所述第一流队列中不存在队列长度超出所述最高优先级的缓存阈值的流队列,确定所述当前系统中端口缓存阈值与端口长度差值最小的虚拟端口,并将所述端口缓存阈值与端口长度差值最小的虚拟端口所具有的流队列确定为第二流队列;If there is no flow queue whose queue length exceeds the cache threshold of the highest priority in the first flow queue, determine the virtual port with the smallest difference between the port cache threshold and the port length in the current system, and store the port cache threshold The flow queue of the virtual port having the smallest difference with the port length is determined as the second flow queue; 按照所述队列缓存阈值中各缓存阈值的优先级顺序,依次判断所述第二流队列中是否存在队列长度超出所述队列缓存阈值中的缓存阈值的流队列;According to the priority order of each cache threshold in the queue cache threshold, sequentially determine whether there is a flow queue in the second flow queue whose queue length exceeds the cache threshold in the queue cache threshold; 若所述第二流队列中存在队列长度超出一缓存阈值的流队列,则对超出该缓存阈值的流队列执行出队操作。If there is a flow queue whose queue length exceeds a cache threshold in the second flow queue, a dequeue operation is performed on the flow queue that exceeds the cache threshold. 5.根据权利要求4所述的方法,其特征在于,还包括:5. The method according to claim 4, further comprising: 若所述第二流队列中不存在队列长度超出所述队列缓存阈值中最低优先级的缓存阈值的流队列,则发送第一告警提示信息;所述第一告警指示信息包括配置错误提示信息。If there is no flow queue whose queue length exceeds the cache threshold with the lowest priority among the queue cache thresholds in the second flow queue, then send first warning indication information; the first warning indication information includes configuration error prompt information. 6.根据权利要求3所述的方法,其特征在于,6. The method of claim 3, wherein, 若所述当前系统存在端口长度超出端口缓存阈值的虚拟端口,确定所述当前系统中端口长度与端口缓存阈值差值最大的虚拟端口,并将所述端口长度与端口缓存阈值差值最大的虚拟端口所具有的流队列确定为所述第一流队列。If the current system has a virtual port whose port length exceeds the port cache threshold, determine the virtual port with the largest difference between the port length and the port cache threshold in the current system, and store the virtual port with the largest difference between the port length and the port cache threshold The flow queue owned by the port is determined as the first flow queue. 7.根据权利要求6所述的方法,其特征在于,所述判断第一流队列中是否存在队列长度超出队列缓存阈值的流队列,还包括:7. The method according to claim 6, wherein the judging whether there is a flow queue whose queue length exceeds the queue cache threshold in the first flow queue further comprises: 若所述第一流队列中不存在队列长度超出所述最高优先级的缓存阈值的流队列,按照所述队列缓存阈值中各缓存阈值的优先级顺序,依次判断所述第一流队列中是否存在队列长度超出所述队列缓存阈值中的缓存阈值的流队列;If there is no flow queue in the first flow queue whose queue length exceeds the cache threshold of the highest priority, according to the priority order of each cache threshold in the queue cache threshold, sequentially determine whether there is a queue in the first flow queue a flow queue whose length exceeds a cache threshold in said queue cache threshold; 若所述第一流队列中存在队列长度超出所述队列缓存阈值的流队列,则对所述超出所述队列缓存阈值的流队列执行出队操作,还包括:If there is a flow queue whose queue length exceeds the queue cache threshold in the first flow queue, performing a dequeue operation on the flow queue that exceeds the queue cache threshold further includes: 若所述第一流队列中存在队列长度超出一缓存阈值的流队列,则对超出该缓存阈值的流队列执行出队操作。If there is a flow queue whose queue length exceeds a cache threshold in the first flow queue, a dequeue operation is performed on the flow queue that exceeds the cache threshold. 8.根据权利要求7所述的方法,其特征在于,还包括:8. The method according to claim 7, further comprising: 若所述第一流队列中不存在队列长度超出所述队列缓存阈值中最低优先级的缓存阈值的流队列,发送第二告警提示信息;所述第二告警指示信息包括配置错误提示信息。If there is no flow queue in the first flow queue whose queue length exceeds the cache threshold with the lowest priority among the queue cache thresholds, send a second warning message; the second warning message includes configuration error message. 9.根据权利要求5或8所述的方法,其特征在于,在所述判断第一流队列中是否存在队列长度超出队列缓存阈值的流队列之前,还包括:9. The method according to claim 5 or 8, further comprising: 根据所述第一流队列的优先级,设置所述队列缓存阈值。Set the queue cache threshold according to the priority of the first flow queue. 10.根据权利要求2所述的方法,其特征在于,所述当前系统中所具有的流队列的端口缓存阈值之和小于等于共享缓存的N倍;所述当前系统的总缓存包括所述共享缓存;10. The method according to claim 2, wherein the sum of the port cache thresholds of the flow queues in the current system is less than or equal to N times the shared cache; the total cache of the current system includes the shared cache cache; 所述N为所述当前系统中所具有的流队列的端口缓存阈值之和与所述当前系统的实际缓存的比值。The N is the ratio of the sum of the port cache thresholds of the flow queues in the current system to the actual cache of the current system. 11.根据权利要求10所述的方法,其特征在于,所述判断当前系统是否存在端口长度超出端口缓存阈值的虚拟端口之前,还包括:11. The method according to claim 10, wherein before the judging whether there is a virtual port whose port length exceeds the port cache threshold in the current system, further comprising: 判断所述当前系统的空闲缓存是否小于保护缓存的阈值;所述当前系统的总缓存,还包括所述保护缓存;Judging whether the free cache of the current system is smaller than the threshold of the protection cache; the total cache of the current system also includes the protection cache; 当所述当前系统的空闲缓存小于所述保护缓存的阈值时,执行判断所述当前系统是否存在端口长度超出端口缓存阈值的虚拟端口的操作。When the free cache of the current system is smaller than the threshold of the protection cache, an operation of judging whether the current system has a virtual port whose port length exceeds the threshold of the port cache is performed. 12.根据权利要求11所述的方法,其特征在于,在所述判断所述当前系统的空闲缓存是否小于保护缓存阈值之前,还包括:12. The method according to claim 11, further comprising: 根据所述当前系统中处理信息的时延,对所述保护缓存进行配置。The protection cache is configured according to the time delay of processing information in the current system. 13.根据权利要求9所述的方法,其特征在于,所述对所述超出队列缓存阈值的流队列执行出队操作,包括:13. The method according to claim 9, wherein the performing dequeue operation on the flow queue exceeding the queue cache threshold comprises: 在所述超出队列缓存阈值的流队列中选择一个流队列;selecting a flow queue from the flow queues exceeding the queue cache threshold; 将所述选择的流队列对应的信息传递给队列管理器,以使所述队列管理器对所述选择的流队列对应的信息中一个存储包的信息执行出队操作。The information corresponding to the selected flow queue is delivered to the queue manager, so that the queue manager performs a dequeue operation on the information of one stored packet in the information corresponding to the selected flow queue. 14.根据权利要求13所述的方法,其特征在于,还包括:14. The method of claim 13, further comprising: 根据所述选择的流队列对应的老化指示消息,判断所述选择的流队列是否为需要老化的流队列;According to the aging indication message corresponding to the selected flow queue, determine whether the selected flow queue is a flow queue that needs to be aged; 对所述需要老化的流队列执行老化操作。Perform an aging operation on the flow queue that needs to be aged. 15.根据权利要求13所述的方法,其特征在于,在所述将所述选择的流队列对应的信息传递给队列管理器之后,还包括:15. The method according to claim 13, further comprising: after the information corresponding to the selected flow queue is transferred to the queue manager: 根据所述队列管理器,在对所述选择的流队列对应的信息中一个存储包的信息执行出队操作,之后产生的出队指示消息,将所述选择的流队列对应的出队计数器的值加1。According to the queue manager, the dequeue operation is performed on the information of a stored packet in the information corresponding to the selected flow queue, and then the dequeue instruction message generated will set the dequeue counter corresponding to the selected flow queue value plus 1. 16.根据权利要求15所述的方法,其特征在于,所述根据所述选择的流队列对应的老化指示消息,判断所述选择的流队列是否为需要老化的流队列,包括:16. The method according to claim 15, wherein the judging whether the selected flow queue is a flow queue requiring aging according to the aging indication message corresponding to the selected flow queue comprises: 若所述出队计数器的值大于出队次数阈值,将所述选择的流队列对应的老化指示消息配置为1;若所述出队计数器的值小于等于所述出队次数阈值,将所述选择的流队列对应的老化指示消息配置为0;If the value of the dequeue counter is greater than the dequeue times threshold, configure the aging indication message corresponding to the selected flow queue as 1; if the value of the dequeue counter is less than or equal to the dequeue times threshold, set the The aging indication message corresponding to the selected flow queue is configured as 0; 在预定周期内,若所述选择的流队列对应的老化指示消息持续为1,则确定所述选择的流队列为所述需要老化的流队列。Within a predetermined period, if the aging indication message corresponding to the selected flow queue continues to be 1, it is determined that the selected flow queue is the flow queue that needs to be aged. 17.根据权利要求16所述的方法,其特征在于,在所述确定所述选择的流队列为所述需要老化的流队列之后,还包括:17. The method according to claim 16, further comprising: after determining that the selected flow queue is the flow queue to be aged. 减少所述选择的流队列对应的队列缓存阈值的配置;reducing the configuration of the queue cache threshold corresponding to the selected flow queue; 在所述预定周期内,若所述选择的流队列对应的老化指示消息持续为0,则恢复所述选择的流队列对应的队列缓存阈值的配置。Within the predetermined period, if the aging indication message corresponding to the selected flow queue continues to be 0, restore the configuration of the queue cache threshold corresponding to the selected flow queue. 18.一种缓存管理装置,其特征在于,包括:18. A cache management device, comprising: 判断模块,用于判断第一流队列中是否存在队列长度超出队列缓存阈值的流队列;A judging module, configured to judge whether there is a flow queue whose queue length exceeds the queue buffer threshold in the first flow queue; 执行模块,用于若所述第一流队列中存在队列长度超出所述队列缓存阈值的流队列,对所述超出所述队列缓存阈值的流队列执行出队操作。An executing module, configured to, if there is a flow queue whose queue length exceeds the queue buffer threshold in the first flow queue, perform a dequeue operation on the flow queue whose queue length exceeds the queue buffer threshold. 19.根据权利要求18所述的装置,其特征在于,19. The apparatus of claim 18, wherein: 所述判断模块,还用于在所述判断第一流队列的队列长度是否超出队列缓存阈值之前,判断当前系统是否存在端口长度超出端口缓存阈值的虚拟端口;The judging module is further configured to judge whether there is a virtual port whose port length exceeds the port cache threshold in the current system before judging whether the queue length of the first flow queue exceeds the queue cache threshold; 所述装置,还包括:The device also includes: 确定模块,用于若所述当前系统不存在端口长度超出端口缓存阈值的虚拟端口,将所述当前系统所具有的流队列确定为所述第一流队列。A determining module, configured to determine the flow queue of the current system as the first flow queue if the current system does not have a virtual port whose port length exceeds a port cache threshold. 20.根据权利要求19所述的装置,其特征在于,所述队列缓存阈值包括至少两个不同优先级的缓存阈值;20. The device according to claim 19, wherein the queue cache threshold comprises at least two cache thresholds with different priorities; 所述判断模块,用于将所述第一流队列中流队列的队列长度与所述队列缓存阈值中最高优先级的缓存阈值进行比较,判断第一流队列中是否存在队列长度超出所述最高优先级的缓存阈值的流队列;The judging module is configured to compare the queue length of the flow queue in the first flow queue with the cache threshold of the highest priority in the queue cache threshold, and judge whether there is a queue length exceeding the highest priority in the first flow queue flow queue for cache threshold; 所述执行模块,用于若所述第一流队列中存在队列长度超出所述最高优先级的缓存阈值的流队列,对所述超出所述最高优先级的缓存阈值的流队列执行出队操作。The execution module is configured to, if there is a flow queue whose queue length exceeds the highest-priority cache threshold in the first flow queue, perform a dequeue operation on the flow queue that exceeds the highest-priority cache threshold. 21.根据权利要求20所述的装置,其特征在于,21. The apparatus of claim 20, wherein: 所述确定模块,还用于若所述第一流队列中不存在队列长度超出所述最高优先级的缓存阈值的流队列,确定所述当前系统中端口缓存阈值与端口长度差值最小的虚拟端口,并将所述端口缓存阈值与端口长度差值最小的虚拟端口所具有的流队列确定为第二流队列;The determination module is further configured to determine the virtual port with the smallest difference between the port cache threshold and the port length in the current system if there is no flow queue whose queue length exceeds the highest priority cache threshold in the first flow queue , and determine the flow queue of the virtual port with the smallest difference between the port cache threshold and the port length as the second flow queue; 所述判断模块,还用于按照所述队列缓存阈值中各缓存阈值的优先级顺序,依次判断所述第二流队列中是否存在队列长度超出所述队列缓存阈值中的缓存阈值的流队列;The judging module is further configured to sequentially judge whether there is a flow queue whose queue length exceeds the cache threshold in the queue cache threshold in the second flow queue according to the priority order of each cache threshold in the queue cache threshold; 所述执行模块,还用于若所述第二流队列中存在队列长度超出一缓存阈值的流队列,则对超出该缓存阈值的流队列执行出队操作。The execution module is further configured to, if there is a flow queue whose queue length exceeds a cache threshold in the second flow queue, perform a dequeue operation on the flow queue that exceeds the cache threshold. 22.根据权利要求21所述的装置,其特征在于,所述装置,还包括:22. The device according to claim 21, further comprising: 第一发送模块,用于若所述第二流队列中不存在队列长度超出所述队列缓存阈值中最低优先级的缓存阈值的流队列,发送第一告警提示信息;所述第一告警指示信息包括配置错误提示信息。The first sending module is configured to send first alarm prompt information if there is no flow queue whose queue length exceeds the lowest priority cache threshold among the queue cache thresholds in the second flow queue; the first alarm indication information Contains information about configuration errors. 23.根据权利要求20所述的装置,其特征在于,23. The apparatus of claim 20, wherein: 所述确定模块,还用于若所述当前系统存在端口长度超出端口缓存阈值的虚拟端口,确定所述当前系统中端口长度与端口缓存阈值差值最大的虚拟端口,并将所述端口长度与端口缓存阈值差值最大的虚拟端口所具有的流队列确定为所述第一流队列。The determining module is further configured to, if the current system has a virtual port whose port length exceeds the port cache threshold, determine the virtual port in the current system with the largest difference between the port length and the port cache threshold, and compare the port length with the port cache threshold. The flow queue of the virtual port with the largest port cache threshold difference is determined as the first flow queue. 24.根据权利要求23所述的装置,其特征在于,24. The apparatus of claim 23, wherein: 所述判断模块,还用于若所述第一流队列中不存在队列长度超出所述最高优先级的缓存阈值的流队列,按照所述队列缓存阈值中各缓存阈值的优先级顺序,依次判断所述第一流队列中是否存在队列长度超出所述队列缓存阈值中的缓存阈值的流队列;The judging module is further configured to, if there is no flow queue in the first flow queue whose queue length exceeds the cache threshold of the highest priority, sequentially judge the flow queues according to the priority order of each cache threshold in the queue cache threshold Whether there is a flow queue whose queue length exceeds the cache threshold in the queue cache threshold in the first flow queue; 所述执行模块,还用于若所述第一流队列中存在队列长度超出一缓存阈值的流队列,则对超出该缓存阈值的流队列执行出队操作。The execution module is further configured to, if there is a flow queue whose queue length exceeds a cache threshold in the first flow queue, perform a dequeue operation on the flow queue exceeding the cache threshold. 25.根据权利要求24所述的装置,其特征在于,所述装置,还包括:25. The device according to claim 24, further comprising: 第二发送模块,用于若所述第一流队列中不存在队列长度超出所述队列缓存阈值中最低优先级的缓存阈值的流队列,发送第二告警提示信息;所述第二告警指示信息包括配置错误提示信息。The second sending module is configured to send second warning prompt information if there is no flow queue whose queue length exceeds the lowest priority cache threshold among the queue cache thresholds in the first flow queue; the second warning indication information includes Configuration error message. 26.根据权利要求22或25所述的装置,其特征在于,所述装置,还包括:26. The device according to claim 22 or 25, characterized in that the device further comprises: 配置模块,用于在所述判断第一流队列中是否存在队列长度超出队列缓存阈值的流队列之前,根据所述第一流队列的优先级,设置所述队列缓存阈值。The configuration module is configured to set the queue buffer threshold according to the priority of the first flow queue before determining whether there is a flow queue whose queue length exceeds the queue buffer threshold in the first flow queue. 27.根据权利要求19所述的装置,其特征在于,所述当前系统中所具有的流队列的端口缓存阈值之和小于等于共享缓存的N倍;所述当前系统的总缓存包括所述共享缓存;27. The device according to claim 19, wherein the sum of the port cache thresholds of the flow queues in the current system is less than or equal to N times the shared cache; the total cache of the current system includes the shared cache; 所述N为所述当前系统中所具有的流队列的端口缓存阈值之和与所述当前系统的实际缓存的比值。The N is the ratio of the sum of the port cache thresholds of the flow queues in the current system to the actual cache of the current system. 28.根据权利要求27所述的装置,其特征在于,28. The device of claim 27, wherein: 所述判断模块,还用于所述判断当前系统是否存在端口长度超出端口缓存阈值的虚拟端口之前,判断所述当前系统的空闲缓存是否小于保护缓存的阈值;所述当前系统的总缓存,还包括所述保护缓存;当所述当前系统的空闲缓存小于所述保护缓存的阈值时,执行判断所述当前系统是否存在端口长度超出端口缓存阈值的虚拟端口的操作。The judging module is also used to judge whether the idle cache of the current system is smaller than the threshold of the protection cache before judging whether the current system has a virtual port whose port length exceeds the threshold of the port cache; the total cache of the current system is also Including the protection cache; when the free cache of the current system is smaller than the threshold of the protection cache, perform an operation of judging whether the current system has a virtual port whose port length exceeds the threshold of the port cache. 29.根据权利要求28所述的装置,其特征在于,29. The device of claim 28, wherein: 所述配置模块,还用于在所述判断所述当前系统的空闲缓存是否小于保护缓存阈值之前,根据所述当前系统中处理信息的时延,对所述保护缓存进行配置。The configuration module is further configured to configure the protection cache according to the time delay of processing information in the current system before judging whether the free cache of the current system is smaller than the protection cache threshold. 30.根据权利要求26所述的装置,其特征在于,30. The apparatus of claim 26, wherein: 所述执行模块,具体用于在所述超出队列缓存阈值的流队列中选择一个流队列;The executing module is specifically configured to select a flow queue among the flow queues exceeding the queue cache threshold; 所述发送模块,还用于将所述选择的流队列对应的信息传递给队列管理器,以使所述队列管理器对所述选择的流队列对应的信息中一个存储包的信息执行出队操作。The sending module is further configured to transfer the information corresponding to the selected flow queue to the queue manager, so that the queue manager performs dequeuing of information of a storage packet in the information corresponding to the selected flow queue operate. 31.根据权利要求30所述的装置,其特征在于,31. The device of claim 30, wherein: 所述判断模块,还用于根据所述选择的流队列对应的老化指示消息,判断所述选择的流队列是否为需要老化的流队列;The judging module is further configured to judge whether the selected flow queue is a flow queue that needs to be aged according to the aging indication message corresponding to the selected flow queue; 所述执行模块,还用于对所述需要老化的流队列执行老化操作。The execution module is further configured to perform an aging operation on the flow queue that needs to be aged. 32.根据权利要求30所述的装置,其特征在于,所述装置,还包括:32. The device according to claim 30, further comprising: 计数模块,用于在所述将所述选择的流队列对应的信息传递给队列管理器之后,根据所述队列管理器,在对所述选择的流队列对应的信息中一个存储包的信息执行出队操作,之后产生的出队指示消息,将所述选择的流队列对应的出队计数器的值加1。The counting module is configured to, after the information corresponding to the selected flow queue is passed to the queue manager, according to the queue manager, execute the information of one stored packet in the information corresponding to the selected flow queue In the dequeue operation, the value of the dequeue counter corresponding to the selected flow queue is increased by 1 in the dequeue indication message generated later. 33.根据权利要求32所述的装置,其特征在于,33. The device of claim 32, wherein: 所述配置模块,还用于若所述出队计数器的值大于出队次数阈值,将所述选择的流队列对应的老化指示消息配置为1;若所述出队计数器的值小于等于所述出队次数阈值,将所述选择的流队列对应的老化指示消息配置为0;The configuration module is further configured to configure the aging indication message corresponding to the selected flow queue as 1 if the value of the dequeue counter is greater than the dequeue times threshold; if the value of the dequeue counter is less than or equal to the Dequeuing times threshold, configuring the aging indication message corresponding to the selected flow queue as 0; 所述确定模块,还用于在预定周期内,若所述选择的流队列对应的老化指示消息持续为1,则确定所述选择的流队列为所述需要老化的流队列。The determining module is further configured to determine that the selected flow queue is the flow queue that needs to be aged if the aging indication message corresponding to the selected flow queue continues to be 1 within a predetermined period. 34.根据权利要求33所述的装置,其特征在于,34. The device of claim 33, wherein: 所述配置模块,还用于在所述确定所述选择的流队列为所述需要老化的流队列之后,减少所述选择的流队列对应的队列缓存阈值的配置;在所述预定周期内,若所述选择的流队列对应的老化指示消息持续为0,则恢复所述选择的流队列对应的队列缓存阈值的配置。The configuration module is further configured to reduce the configuration of the queue cache threshold corresponding to the selected flow queue after determining that the selected flow queue is the flow queue that needs to be aged; within the predetermined period, If the aging indication message corresponding to the selected flow queue continues to be 0, restore the configuration of the queue cache threshold corresponding to the selected flow queue.
CN201310637601.9A 2013-12-02 2013-12-02 Cache management method and device Pending CN103685062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310637601.9A CN103685062A (en) 2013-12-02 2013-12-02 Cache management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310637601.9A CN103685062A (en) 2013-12-02 2013-12-02 Cache management method and device

Publications (1)

Publication Number Publication Date
CN103685062A true CN103685062A (en) 2014-03-26

Family

ID=50321416

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310637601.9A Pending CN103685062A (en) 2013-12-02 2013-12-02 Cache management method and device

Country Status (1)

Country Link
CN (1) CN103685062A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017107363A1 (en) * 2015-12-22 2017-06-29 深圳市中兴微电子技术有限公司 Cache management method and device, and computer storage medium
WO2017186067A1 (en) * 2016-04-29 2017-11-02 北京奇虎科技有限公司 Method and device for video transmission processing
CN107347039A (en) * 2016-05-05 2017-11-14 深圳市中兴微电子技术有限公司 A kind of management method and device in shared buffer memory space
CN110795221A (en) * 2019-04-19 2020-02-14 成都海光集成电路设计有限公司 Cache management method, cache controller, processor and storage medium
WO2020042167A1 (en) * 2018-08-31 2020-03-05 华为技术有限公司 Method for improving quality of voice call, terminal, and system
CN113835611A (en) * 2020-06-23 2021-12-24 深圳市中兴微电子技术有限公司 Storage scheduling method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101257453A (en) * 2008-03-12 2008-09-03 中兴通讯股份有限公司 Method and device for realizing flow shaping based on network processor
CN101534254A (en) * 2009-04-21 2009-09-16 华为技术有限公司 A queue report method, a device and a passive optical network
CN101741751A (en) * 2010-02-09 2010-06-16 华为技术有限公司 Traffic shaping scheduling method, traffic shaping scheduling device, and routing equipment
CN101902758A (en) * 2010-05-25 2010-12-01 中国科学技术大学 Data processing method and device in wireless network based on protocol test
CN103248583A (en) * 2012-02-09 2013-08-14 迈普通信技术股份有限公司 FIFO (first-in first-out) message queue management method and device based on finite depth

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101257453A (en) * 2008-03-12 2008-09-03 中兴通讯股份有限公司 Method and device for realizing flow shaping based on network processor
CN101534254A (en) * 2009-04-21 2009-09-16 华为技术有限公司 A queue report method, a device and a passive optical network
CN101741751A (en) * 2010-02-09 2010-06-16 华为技术有限公司 Traffic shaping scheduling method, traffic shaping scheduling device, and routing equipment
CN101902758A (en) * 2010-05-25 2010-12-01 中国科学技术大学 Data processing method and device in wireless network based on protocol test
CN103248583A (en) * 2012-02-09 2013-08-14 迈普通信技术股份有限公司 FIFO (first-in first-out) message queue management method and device based on finite depth

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017107363A1 (en) * 2015-12-22 2017-06-29 深圳市中兴微电子技术有限公司 Cache management method and device, and computer storage medium
CN106911740A (en) * 2015-12-22 2017-06-30 深圳市中兴微电子技术有限公司 A kind of method and apparatus of cache management
WO2017186067A1 (en) * 2016-04-29 2017-11-02 北京奇虎科技有限公司 Method and device for video transmission processing
CN107347039A (en) * 2016-05-05 2017-11-14 深圳市中兴微电子技术有限公司 A kind of management method and device in shared buffer memory space
CN107347039B (en) * 2016-05-05 2020-02-21 深圳市中兴微电子技术有限公司 A method and device for managing shared cache space
WO2020042167A1 (en) * 2018-08-31 2020-03-05 华为技术有限公司 Method for improving quality of voice call, terminal, and system
CN110795221A (en) * 2019-04-19 2020-02-14 成都海光集成电路设计有限公司 Cache management method, cache controller, processor and storage medium
CN110795221B (en) * 2019-04-19 2022-04-12 成都海光集成电路设计有限公司 Cache management method, cache controller, processor and storage medium
CN113835611A (en) * 2020-06-23 2021-12-24 深圳市中兴微电子技术有限公司 Storage scheduling method, device and storage medium
CN113835611B (en) * 2020-06-23 2025-01-21 深圳市中兴微电子技术有限公司 Storage scheduling method, device and storage medium

Similar Documents

Publication Publication Date Title
US20220070098A1 (en) Packet Control Method And Network Apparatus
CN102035732B (en) Service scheduling method and device
CN103685062A (en) Cache management method and device
US8230110B2 (en) Work-conserving packet scheduling in network devices
JP5088145B2 (en) Packet relay apparatus, control method, and packet relay program
CN113312160B (en) Method and system for behavior pairing in task allocation system
CN107729135B (en) Method and device for parallel data processing in sequence
US8989037B2 (en) System for performing data cut-through
JP5968841B2 (en) Network device and processor monitoring method
US7418001B2 (en) Router for scheduling packet and method therefor
CN102891809B (en) Multi-core network device message presses interface order-preserving method and system
CN102158408B (en) Method for processing data stream and device thereof
CN117560433A (en) DPU (digital versatile unit) middle report Wen Zhuaifa order preserving method and device, electronic equipment and storage medium
CN109922003A (en) A kind of data transmission method for uplink, system and associated component
CN101534254A (en) A queue report method, a device and a passive optical network
CN102546423B (en) Method and device for queue scheduling and network device
CN111526064A (en) Data stream processing method and device, electronic equipment and storage medium
CN115086238A (en) TSN network port output scheduling device
CN109800074A (en) Task data concurrently executes method, apparatus and electronic equipment
CN104618261A (en) Reshaping scheduling method in aviation electronic system network
JP2011091711A (en) Node, method for distributing transmission frame, and program
CN110381537A (en) A kind of bandwidth speed limiting method, apparatus, equipment and storage medium based on QoE
JP4276094B2 (en) Communication apparatus and priority control method for performing priority control of packet
US20190044867A1 (en) Technologies for controlling jitter at network packet egress
CN108781170A (en) A kind of configuration device and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140326