[zmqorch]: Restore drain-until-empty consumer for non-DPU/fabric#4578
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
c18add4 to
847130e
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
847130e to
5b7b4b3
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
5b7b4b3 to
a842a56
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
a842a56 to
f8bf093
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
LGTM |
f8bf093 to
489cad7
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
489cad7 to
30fc27f
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
PR sonic-net#3910 changed ZmqConsumer::execute() to perform a single batch pop per invocation, primarily to reduce peak memory in DASH (DPU) workloads. For non-DPU / non-fabric switches that receive high volumes of APPL_DB route updates from fpmsyncd, this regressed throughput: each execute() call no longer drains the consumer table, so updates take many more polls to apply. Introduce a ZmqRouteConsumer subclass that restores the prior drain-until-empty loop in execute(). ZmqOrch::addConsumer() selects ZmqRouteConsumer for non-DPU / non-fabric switch types; DPU and fabric continue to use ZmqConsumer to preserve the bounded-memory behavior added in sonic-net#3910. Also define gMySwitchType in orchagent/p4orch/tests/test_main.cpp so p4orch_tests links once zmqorch.cpp references the global. Signed-off-by: Venkit Kasiviswanathan <venkit@nexthop.ai>
30fc27f to
d63ed1c
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Venkit Kasiviswanathan <venkit@nexthop.ai>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@prabhataravind @qiluo-msft @prsunny @vivekrnv @deepak-singhal0408 |
|
thanks @vivekrnv |
|
@venkit-nexthop : @deepak-singhal0408 : this is reversing the changes done here: #3269 Have we verified we are not regressing the previous behavior ? |
@abdosi sorry for the late response. I am catching up after my leave. |
…ic-net#4578) * [zmqorch]: Restore drain-until-empty consumer for non-DPU/fabric PR sonic-net#3910 changed ZmqConsumer::execute() to perform a single batch pop per invocation, primarily to reduce peak memory in DASH (DPU) workloads. For non-DPU / non-fabric switches that receive high volumes of APPL_DB route updates from fpmsyncd, this regressed throughput: each execute() call no longer drains the consumer table, so updates take many more polls to apply. Introduce a ZmqRouteConsumer subclass that restores the prior drain-until-empty loop in execute(). ZmqOrch::addConsumer() selects ZmqRouteConsumer for non-DPU / non-fabric switch types; DPU and fabric continue to use ZmqConsumer to preserve the bounded-memory behavior added in sonic-net#3910. Also define gMySwitchType in orchagent/p4orch/tests/test_main.cpp so p4orch_tests links once zmqorch.cpp references the global. Signed-off-by: Venkit Kasiviswanathan <venkit@nexthop.ai> Signed-off-by: Yogapriya Mohankumar <ymohanku@cisco.com>
What I did
PR #3910 changed
ZmqConsumer::execute()to perform a single batch pop per invocation. This change introduces aZmqRouteConsumersubclass that restores the prior drain-until-empty loop inexecute().ZmqOrch::addConsumer()selectsZmqRouteConsumerfor non-DPU / non-fabric switch types, while DPU and fabric continue to useZmqConsumer.Also defines
gMySwitchTypeinorchagent/p4orch/tests/test_main.cppsop4orch_testslinks oncezmqorch.cppreferences the global. Production (main.cpp) and mock tests (mock_orchagent_main.cpp) already define it.Why I did it
PR #3910's single-batch pop was primarily motivated by reducing peak memory in DASH (DPU) workloads. For non-DPU / non-fabric switches receiving high volumes of APPL_DB route updates from fpmsyncd, the change regressed throughput: each
execute()call no longer drains the consumer table, so updates take many more polls to apply.This is a targeted temporary fix that preserves the bounded-memory behavior added in #3910 for DPU/fabric, while restoring the earlier drain semantics for the workloads that depend on them.
How I verified it
gMySwitchType: productionorchagentresolves viamain.cpp,mock_testsviamock_orchagent_main.cpp, andp4orch_testsvia the new definition intest_main.cpp.Details if related