Buffer Management
Table 1 Buffer View
| Command | Purpose |
|---|---|
| show buffer profile | Display buffer profile configuration. |
show buffer profile
Section titled “show buffer profile”[Command] show buffer profile
[Purpose] Display buffer profile configuration.
[View] Privileged User View
[Use Cases]
sonic# show buffer profile{ "egress_lossless_profile":{ "pool":"[BUFFER_POOL|ingress_lossless_pool]", "size":"0", "static_th":"23001600" }, "egress_lossy_profile":{ "dynamic_th":"2", "pool":"[BUFFER_POOL|lossy_pool]", "size":"1518" }, "ingress_lossless_profile":{ "dynamic_th":"1", "pool":"[BUFFER_POOL|ingress_lossless_pool]", "size":"1518", "xoff":"38816", "xon_offset":"13440" }, "ingress_lossy_profile":{ "pool":"[BUFFER_POOL|lossy_pool]", "size":"0", "static_th":"23001600" }, "pg_lossless_100000_40m_profile":{ "dynamic_th":"1", "pool":"[BUFFER_POOL|ingress_lossless_pool]", "size":"1518", "xoff":"38816", "xon":"0", "xon_offset":"13440" }, "pg_lossless_25000_40m_profile":{ "dynamic_th":"1", "pool":"[BUFFER_POOL|ingress_lossless_pool]", "size":"1518", "xoff":"16928", "xon":"0", "xon_offset":"13440" }}Buffer Config
Section titled “Buffer Config”Table 2 Buffer Config
| Command | Purpose |
|---|---|
| buffer-profile buffer_profile_name | Create a buffer profile, and enter Buffer Configuration View. |
| mode lossless {static static_th|dynamic dynamic_th} size size xoff xoff xon-offset xon-offset [xon xon] | Set a lossless buffer profile. |
| mode lossy {static static_th|dynamic dynamic_th} size size | Set a lossy buffer profile. |
buffer-profile
Section titled “buffer-profile”[Command] buffer-profile buffer_profile_name
[Purpose] Create a buffer profile, and enter Buffer Configuration View.
[Parameters]
| Parameter | Description |
|---|---|
| buffer_profile_name | Profile name. |
[View] Global Configuration View
[Notes] Run command no buffer-profile buffer_profile_name to delete the buffer profile.
[Use Cases]
sonic(config)# buffer-profile testsonic(config-buffer-profile-test)#mode lossless {static
Section titled “mode lossless {static”[Command] mode lossless {static static_th|dynamic dynamic_th} size size xoff xoff xon-offset xon-offset [xon xon]
[Purpose] Set a lossless buffer profile.
[Parameters]
| Parameter | Description |
|---|---|
| static_th | Set the static threshold value in bytes. The range is from 0 to 47218432. |
| dynamic_th | Set the dynamic threshold value in integer. The range is from -4 to 3. Dynamic threshold = 2dynamic_th * remaining available buffer. For example, if dynamic_th is set to 1, then dynamic threshold is two times the remaining available buffer, that is, the actual threshold is two-thirds of the total available buffer. Recommended value is -3 for CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2, and -1 for other models. |
| size | Set the guaranteed buffer in bytes. The recommended value is 1518. |
| xoff | Set PFC pause frame trigger cache threshold value in bytes, which is recommended to be an integer multiple of the cell size. Xoff value must be greater than xon value. This parameter is not supported on CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2. |
| xon-offset | Set PFC pause frame stop buffer threshold value in bytes, it is recommended to be an integer multiple of cell size. The recommended value is 13440. This parameter is not supported on CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2. |
| xon | (Optional) It should be an integer multiple of cell size and the unit is byte. It is recommended to configure 0, since the actual xon takes the larger value of xon and xon-offset, so it is generally not necessary to set the value of xon. This parameter is not supported on CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2. |
[View] Buffer Configuration View
[Notes]
The sum of the lossless buffers allocated to each queue shall be no greater than the lossless pool size. It is generally not recommended to modify the interface egress queue buffer manually, so please be careful. Setting unreasonable parameters may cause loss of packets while forwarding traffic on the interface.
[Use Cases]
sonic(config)# buffer-profile buffer_test1sonic(config-buffer-profile-buffer_test1)# mode lossless dynamic -1 size 1518 xoff 46496 xon-offset 13440mode lossy{static
Section titled “mode lossy{static”[Command] mode lossy {static static_th|dynamic dynamic_th} size size
[Purpose] Set a lossy buffer profile.
[Parameters]
| Parameter | Description |
|---|---|
| static_th | Set the static threshold value in bytes. This parameter is meaningless on CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2, and should be configured as 0. On other models of switches, it should be no larger than the lossy pool size. |
| dynamic_th | Set the dynamic threshold value in integer. Dynamic threshold = (dynamic_th + 6) * remaining available buffer on CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2. On other models of switches, dynamic threshold = 2dynamic_th * remaining available buffer. |
| size | Set the guaranteed buffer in bytes. On CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2, it is recommended to be an integer multiple of the cell size. On other switch models, the recommended value is 1518. |
[View] Buffer Configuration View
[Notes] The sum of the lossy buffers allocated to each queue shall be no greater than the lossy pool size.
[Use Cases]
sonic(config)# buffer-profile buffer_testsonic(config-buffer-profile-buffer_test)# mode lossy size 1518 dynamic 1