Skip to content

[xcvrd] Optimize module initialization performance (#611)#16

Merged
r12f merged 1 commit intoAzure:202412from
Junchao-Mellanox:msft-202412-cmis
May 22, 2025
Merged

[xcvrd] Optimize module initialization performance (#611)#16
r12f merged 1 commit intoAzure:202412from
Junchao-Mellanox:msft-202412-cmis

Conversation

@Junchao-Mellanox
Copy link

Backport PR sonic-net/sonic-platform-daemons#611

Description

  1. Use hget instead of hgetall to gain better performance
  2. Optimize SfpStateUpdateTask.init:
  • Use cache in this function for different logical ports with the same physical module.
  • Handles transceiver info table and media settings before any other table.

Motivation and Context

Improve module initialization performance. Due my test:

  1. hget is 7 times faster than hgetall when getting cmis module state
  2. Before optimizing SfpStateUpdateTask.init, the last module takes about 5 minutes to finish notify_media_settings call; after the optimization, the last module takes about 1 minutes to finish notify_media_settings` call.

How Has This Been Tested?

Manual test

Additional Information (Optional)

@r12f r12f merged commit 5016ded into Azure:202412 May 22, 2025
3 checks passed
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