Scheduler Buffer Size Overview
Large bursts of traffic from faster interfaces can cause congestion and dropped packets on slower interfaces that have small delay buffers. For example, a Juniper Networks device operating at the edge of the network can drop a portion of the burst traffic it receives on an interface from a faster interface on a router at the network core. On Juniper Networks devices, you can configure large delay buffers.
To ensure that traffic is queued and transmitted properly on slower interfaces, you can configure a buffer size larger than the default maximum.
This section contains the following topics:
Maximum Delay Buffer Size for vSRX Virtual Firewall Interfaces
For a vSRX Virtual Firewall virtual machine, 1 Gbps interfaces have a default delay buffer time of 1 second, a maximum buffer time of 32 seconds, and a maximum buffer size of 128 MB. Use the following CLI command to set the maximum delay buffer time for a scheduler:
set class-of-service schedulers be-scheduler buffer-size temporal 32m
On a logical vSRX Virtual Firewall interface, the delay buffer size for a queue that does not have a specific shaping rate acts as a guaranteed minimum buffer size, and the queue is allowed to grow without any packet drops if the queue size is less then the guaranteed buffer size.
The sum of the guaranteed delay buffer sizes for all the queues acts as a pool that can be shared among the queues that do not have a specific shaping rate.
The delay buffers are used to control the size of the queues, but do not represent actual memory. The packet buffer pool contains the actual memory used to store packets.
Packets are tail-dropped (100% probability) from the queue if:
-
The total buffer limit would be exceeded.
-
The queue size would exceed the total free buffer size.
-
The packet buffer pool is less then 25% free and the queue exceeds the guaranteed minimum buffer size.
-
The packet buffer pool is only 5% free (or less).
Packets also can be dropped by a RED profile (RED-dropped) if the queue size exceeds the guaranteed buffer size. The queue size will be restricted to be less then or equal to the free shared buffers available.
Support for vSRX Virtual Firewall virtual machines depends on the Junos OS release in your installation.
Delay Buffer Size Allocation Methods
You can specify delay buffer sizes for each queue using schedulers. The queue buffer can be specified as a period of time (microseconds) or as a percentage of the total buffer or as the remaining buffer. Table 1 shows different methods that you can specify for buffer allocation in queues.
|
Buffer Size Allocation Method |
Description |
|---|---|
|
Percentage |
A percentage of the total buffer. |
|
Temporal |
A period of time, value in microseconds. When you configure a temporal buffer, you must also configure a transmit rate. The system calculates the queue buffer size by multiplying the available bandwidth of the interface times the configured temporal value and transmit rate. When you specify a temporal method, the drop profile is assigned a static buffer and the system starts dropping packets once the queue buffer size is full. By default, the other buffer types are assigned dynamic buffers that use surplus transmission bandwidth to absorb bursts of traffic. |
|
Remainder |
The remaining buffer available. The remainder is the percentage buffer that is not assigned to other queues. For example, if you assign 40 percent of the delay buffer to queue 0, allow queue 3 to keep the default allotment of 5 percent, and assign the remainder to queue 7, then queue 7 uses approximately 55 percent of the delay buffer. Optionally, you can specify the percentage of the remainder to be used for allocating the buffer size of the scheduler on a prorated basis. If the remainder percentage is not specified, the remainder value will be shared equally. |
Delay Buffer Sizes for Queues
You specify delay buffer sizes for queues using schedulers. The system calculates the buffer size of a queue based on the buffer allocation method you specify for it in the scheduler. See Table 1 for different buffer allocation methods and Table 2 for buffer size calculations.
|
Buffer Size Allocation Method |
Queue Buffer Calculation |
Example |
|---|---|---|
|
Percentage |
available interface bandwidth x configured buffer size percentage x maximum delay buffer time = queue buffer |
Suppose you configure a queue on a 64 Kbps interface to use 30 percent of the available delay buffer size. The system uses the maximum available delay buffer time (4 seconds) and allocates the queue 9600 bytes of delay buffer: 64 Kbps x 0.3 x 4 s=76,800 bits=9,600 bytes |
|
Temporal |
available interface bandwidth x configured transmit rate percentage x configured temporal buffer size = queue buffer |
Suppose you configure a queue on a 64 Kbps interface to use 3,000,000 microseconds (3 seconds) of delay buffer, and you configure the transmission rate to be 20 percent. The queue receives 4800 bytes of delay buffer: 64 Kbps x 0.2 x 3 s=38,400 bits=4,800 bytes If you configure a temporal value that exceeds the maximum available delay buffer time, the queue is allocated the buffer remaining after buffers are allocated for the other queues. Suppose you configure a temporal value of 6,000,000 microseconds on a 64 Kbps interface. Because this value exceeds the maximum allowed value of 4,000,000 microseconds, the queue is allocated the remaining delay buffer. |
When you specify the buffer size as a percentage, the system ignores the transmit rate and calculates the buffer size based only on the buffer size percentage.