Skip to content

[orchagent] HLD: Redesign Orchagent Route Programming#2328

Open
venkit-nexthop wants to merge 1 commit into
sonic-net:masterfrom
nexthop-ai:orchagent-route-redesign-hld
Open

[orchagent] HLD: Redesign Orchagent Route Programming#2328
venkit-nexthop wants to merge 1 commit into
sonic-net:masterfrom
nexthop-ai:orchagent-route-redesign-hld

Conversation

@venkit-nexthop
Copy link
Copy Markdown

Summary

  • Adds a new HLD document under doc/orchagent/ describing a redesign of the orchagent route programming hot path.
  • The redesign updates m_toSync directly from mqPollThread, splits drain() into three independently schedulable stages (toBulkTask, flushTask, responseHandlingTask) with yield/resume semantics and bounded time quanta, and makes the route state publish asynchronous.
  • Documents the new show orchagent tasks / sonic-clear orchagent tasks instrumentation.
  • Diagrams are checked in as external PNGs under doc/orchagent/images/orchagent_route_redesign/ (no inline base64).

Why

Tracked under sonic-net/sonic-buildimage#27098: the current serial pops() / addToSync() / drain() flow in the orchagent main thread lets ZMQ buffers and intermediate non-coalescing queues back up under churn and starves other orch agents of CPU.

Test plan

  • HLD reviewed against the SONiC HLD template.
  • Diagrams render correctly on GitHub via the relative images/orchagent_route_redesign/*.png links.
  • Doc-only change; no build/test impact.

Add a high-level design document covering the orchagent route programming
redesign. The redesign eliminates non-coalescing intermediate queues by
updating m_toSync directly from mqPollThread, splits drain() into three
independently schedulable stages (toBulkTask, flushTask,
responseHandlingTask) with yield/resume semantics and bounded time quanta,
and makes the route state publish asynchronous. Per-task instrumentation
in orchdaemon and corresponding show/clear CLIs are also covered.

Tracked under sonic-net/sonic-buildimage#27098.

Signed-off-by: Venkit Kasiviswanathan <venkit@nexthop.ai>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@venkit-nexthop
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants