Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove redundant calls to get child scheduler group during initializa…
…tion (#1965) - What I did The QoS orchagent calls SAI APIs to get the number of child scheduler groups and then initialize them. After that, the size of the child scheduler groups vector will be non-zero, which indicates the child scheduler groups have been initialized and prevents QoS orchagent from calling SAI get APIs again. However, on some platforms, it may be that some of the scheduler groups don't have child groups, leaving size of child scheduler groups always being zero. It causes QoS orchagent to call the SAI get API each time the scheduler group is handled, which wastes a lot of time, especially during fast reboot. An extra flag indicating whether the child groups have been initialized is introduced to avoid redundant calls. - Why I did it To optimize QoS orchagent performance during initialization especially for fast reboot. - How I verified it It can be covered by the existing regression test. - Details if related I did a pair of tests, comparing the time to handle scheduler and child scheduler groups between the old and the new (optimized) version. Dump and sairedis.record attached. Signed-off-by: Stephen Sun <[email protected]>
- Loading branch information