Skip to content

Commit

Permalink
[chassis-packet] Change the Orchagent redis pop batch size to 128 to …
Browse files Browse the repository at this point in the history
…handle link notification faster. (#21771)

What I did:
Change the Orchagent redis pop batch size to 128 to handle link notification faster.

Why I did:
As part of Ixia BGP convergence test https://github.com/sonic-net/sonic-mgmt/blob/master/tests/snappi_tests/multidut/bgp/test_bgp_outbound_uplink_multi_po_flap.py we found that because of SAI programming slowness which is around 1500 Routes/sec. [Takes about approx 40sec+/- to program 60K routes across multiple iteration]
Because of above slowness even if we have Link Notification available Orchagent will not process it immediately as current OA will process 1024 Entries (Route entries in our case) before it can pick Link Notification for processing. Now 1K entries can take about 2 sec+/- and if link notification are little spread out [not back 2 back] we can have batch of 1K entries which accumulate SAI delay of 2 sec.

To optimize Link processing and give more chance to OA to pick Link Notification we reduce OA processing to 128 entries and this helped to reduce convergence time to about overall 2 sec.

Changing OA processing from 1K to 128 entries does not have any impact of Route Programming as SAI slowness seems be tied with sequential processing at 1500 Routes per/sec. However this is helpful in processing Link Notification quicker. For our test it reduce Convergence time from about 12-15sec to 2 sec.

How I verify:

Ran above ixia test in multiple iteration with both 1024 and 128 pop batch size and compared the performance.
---------

Signed-off-by: Abhishek Dosi <[email protected]>
  • Loading branch information
abdosi authored Feb 20, 2025
1 parent dddb6cc commit a8134df
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions dockers/docker-orchagent/orchagent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@ fi
mkdir -p /var/log/swss
ORCHAGENT_ARGS="-d /var/log/swss "

# Set orchagent pop batch size to 1024
ORCHAGENT_ARGS+="-b 1024 "
LOCALHOST_SWITCHTYPE=`sonic-db-cli CONFIG_DB hget "DEVICE_METADATA|localhost" "switch_type"`
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 "
else
# Set orchagent pop batch size to 1024
ORCHAGENT_ARGS+="-b 1024 "
fi

# Set synchronous mode if it is enabled in CONFIG_DB
SYNC_MODE=$(echo $SWSS_VARS | jq -r '.synchronous_mode')
Expand Down

0 comments on commit a8134df

Please sign in to comment.