Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

shared-buffer

date_range 31-May-24

Syntax

content_copy zoom_out_map
shared-buffer {
    egress {
        buffer-partition (lossless | lossy | multicast) {
            percent percent;
            dynamic-threshold threshold-value;
        }
        percent percent;
    }
    ingress {
        percent percent;
        buffer-partition (lossless | lossless-headroom | lossy) {
            percent percent;
            dynamic-threshold threshold-value;
        }
    }
}

Hierarchy Level

content_copy zoom_out_map
[edit class-of-service]

Description

Configure the global shared buffer pool allocation to ports. Shared buffers are a pool of buffer space that the system can allocate dynamically across all of its ports as memory space is needed. Some buffer space is reserved for dedicated buffers (buffers allocated permanently to ports), headroom buffers (buffers that help prevent packet loss on lossless flows), and other buffers.

The device uses the shared-buffer pool to absorb traffic bursts after the dedicated-buffer-pool is exhausted. The shared pool threshold is dynamically calculated based on a factor called “alpha”.

Configure the way the system uses the available (user-configurable) buffer space by setting the shared-buffer percentage for the ingress buffer pool and for the egress buffer pool.

The percentage you specify is the percentage of available buffer space allocated to the global shared ingress buffer pool or to the global shared egress buffer pool. If you allocate less than 100 percent of the available buffer space to the shared buffer pool, the remaining buffer space is added to the dedicated buffer pool. (You cannot directly configure the dedicated buffer pool for each port; dedicated buffers are allocated evenly across all the ports.)

You can adjust the maximum size of the shared-buffer pool by configuring the dynamic-threshold values:

  • By adjusting the value for the egress partition (the calculation includes the alpha value and the number of competing queues).

content_copy zoom_out_map
[edit class-of-service shared-buffer egress buffer-partition dynamic-threshold threshold-value]
  • By adjusting the value for the ingress partition (the calculation includes the alpha value and the number of competing queues).

content_copy zoom_out_map
[edit class-of-service shared-buffer ingress buffer-partition dynamic-threshold threshold-value
CAUTION:

Changing the buffer configuration is a disruptive event. Traffic stops on all ports until the buffer reprogramming is complete.

You can also partition the ingress shared buffer pool and the egress shared buffer pool to adjust the buffer allocations for different mixes of network traffic (best-effort, lossless, multicast) using the buffer-partition statement.

Note:

If you commit a buffer configuration for which the device does not have sufficient resources, the device might log an error instead of returning a commit error. In that case, a syslog message is displayed on the console. For example:

content_copy zoom_out_map
user@host# commit 
configuration check succeeds

Message from syslogd@host at Jun 13 11:11:10  ...
host dc-pfe: Not enough Ingress Lossless headroom.(Already allocated more). Dedicated : 14340 Lossy : 47100 Lossless 4239 Headroom 21195 Avail : 20781
commit complete

If the buffer configuration commits but you receive a syslog message that indicates the configuration cannot be implemented, you can:

  • Reconfigure the buffers or reconfigure other parameters (for example, the PFC configuration, which affects the need for lossless headroom buffers and lossless buffers—the more priorities you pause, the more lossless and lossless headroom buffer space you need), then attempt the commit operation again.

  • Roll back the device to the last successful configuration.

If you receive a syslog message that says the buffer configuration cannot be implemented, you must take corrective action. If you do not fix the configuration or roll back to a previous successful configuration, the system behavior is unpredictable.

Options

The remaining statements are explained separately. See CLI Explorer.

Required Privilege Level

interface—To view this statement in the configuration.

interface-control—To add this statement to the configuration.

Release Information

Statement introduced in Junos OS Release 12.3.

footer-navigation