Buffer size of Router

Source: Internet
Author: User
Tags pack require
Data Buffer

Buffers was typically used when there was a difference between the rate at which data is received and the
Rate at which it can be processed, or in the case that these rates is variable.
A buffer often adjusts timing by implementing a queue algorithm in memory, simultaneously writing
Data into the queue at one rate and reading it at another rate.

bufferbloat

Bufferbloat is a phenomenon in a packet-switched computer network whereby excess buffering of packets
Inside the network causes high latency and jitter, as well as reducing the overall network throughput.
This problem was caused mainly by router and switch manufactures making incorrect assumptions and
Buffering packets for too long in cases where they should is dropped.
On older routers, buffers were fairly small so they filled quickly and therefore pakcets began to drop shortly
After the link became saturated.

High-speed routers

Loss can reduced by making buffers large enough.
Jitter:fluctuation in buffer size.
The buffer size in core Internet routers are typically chosen according to a rule of thumb which says:
Provide at least one round trip time ' s worth of buffering.
Recent theoretical work have challenged the rule of thumb:it seems that a buffer of just packets
should be sufficient.
The buffer in a Internet router has serveral roles. It accommodates transient bursts in traffic,
Without has to drop packets. It keeps a reserve of packets, so that the link doesn ' t go idle.
It also introduces queueing delay and jitter.
The network model comprises Parts:one part describing the dynamics of TCP, another
Describing the dynamics of the queue. [1]

Optimal Choice of the buffer size

Data packets of an Internet connection travel from a source node to a destination node via a
Series of routers. Some routers, particularly edge routers, experience periods of congestion
When packets spend a non-negligible time waiting in the router buffers to be transmitted
Over the next hop.
Congestion signals can be either packet losses or Explicit congestion notifications.
At the present state of the Internet, nearly all congestion signals is generated by packet losses.
Packets can dropped either when the router buffer was full or when Active Queue Management
(AQM) scheme is employed. Given an ambiguity in the choice of the AQM parameters
AQM is rarely used in practice. On the other hand, in the basic Drop Tail routers, the buffer size
Is the only one parameter to tune apart of the router capacity.
The first proposed rule of thumb for the choice of the router buffer size is to choose the buffer
Size equal to the Bandwidth-delay Product (BDP) of the outgoing link.
It is observed that the utilization of a link improves very fast with the increase of the buffer size
Until a certain threshold value. After that threshold value the further increase of the buffer size
Does not improve the link utilization but increases the queueing delay. [2]

Sizing Router Buffer

A link with n flows requires no more than:

For long-lived or short lived TCP flows.
The consequences on router design is enormous:a 2.5Gbps link carrying flows
Could reduce its buffer by 99% with negligible difference in throughput, and a 10Gbps link
Carrying 50000 flows requires only 10Mbits of buffering, which can easily be implemented
Using fast, On-chip SRAM.
If These buffers fill up, they cause queueing delay and delay-variance; When they overflow they
Cause packet loss, and when they underflow they can degrade throughput.
Router buffers is sized today based on a rule-of-thumb commonly attributed to a 1994 paper
by Villamizar and Song. Network operators follow the RULE-OF-THUMB and require that router
Manufacturers provide 250ms (or more) of buffering.

-----------------------------------------------------------------------------------------

Follow Rule-of-thumb:

A 10Gbps router Linecard needs buffers-20 million pack, 300MB
A 1Gbps router Linecard needs buffers-2 million pack, 30MB
A 100Mbps router Linecard needs buffers-2 thousand pack, 3MB

-----------------------------------------------------------------------------------------

Today (2005) backbone links commonly operate at 2.5Gbps or 10Gbps and carry over
10000 flows. We believe that significantly smaller buffers could being used in backbone routers
(e.g., by removing 99% of the buffers) without a loss in network utilization.
With declining memory prices, why isn't just overbuffer routers?
First, it complicates the design of high-speed routers, leading to higher power consumption,
More board space, and low density. Second, overbuffering increases end-to-end delay in the
Presence of congestion. Large buffers conflict with the low-latency needs of real time application.

