EDM01-36v10 DAG_9.2X2_Card_User_Guide - Guidance for stream buffer sizing
©2010 - 2012 Endace Technology Ltd. Confidential - Version 10 - May 2012
71
Guidance for stream buffer sizing
This section describes how to calculate the required stream buffer size for each DAG card on a particular
network. Once you have calculated the stream buffer requirements you need to ensure the memory
allocated to the DAG card is adequate, and update if required.
How the DAG card handles bursts of traffic depends on:
•
the application processing rate - when the application processing rate slows, the stream buffer starts
to fill.
•
the size of the stream buffer – how many packets can be held in the stream buffer before packet
loss occurs.
•
the data arrival rate - Data rates above the application processing rate cause the stream buffer to fill.
Selecting stream buffer size
The DAG card writes the incoming traffic into the associated stream buffer. Applications, using DAG
APIs, read the data from the stream buffer.
Packet dropping occurs if the application cannot process the data fast enough and the stream buffer fills
up.
The required maximum size of the stream buffer is related to the following:
•
Burst duration
•
Latency
Burst duration
The incoming traffic does not arrive at a constant rate. It fluctuates between maximum and minimum
rates.
IF the incoming traffic rate exceeds the rate at which the application processes data, the buffer will start
to fill. In many cases the maximum burst rate will be equal to the link data rate (line rate). If there is
not enough room to accommodate the burst traffic, packets will be dropped.
The maximum burst duration can be defined as the maximum duration the stream buffer can receive
packets before dropping packets. It can be calculated as the time required to fill the stream buffer at
that maximum burst rate, with the application trying to empty the stream buffer at its processing speed.
To calculate the maximum burst duration, use the following formula:
Where the multipliers:
•
1048576 converts MiB to bytes.
•
125000 converts Megabits per second to bytes per second.
Note:
Applications writing data to disk can experience large delays when waiting for disk writes to complete. A
good rule of thumb is to size the stream buffer to accommodate a Maximum Burst Duration of at least
one second for such applications.