Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for refreshing token bucket in flow limiting technology

A technology of traffic limitation and token bucket, which is applied in the field of data communication, can solve the problems of large random storage space consumption, token overflow, bandwidth loss, etc., and achieve the effect of avoiding excessive traffic burst and bandwidth loss

Active Publication Date: 2009-12-23
HUAWEI TECH CO LTD
View PDF5 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0013] First, the time interval for refreshing the tokens in the token buckets corresponding to the same queue is too long; because each refresh in the prior art refreshes the tokens in the token buckets corresponding to all queues once, so that the same queue is refreshed twice The time interval corresponding to the token in the token bucket is at least the total number of queues multiplied by the system clock cycle;
[0014] Second, since the number of tokens to be filled is proportional to the refresh time interval, too long a refresh time interval will inevitably result in too many tokens to be filled each time, thus requiring that the bucket depth of the token bucket must be large enough, that is, the token The bucket capacity must be large enough, but if the token bucket capacity is too large, it will consume a large amount of random storage space (RAM), resulting in a waste of system resources;
[0015] Third, too many tokens need to be filled each time. If the capacity of the token bucket is not enough, it is easy to cause the token bucket to be unable to hold these tokens, resulting in token overflow and bandwidth loss.
[0016] To illustrate the above problems, for example, the total number of queues is 64K, the system clock frequency is 100MHz, the queue entry bandwidth is 8Gbps, and the queue exit bandwidth is 5Gbps. Suppose it takes 1 clock cycle to refresh the number of tokens in the token bucket corresponding to a queue , then the time interval between refreshing the token bucket corresponding to the same queue twice is at least 64K clock cycles, that is, 64k multiplied by 10ns is equal to 640us, then the number of tokens that need to be filled in each time a queue is refreshed corresponding to the token bucket is at least 5Gbps times With 640us equal to 3200kbits, it can be seen from the above calculation results that there are too many tokens to be filled in each refresh
[0017] In addition, in order to ensure the accuracy of Shaping, each token that needs to be filled is at least 32B in unit, that is, each token allows the source to send 32B of data, then the number of tokens to be filled is equal to 3200kbits divided by 32B, and the result is equal to 12.5K, 12.5K needs 14bits in binary representation. The above is just to refresh a queue. To refresh all 64k queues, at least 14bits multiplied by 64k equals 896kbits of RAM. If you want to improve the shaping precision, it will take up more RAM, which will affect the realization of other logic functions of the system

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for refreshing token bucket in flow limiting technology
  • Method and device for refreshing token bucket in flow limiting technology
  • Method and device for refreshing token bucket in flow limiting technology

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0041] Embodiments of the present invention provide a method and device for refreshing tokens during traffic limitation, the core idea of ​​which is: in the process of data packet queuing and scheduling, the queue number of the queue is acquired as the premise of triggering the token bucket refreshing process each time , which solves the problem in the prior art that the time interval for refreshing the same token bucket is too long.

[0042] The main idea of ​​the method provided by the embodiment of the present invention has been briefly introduced above, and the embodiment of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0043] Embodiment 1 of the present invention provides a method for refreshing the token bucket in the process of data packet queuing and scheduling. The process of the method is as follows image 3 shown, including:

[0044] Step 301: Obtain the queue number of the queu...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The method is used in the process of packet queuing and scheduling, and comprises: getting the queue number; according to queue number, getting the amount of current tokens and the amount of tokens to be filled up, both corresponds to the token-bucket; according to the amount of current tokens and the amount of token to be filled up, getting the amount of renewing tokens; renewing the amount of current tokens corresponding to the token bucket into the amount of renewing tokens. The invention also reveals an apparatus thereof.

Description

technical field [0001] The invention relates to the technical field of data communication, in particular to a method and a device for refreshing a token bucket in flow limitation technology. Background technique [0002] At present, traffic limiting technology (Shaping) is generally used in the communication field to limit the bandwidth of queue egress and make the egress traffic more uniform. The basic principles of Shaping are as follows: figure 1 As shown, the token bucket 101 is filled with tokens at the speed set by the user. The token bucket is a good tool for controlling data flow. The user can set the capacity of the token bucket. When the number of tokens in the token bucket When the bucket's capacity is exceeded, tokens are no longer filled. In Shaping technology, if there are data packets in the queue, the data packets in the queue will be dispatched out of the queue according to a certain period. If there are enough tokens in the token bucket to dispatch data ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L12/56H04L12/801
Inventor 杜文华林郁崔靖杰施雪峰林涛
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products