Central Limit theorem: A sample of n is extracted from any population with a mean value of U and a variance of q^2, when n is sufficiently large,
The sampling distribution of the sample mean is approximate to the positive distribution of the mean value of U and variance of q^2/n.

We know from the central limit theorem so the aggregate window size does converge to a
Gaussian process.

The graph above shows the probability distribution of the sum of the congestion windows of all
Flows, with different propagation times and start times.
How does the shape of the Gaussian, and thus we buffer, depend on the number of flows?
If We have more flows, we would expect more statistical multiplexing and thus a narrower
Gaussian. In fact, the central limit theorem tells us if we increase the number of flows n,
The width of the Gaussian (or, more formally, it standard deviation) should decrease with

The role of the buffer is to absorb the fluctuation in the total window size. If the standard deviation
Of the total window size decrease with 1/root (n), we would expect the required amount of buffer
To do the same.

For short flows-the size of the buffer does not depend on the line-rate, the propagation delay of
The flows, or the number of flows; It is depends on the load of the link, and the length of the bursts.

Our model predicts, 98% utilization a buffer of RTT * C/SQRT (n) should be sufficient.
Decreasing the latency of a TCP flow would always be increase the loss rate. The loss rate of a TCP flow
is a function of the flow's window size and can be approximated to L = 0.76/w^2. If we reduce buffers,
We decrease the RTT of the flow, therefore decrease the average W and thus increase loss.

Rule-of-thumb

The rule of thumb for buffer sizing derives from the following goal:if capacity is limited, it ' s
Desirable to make sure the link never goes idle. Therefore there should always be some
Packets in the buffer. By reasoning on how the TCP responds to loss, we can work out how
Big the buffer needs to be.
The buffer needs to is at least WMAX/2 to avoid going empty during the pause. The key to
Sizing the buffer is to make sure and the sender pauses, the router buffer doesn ' t go
Empty and force the bottleneck link to go idle. (The original link is full, and after the data is out of the WMAX/2,
The router needs to replenish at least the amount of WMAX/2 data to keep the link fully utilized) It turns out the It is equal
to the distance (in bytes) between the peak and trough of the "sawtooth" representing the TCP
Window size.
Bursts from short flows do has an effect. However it is very small, and that the buffer size is,
In fact, dictated by the number of long flows.
If the buffer never goes empty, the router must be sending packets onto the bottleneck link at
Constant rate C. This is in turn means, ACKs arrive to the sender at rate C. The sender therefore
Pauses for exactly (WMAX/2)/C seconds for the WMAX/2 packets to be acknowledged. It then resumes
Sending, and starts increasing its window size again.
The buffer would just avoid going empty if the first packet from the sender shows up at the buffer just as
It hits empty, i.e., (WMAX/2)/C <= b/c or B >= WMAX/2

congestion threshold Value

When diff >= Beta, we judged the router to be congested.
In the Vegas, beta=5.
In the Veno, Beta=3.
A 2.5Gbps link typically carries over 10000 flows at a time.
Network operators follow the RULE-OF-THUMB and require that router
Manufacturers provide 250ms (or more) of buffering. [3]
So for a 2.5Gbps link, its router cache size is about 50,000 packets, 75MB.
Because there are about 10,000 connections on the link, when the router is congested, the average router cache is 5 packets per connection.
Of course, because the TCP connection on the Internet is not synchronous, the beta value in the event of congestion has yet to be studied.

Synchronization

Flows is not synchronized in a backbone router carrying thousands of flows with varying RTTs.
Small variations in RTT or processing time is sufficient to prevent synchronization; and the absence
Of synchronization have been demonstrated in real networks. Likewise, we found in our simulations
And experiments that while in-phase synchronization are common for under concurrent flows,
It is very rare above concurrent flows.

Reference

[1] "Buffer Requirements for high-speed routers"
[2] Optimal Choice of the Buffer Size in the Internet routers
[3] Recent Result on Sizing Router buffers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.