CN101364948A - Method for dynamically allocating cache - Google Patents

Method for dynamically allocating cache Download PDF

Info

Publication number
CN101364948A
CN101364948A CNA2008102123119A CN200810212311A CN101364948A CN 101364948 A CN101364948 A CN 101364948A CN A2008102123119 A CNA2008102123119 A CN A2008102123119A CN 200810212311 A CN200810212311 A CN 200810212311A CN 101364948 A CN101364948 A CN 101364948A
Authority
CN
China
Prior art keywords
port
thresholding
buffer memory
buffer
threshold value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2008102123119A
Other languages
Chinese (zh)
Other versions
CN101364948B (en
Inventor
潘庭山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2008102123119A priority Critical patent/CN101364948B/en
Publication of CN101364948A publication Critical patent/CN101364948A/en
Application granted granted Critical
Publication of CN101364948B publication Critical patent/CN101364948B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a method for dynamic cache allocation, and belongs to the field of the network equipment such as the switch. Each port is provided with cache number thresholds. The cache number thresholds are occupied by the ports and includes a first threshold and a second threshold, wherein the first threshold is used for guaranteeing the cache number which is at least occupied by the port, the second threshold is used for limiting the cache number which is occupied by the port, and the second threshold value is larger than the first threshold value. When the port receives a message, if judgment shows that the current occupied cache number is between the first threshold and the second threshold, a third threshold is arranged according to the current network demand so as to decide whether to allocate the cache to the port. The third threshold is dynamically adjustable. The service condition of the port of the switch is fully considered, the buffer in the switch can be used maximally, the relative fairness of the use of buffer among the ports is ensured, and the performance of the entire switch is guaranteed.

Description

A kind of method of dynamic assignment buffer memory
Technical field
The invention belongs to the network equipments such as switch, the method for particularly a kind of dynamic assignment buffer memory (buffer).
Background technology
The buffer that has some in the switch, after message enters switch from port, if available buffer is arranged, inside the buffer that message can be stored at switch, buffer just can be released after all destination interfaces of message sent this message from port by the time so.At present, switch roughly has three kinds to the method for port assignment buffer: first kind is that buffer is shared by all of the port in the switch, as long as idle buffer is promptly arranged, all of the port can go to seize; Second kind is that port is provided with quiescent value, generally this quiescent value is made as the buffer number that port on average can take; The third is exactly dynamic assignment buffer, and promptly the idle buffer of port buffer that can take and switch is linear, and like this, the buffer number that port can take can reduce along with the minimizing of the idle buffer number of switch.
But all there is certain drawback in above-mentioned three kinds of methods.For example, in the first method, all of the port all can remove to seize the buffer of the overall situation, and will occur some port like this and take a large amount of buffer, and some port even take phenomenon less than buffer, thereby cause the abnormal packet loss of some port; In the second method, all of the port does not influence mutually, be that each port only takies the buffer number that port on average can take, but when having the buffer of a large amount of free time in the switch, port can not be used more, thereby cause the waste of resource, increased the probability of packet loss, reduced the performance of switch; Though the third method is dynamic to the distribution of buffer, the situation that takies of each port or inequitable, the performance that some port can occur improves the situation that the performance of some port is lowered.Therefore, need to propose a kind of new buffer distribution method, thereby satisfy the needs of port to greatest extent.
Summary of the invention
Technical problem to be solved by this invention is, the method for a kind of dynamic assignment buffer is provided, thereby guarantees the relative fairness that between each port buffer taken.
In order to address the above problem, the invention discloses a kind of method of dynamic assignment buffer memory, for each port is provided with the buffer memory number thresholding that it can take, comprise first thresholding and second thresholding, wherein, described first thresholding is used to the buffer memory number that guarantees that port takies at least, and described second thresholding is used for the buffer memory number that restrictive ports takies, and described second threshold value is greater than described first threshold value;
When port is received message, if when judging that the current buffer memory number that takies of this port is between described first threshold value and second threshold value, the 3rd thresholding is set, whether be this port assignment buffer memory in order to decision according to the current network demand, wherein, described the 3rd thresholding dynamic adjustable.
Further, in the said method, the setting of described first thresholding and second thresholding is provided with according to following one or more parameters:
The priority of port traffic, port traffic flow, each port on average can take the buffer memory number.
Wherein, when the number that on average can take buffer memory according to described each port was provided with described first thresholding and second thresholding, described first thresholding is not more than each port on average can take the buffer memory number, and described second thresholding is not less than described each port on average can take the buffer memory number.
It is linear that described first thresholding and described each port on average can take the buffer memory number.
It is linear that described second thresholding and described each port on average can take the buffer memory number.
According to described current network demand the 3rd thresholding is set and is meant, be provided with according to following one or more parameters:
The priority of this port traffic, this port traffic flow, the buffer memory number of current free time.
The buffer memory number of described the 3rd threshold value and described current free time is linear, and described the 3rd thresholding is not more than described second thresholding.
The linear coefficient scope of the buffer memory number of described the 3rd threshold value and described current free time is 0.2 to 2.
Further, in the said method, after described port is received message, if the current number that takies buffer memory of this port is less than described first thresholding, and there is free buffer, then to this port assignment buffer memory.
Further, in the said method, after described port is received message, if the current number that takies buffer memory of this port is greater than described second thresholding, then not to this port assignment buffer memory.
Compared with prior art, the method of fair dynamic assignment buffer memory relatively that the present invention adopts, taken into full account the port operating position of switch, promptly used the buffer in the switch most possibly, also guarantee the relative fairness that buffer uses between each port, guaranteed the performance of whole switch.
Description of drawings
Fig. 1 is the flow chart of the inventive method dynamic assignment buffer.
Embodiment
Main design of the present invention is, distribute in the process of buffer memory at switch, elder generation is according to the network requirement of each port, as the kind of each port traffic and/or service traffics etc. is each port arrangement first thresholding and second thresholding, wherein, first thresholding is used to the buffer memory number that guarantees that port takies at least, second threshold value is used for the buffer memory number that restrictive ports takies, like this, after arbitrary port is received message, switch compares with current first thresholding and second thresholding that takies buffer memory number and this port of being provided with of this port, and in conjunction with the number of free buffer, determines whether to be this port assignment buffer memory.
Below in conjunction with embodiment and accompanying drawing technical solution of the present invention is described in further detail.
A kind of switch is realized the process of dynamic assignment buffer, is each port arrangement parameter earlier, i.e. first threshold value, and second threshold value, and then be each port dynamic assignment buffer.Wherein, configuration parameter is as follows:
Switch is according to the actual connection situation of port, for each port is provided with first, second threshold value respectively, and the buffer minimal amount that first threshold value can take for each port, the buffer maximum number that second threshold value can take for each port;
In the present embodiment, switch calculates the buffer number that each port on average can take earlier, it is the port number of the actual connection of buffer sum/switch in each port buffer number=switch that on average can take, and then be provided with first respectively for each port according to the network requirement (for example kind of this port traffic and/or service traffics) of this number and each port, second threshold value, wherein, the buffer number that first threshold value on average can take smaller or equal to each port, the buffer number that second threshold value on average can take more than or equal to each port, particularly, first of switch setting, the buffer number that second threshold value can be respectively on average can take with each port is linear, to make things convenient for the operation of switch, certainly, first, second threshold value also can become non-linear relation with the buffer number that each port on average can take respectively;
In other embodiments, switch also can be directly be provided with first thresholding and second thresholding according to the kind of each port traffic and service traffics etc., for example, when the high more or service traffics of the priority of port traffic were big more, first thresholding and second threshold value of setting were big more; Otherwise, the low more or service traffics of the priority of port traffic more hour, first thresholding and second threshold value of setting are all smaller.
After the above-mentioned parameter configuration was finished, the process of switch dynamic assignment buffer memory was divided into following steps as shown in Figure 1:
Step 101. switch ports themselves is received message;
Step 102. judges whether the current buffer number that takies of this port reaches this port first threshold value that has set, if enter step 103, otherwise enter step 107;
Step 103. judges whether the current buffer number that takies of this port reaches this port second threshold value that has set, if enter step 109, otherwise enter step 104;
Above-mentioned steps 102 and 103 step interchangeable.
Step 104. judges whether there is idle buffer in the switch, if enter step 105, otherwise enter step 109;
Step 105. is determined the 3rd thresholding of dynamic adjustable according to current idle buffer number, i.e. the dynamic available buffer number of this port;
In this step, network requirement according to this port, the kind and/or the service traffics that are each port traffic are determined the 3rd thresholding, the 3rd thresholding is used to limit the buffer number that this port takies and is no more than second threshold value, in the present embodiment, dynamic available buffer number and idle buffer number of each port is linear, the linear coefficient preferable range is 0.2 to 2, in other embodiments, each port can be non-linear relation with idle buffer number with the 3rd threshold value of buffer number.
Step 106. judges that whether the current buffer number that takies of this port is less than the 3rd threshold value that has set, if enter step 108, otherwise enter step 109;
Whether there is idle buffer in step 107. switch, if enter step 108, otherwise enter step 109;
Step 108. is this port assignment buffer, deposits this message, process ends;
This port of step 109. does not have available buffer, abandons this message, process ends.
Be example with a switch that has 2000 buffer and 50 physical ports below, describe the process of above-mentioned dynamic assignment buffer again in detail:
Suppose only to have in this switch practical application 20 ports to connect, each port buffer number=2000/20=100 that on average can take then, at this moment, according to the network requirement (for example kind of this port traffic and service traffics etc.) of this buffer number and each port, for each port is provided with first thresholding and second thresholding respectively;
For example, according to the kind and/or the service traffics of current port traffic, first thresholding that this port is set equal buffer number that each port on average can take promptly 3 times of 100, the second thresholdings buffer number that on average can take for each port be 300;
After setting is finished, when this port is received message, if the current buffer number that takies of this port does not also reach first thresholding 100, and have idle buffer in the switch, then switch is used to deposit message to this port assignment buffer;
If the current buffer number that takies of this port reaches second thresholding 300, then no matter whether there is idle buffer in the switch, not to this port assignment buffer;
If the current buffer number that takies of this port is between first thresholding 100 and second thresholding 300, as the current buffer number that takies of port is 150, and when 200 idle buffer are arranged in the switch, if switch is provided with the number 200 that port can equal idle buffer with the 3rd threshold value of buffer number, then since the current buffer number 150 that takies of port less than the 3rd threshold value 200 that has been provided with, therefore, switch can be used to deposit message to this port assignment buffer, up to buffer number that this port takies greater than switch in till the remaining buffer number.
From the foregoing description as can be seen, technical scheme proposed by the invention is in the process that exchanger chip buffer distributes, for each port is provided with first thresholding and second thresholding, thereby kind and/or service traffics according to each port traffic, the needs of each port have been satisfied preferably, the technical program also further is provided with the 3rd thresholding of dynamic adjustable for each port, the buffer that restrictive ports takies outnumbers second thresholding, thereby guaranteed relatively fairness to use between each port idle buffer, in sum, the technical program adopts fair relatively dynamic cache allocation method, taken into full account the port operating position of switch, promptly use the buffer in the chip most possibly, also guaranteed the relative fairness that buffer takies between each port, guaranteed the performance of whole switch.
The above embodiment is the preferred embodiment that proves absolutely that the present invention lifts, and protection scope of the present invention is not limited thereto.Being equal to that those skilled in the art are done on basis of the present invention substitutes or conversion, all within protection scope of the present invention.Protection scope of the present invention is as the criterion with claims.

Claims (10)

1, a kind of method of dynamic assignment buffer memory is characterized in that,
For each port is provided with the buffer memory number thresholding that it can take, comprise first thresholding and second thresholding, wherein, described first thresholding is used to the buffer memory number that guarantees that port takies at least, described second thresholding is used for the buffer memory number that restrictive ports takies, and described second threshold value is greater than described first threshold value;
When port is received message, if when judging that the current buffer memory number that takies of this port is between described first threshold value and second threshold value, the 3rd thresholding is set, whether be this port assignment buffer memory in order to decision according to the current network demand, wherein, described the 3rd thresholding dynamic adjustable.
2, the method for claim 1 is characterized in that,
The setting of described first thresholding and second thresholding is provided with according to following one or more parameters:
The priority of port traffic, port traffic flow, each port on average can take the buffer memory number.
3, as method as described in the claim 2, it is characterized in that,
When the number that on average can take buffer memory according to described each port was provided with described first thresholding and second thresholding, described first thresholding is not more than each port on average can take the buffer memory number, and described second thresholding is not less than described each port on average can take the buffer memory number.
4, method as claimed in claim 3 is characterized in that,
It is linear that described first thresholding and described each port on average can take the buffer memory number.
5, as claim 3 or 4 described methods, it is characterized in that,
It is linear that described second thresholding and described each port on average can take the buffer memory number.
6, method as claimed in claim 1 or 2 is characterized in that,
According to described current network demand the 3rd thresholding is set and is meant, be provided with according to following one or more parameters:
The priority of this port traffic, this port traffic flow, the buffer memory number of current free time.
7, method as claimed in claim 6 is characterized in that,
The buffer memory number of described the 3rd threshold value and described current free time is linear, and described the 3rd thresholding is not more than described second thresholding.
8, method as claimed in claim 7 is characterized in that,
The linear coefficient scope of the buffer memory number of described the 3rd threshold value and described current free time is 0.2 to 2.
9, the method for claim 1 is characterized in that,
After described port is received message, if the current number that takies buffer memory of this port is less than described first thresholding, and there is free buffer, then to this port assignment buffer memory.
10, the method for claim 1 is characterized in that,
After described port is received message, if the current number that takies buffer memory of this port is greater than described second thresholding, then not to this port assignment buffer memory.
CN2008102123119A 2008-09-08 2008-09-08 Method for dynamically allocating cache Active CN101364948B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008102123119A CN101364948B (en) 2008-09-08 2008-09-08 Method for dynamically allocating cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008102123119A CN101364948B (en) 2008-09-08 2008-09-08 Method for dynamically allocating cache

Publications (2)

Publication Number Publication Date
CN101364948A true CN101364948A (en) 2009-02-11
CN101364948B CN101364948B (en) 2011-01-19

Family

ID=40391108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008102123119A Active CN101364948B (en) 2008-09-08 2008-09-08 Method for dynamically allocating cache

Country Status (1)

Country Link
CN (1) CN101364948B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873269A (en) * 2010-06-24 2010-10-27 杭州华三通信技术有限公司 Data retransmission device and method for distributing buffer to ports
CN101957800A (en) * 2010-06-12 2011-01-26 福建星网锐捷网络有限公司 Multichannel cache distribution method and device
CN102158416A (en) * 2011-05-04 2011-08-17 杭州华三通信技术有限公司 Method and equipment for processing messages based on memory allocation
CN102404219A (en) * 2011-11-25 2012-04-04 北京星网锐捷网络技术有限公司 Method and device for allocating caches as well as network equipment
CN102413063A (en) * 2012-01-12 2012-04-11 盛科网络(苏州)有限公司 Method and system for dynamically adjusting allocation threshold value of output port resources
CN102750229A (en) * 2012-05-30 2012-10-24 福建星网锐捷网络有限公司 Buffer space configuration method and device
CN102833162A (en) * 2012-08-22 2012-12-19 北京星网锐捷网络技术有限公司 Buffer zone number adjusting method and device
CN104717152A (en) * 2013-12-17 2015-06-17 深圳市中兴微电子技术有限公司 Method and device for achieving interface caching dynamic allocation
CN105610729A (en) * 2014-11-19 2016-05-25 中兴通讯股份有限公司 Buffer allocation method, buffer allocation device and network processor
CN106603437A (en) * 2016-12-16 2017-04-26 南京铁道职业技术学院 Port distribution method and apparatus
CN106789729A (en) * 2016-12-13 2017-05-31 华为技术有限公司 Buffer memory management method and device in a kind of network equipment
CN108055213A (en) * 2017-12-08 2018-05-18 盛科网络(苏州)有限公司 The management method and system of the cache resources of the network switch
CN109428827A (en) * 2017-08-21 2019-03-05 深圳市中兴微电子技术有限公司 Flow self-adaptive cache allocation device and method and ONU (optical network Unit) equipment
CN115051958A (en) * 2022-04-14 2022-09-13 重庆奥普泰通信技术有限公司 Cache allocation method, device and equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104702583B (en) * 2013-12-10 2018-11-06 拓二股份有限公司 Solicited message processing method and system applied to the network architecture

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5983278A (en) * 1996-04-19 1999-11-09 Lucent Technologies Inc. Low-loss, fair bandwidth allocation flow control in a packet switch
JP2865139B2 (en) * 1997-04-18 1999-03-08 日本電気株式会社 ATM cell buffer circuit and arbitrary priority allocation method in ATM exchange
CN100502410C (en) * 2003-10-27 2009-06-17 英特尔公司 Dynamic storage distribution for group interface

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957800A (en) * 2010-06-12 2011-01-26 福建星网锐捷网络有限公司 Multichannel cache distribution method and device
CN101873269A (en) * 2010-06-24 2010-10-27 杭州华三通信技术有限公司 Data retransmission device and method for distributing buffer to ports
CN101873269B (en) * 2010-06-24 2014-03-19 杭州华三通信技术有限公司 Data retransmission device and method for distributing buffer to ports
CN102158416A (en) * 2011-05-04 2011-08-17 杭州华三通信技术有限公司 Method and equipment for processing messages based on memory allocation
CN102158416B (en) * 2011-05-04 2013-12-11 杭州华三通信技术有限公司 Method and equipment for processing messages based on memory allocation
CN102404219A (en) * 2011-11-25 2012-04-04 北京星网锐捷网络技术有限公司 Method and device for allocating caches as well as network equipment
CN102404219B (en) * 2011-11-25 2014-07-30 北京星网锐捷网络技术有限公司 Method and device for allocating caches as well as network equipment
CN102413063A (en) * 2012-01-12 2012-04-11 盛科网络(苏州)有限公司 Method and system for dynamically adjusting allocation threshold value of output port resources
CN102413063B (en) * 2012-01-12 2014-05-28 盛科网络(苏州)有限公司 Method and system for dynamically adjusting allocation threshold value of output port resources
CN102750229B (en) * 2012-05-30 2015-08-19 福建星网锐捷网络有限公司 Buffer space configuration method and device
CN102750229A (en) * 2012-05-30 2012-10-24 福建星网锐捷网络有限公司 Buffer space configuration method and device
CN102833162A (en) * 2012-08-22 2012-12-19 北京星网锐捷网络技术有限公司 Buffer zone number adjusting method and device
CN102833162B (en) * 2012-08-22 2015-09-23 北京星网锐捷网络技术有限公司 The method of adjustment of number of buffer and device
US10142435B2 (en) 2013-12-17 2018-11-27 Sanechips Technology Co., Ltd. Method, device and computer storage medium for implementing interface cache dynamic allocation
EP3023880A4 (en) * 2013-12-17 2016-11-30 Zte Microelectronics Technology Co Ltd Method, device and computer storage medium for implementing interface cache dynamic allocation
CN104717152B (en) * 2013-12-17 2019-07-19 深圳市中兴微电子技术有限公司 A kind of method and apparatus realizing interface caching and dynamically distributing
CN104717152A (en) * 2013-12-17 2015-06-17 深圳市中兴微电子技术有限公司 Method and device for achieving interface caching dynamic allocation
CN105610729A (en) * 2014-11-19 2016-05-25 中兴通讯股份有限公司 Buffer allocation method, buffer allocation device and network processor
WO2016078341A1 (en) * 2014-11-19 2016-05-26 中兴通讯股份有限公司 Buffer allocation method and device, and network processor
CN106789729A (en) * 2016-12-13 2017-05-31 华为技术有限公司 Buffer memory management method and device in a kind of network equipment
CN106603437A (en) * 2016-12-16 2017-04-26 南京铁道职业技术学院 Port distribution method and apparatus
CN109428827A (en) * 2017-08-21 2019-03-05 深圳市中兴微电子技术有限公司 Flow self-adaptive cache allocation device and method and ONU (optical network Unit) equipment
CN109428827B (en) * 2017-08-21 2022-05-13 深圳市中兴微电子技术有限公司 Flow self-adaptive cache allocation device and method and ONU (optical network Unit) equipment
CN108055213A (en) * 2017-12-08 2018-05-18 盛科网络(苏州)有限公司 The management method and system of the cache resources of the network switch
CN115051958A (en) * 2022-04-14 2022-09-13 重庆奥普泰通信技术有限公司 Cache allocation method, device and equipment

Also Published As

Publication number Publication date
CN101364948B (en) 2011-01-19

Similar Documents

Publication Publication Date Title
CN101364948B (en) Method for dynamically allocating cache
EP1715632B1 (en) Method for operating a packet based data network
EP1028600B1 (en) An optimal buffer management scheme with dynamic queue length thresholds for ATM switches
CN107404443B (en) Queue cache resource control method and device, server and storage medium
JP2001136193A (en) Method for controlling data flow given to communication node
CN105933064A (en) Dynamic bandwidth allocation method and apparatus
WO2002009358A3 (en) Method of active dynamic resource assignment in a telecommunications network
CN101873269B (en) Data retransmission device and method for distributing buffer to ports
US20120076154A1 (en) Method, apparatus and system for adjusting resource delegation in network
CN101217484B (en) Resource distributing method and system
US10063478B2 (en) Switching device and control method of switching device
CN111400206B (en) Cache management method based on dynamic virtual threshold
CN113225196B (en) Service level configuration method and device
KR20090054761A (en) Apparatus and method efficient dynamic bandwidth allocation for tdma based passive optical network
CN109428827B (en) Flow self-adaptive cache allocation device and method and ONU (optical network Unit) equipment
CN101753449B (en) Resource management system supporting the probability guarantee of end-to-end delay and the method thereof
Miyoshi et al. QoS-aware dynamic bandwidth allocation scheme in Gigabit-Ethernet passive optical networks
CN100459577C (en) Band-width or buffer-storage distribution processing method in communication network
CN113727394A (en) Method and device for realizing shared bandwidth
CN106961399B (en) Method and system for distributing reserved bandwidth of tunnel exit port
CN101459699B (en) Method and apparatus for network address conversion
CN107769977B (en) Power communication network resource allocation method based on soft switch
CN103546872A (en) Paging message sending method in trunking communication system
CA2273037C (en) Method for statistical multiplexing of atm links
Lai et al. Some fair measurement-based admission controls

Legal Events

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