From 1dade04d0a38f0db1a892cc0afa8a72280e942f6 Mon Sep 17 00:00:00 2001 From: Sonic Build Admin Date: Thu, 2 Oct 2025 21:27:29 +0000 Subject: [PATCH] [DPU] Increase Bulker limit and pop batch size #### Why I did it Increase the pop batch size and Max Bulker limit to 65536 to speed up applying the high volume Dash configuration Depends on https://github.com/sonic-net/sonic-sairedis/pull/1660 https://github.com/sonic-net/sonic-swss-common/pull/1084 https://github.com/sonic-net/sonic-swss/pull/3910 ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it #### How to verify it ``` root@sonic:/home/admin# ps -aux | grep orch root 11118 1.5 0.4 464804 267368 pts/0 Sl 02:50 0:00 /usr/bin/orchagent -d /var/log/swss -b 65536 -z zmq_sync -k 65536 -m B0:CF:0E:20:8E:DE -q tcp://eth0-midplane 2025 Sep 30 18:48:38.911835 sonic NOTICE swss#orchagent: :- main: Setting maximum bulk size in bulk mode as 65536 ``` Apply Scale config and verify #### Which release branch to backport (provide reason below if selected) - [ ] 202205 - [ ] 202211 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 #### Tested branch (Please provide the tested image version) - [ ] - [ ] #### Description for the changelog #### Link to config_db schema for YANG module changes #### A picture of a cute animal (not mandatory but encouraged) --- dockers/docker-orchagent/orchagent.sh | 10 ++++++---- platform/vs/docker-sonic-vs/orchagent.sh | 14 ++++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/dockers/docker-orchagent/orchagent.sh b/dockers/docker-orchagent/orchagent.sh index aee9ecb1a5..3768b3d7b3 100755 --- a/dockers/docker-orchagent/orchagent.sh +++ b/dockers/docker-orchagent/orchagent.sh @@ -23,17 +23,19 @@ if [[ x"${LOCALHOST_SWITCHTYPE}" == x"chassis-packet" ]]; then # Set orchagent pop batch size to 128 for faster link notification handling # during route-churn ORCHAGENT_ARGS+="-b 128 " +elif [[ x"$LOCALHOST_SWITCHTYPE" == x"dpu" ]]; then + # To handle high volume of objects in DPU + ORCHAGENT_ARGS+="-b 65536 " else # Set orchagent pop batch size to 1024 ORCHAGENT_ARGS+="-b 1024 " fi -# Set zmq mode by default for smartswitch DPU +# Set zmq mode by default for smartswitch DPU and increase the max bulk limit # Otherwise, set synchronous mode if it is enabled in CONFIG_DB SYNC_MODE=$(echo $SWSS_VARS | jq -r '.synchronous_mode') -SWITCH_TYPE=$(echo $SWSS_VARS | jq -r '.switch_type') -if [ "$SWITCH_TYPE" == "dpu" ]; then - ORCHAGENT_ARGS+="-z zmq_sync " +if [ "$LOCALHOST_SWITCHTYPE" == "dpu" ]; then + ORCHAGENT_ARGS+="-z zmq_sync -k 65536 " elif [ "$SYNC_MODE" == "enable" ]; then ORCHAGENT_ARGS+="-s " fi diff --git a/platform/vs/docker-sonic-vs/orchagent.sh b/platform/vs/docker-sonic-vs/orchagent.sh index 44667c0d12..b3b272c504 100755 --- a/platform/vs/docker-sonic-vs/orchagent.sh +++ b/platform/vs/docker-sonic-vs/orchagent.sh @@ -37,15 +37,21 @@ fi mkdir -p /var/log/swss ORCHAGENT_ARGS="-d /var/log/swss " -# Set orchagent pop batch size to 8192 -ORCHAGENT_ARGS+="-b 8192 " +SWITCH_TYPE=$(echo $SWSS_VARS | jq -r '.switch_type') + +if [ "$SWITCH_TYPE" == "dpu" ]; then + ORCHAGENT_ARGS+="-b 65536 " +else + # Set orchagent pop batch size to 8192 + ORCHAGENT_ARGS+="-b 8192 " +fi # Set zmq mode by default for DPU vs # Otherwise, set synchronous mode if it is enabled in CONFIG_DB SYNC_MODE=$(echo $SWSS_VARS | jq -r '.synchronous_mode') -SWITCH_TYPE=$(echo $SWSS_VARS | jq -r '.switch_type') + if [ "$SWITCH_TYPE" == "dpu" ]; then - ORCHAGENT_ARGS+="-z zmq_sync " + ORCHAGENT_ARGS+="-z zmq_sync -k 65536 " elif [ "$SYNC_MODE" == "enable" ]; then ORCHAGENT_ARGS+="-s " fi