Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action] [PR:1527] Optimize counter initialization by reducing the number of bulk counter poll calls and communication between swss/sairedis #25

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

mssonicbld
Copy link
Collaborator

Optimize counter initialization by reducing the number of bulk counter poll calls and communication between swss(orchagent)/sairedis(syncd) during initialization.

Originally, orchagent notifies syncd to initialize the counter using an extended sairedis call SAI_REDIS_SWITCH_ATTR_FLEX_COUNTER for each SAI object with the object ID as the key, which means the number of the extended sairedis calls is identical as the number of objects. It takes time to finish all the extended sairedis calls.

Now, for counter groups that have many objects (e.g., port, PG, queues, etc), orchagent notifies syncd to initialize the counter using a single extend sairedis call with many objects' ID as the key (format: <key1>,<key2>,...<keyn>). So, it takes much less time to initialize the counters because fewer extend sairedis calls are required.

Details:

  • In sairedis, the bulk counter is supported for all counter groups except Buffer Pool Counter and DASH ENI counter.

  • In swss, bulk counter for the following counter groups

    • priority group watermark
    • priority group drop
    • queue watermark
    • queue stat
    • PFC watchdog

HLD sonic-net/SONiC#1862

…r poll calls and communication between swss/sairedis

Optimize counter initialization by reducing the number of bulk counter poll calls and communication between swss(orchagent)/sairedis(syncd) during initialization.

Originally, `orchagent` notifies `syncd` to initialize the counter using an extended sairedis call `SAI_REDIS_SWITCH_ATTR_FLEX_COUNTER` for each SAI object with the object ID as the key, which means the number of the extended sairedis calls is identical as the number of objects. It takes time to finish all the extended sairedis calls.

Now, for counter groups that have many objects (e.g., port, PG, queues, etc), `orchagent` notifies `syncd` to initialize the counter using a single extend sairedis call with many objects' ID as the key (format: `<key1>,<key2>,...<keyn>`). So, it takes much less time to initialize the counters because fewer extend sairedis calls are required.

Details:
- In sairedis, the bulk counter is supported for all counter groups except `Buffer Pool Counter` and `DASH ENI counter`.
- In swss, bulk counter for the following counter groups

  - priority group watermark
  - priority group drop
  - queue watermark
  - queue stat
  - PFC watchdog

HLD sonic-net/SONiC#1862
@mssonicbld
Copy link
Collaborator Author

Original PR: sonic-net/sonic-sairedis#1527

@mssonicbld
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit c29f53d into Azure:202412 Feb 28, 2025
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant