Enable async ASIC_DB writes for Southbound-ZMQ#1819
Enable async ASIC_DB writes for Southbound-ZMQ#1819inder-nexthop wants to merge 1 commit intosonic-net:masterfrom
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
2711b27 to
18b7670
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@inder-nexthop, this PR appears to be doing the same thing as done in the PR #1801. Would you please check? |
|
@vganesan-nokia This PR is achieving the same goal, yes. This change is being made in syncd, extending the existing RedisClient to perform asynchronous ASIC_DB writes, while not blocking on the ack back and performing the write in ansynchronous fashion. Also accounting for the DPU vs NPU distinction to preserve PR #1694's behavior on DPU switches. CC: @venkit-nexthop |
Signed-off-by: Inder Pooni <inder@nexthop.ai>
18b7670 to
d02b003
Compare
Thanks for the response. Currently the ZmqRedisClient asynchronously writes the ASIC_STATE only. Writing of other informaiton like VIDTORID, RIDTOVID, COUNTERS, LANES, etc (other than ASIC_STATE) are still synchronously written in ASIC_DB in the hot path of route programming. In our testing of pr 1819 and comparing with pr 1801, we see slightly lower performance (about 4.5% degradation) when compared to pr 1801. We can try implementing async write of everything instead of just ASIC_STATE only and see if it improves. |
|
@vganesan-nokia Thank you for testing this and bringing it to our attention. I will do some profiling and look into making the other operations that are on the hot path (VIDTORID, RIDTOVID, etc.) async as well. It would be great if you could help us test and compare once that change is in place. |
Why I did it
We are extending southbound ZMQ support (currently only used for DPU switches) to regular NPU switches for improved route offloading performance. However, PR #1694 introduced DisabledRedisClient that prevents syncd from writing ASIC state to Redis when ZMQ is enabled.
How I did it
Added DPU detection logic in syncd by reading switch_type from
CONFIG_DB DEVICE_METADATAtable.Implemented logic for Redis client selection:
Extended RedisClient to support asynchronous mode using swss::AsyncDBUpdater for non-blocking Redis writes when ZMQ is enabled
How to verify it
Used the route benchmark script under
sonic-mgmt/tests/scripts/route_programming_benchmark.py.Also tested that the routes are written to ASIC_STATE table with a scale of 500k routes: