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

Reduce time taken by show commands on multi-asic platforms #1544

Merged
merged 5 commits into from
Apr 4, 2021

Conversation

abdosi
Copy link
Contributor

@abdosi abdosi commented Apr 3, 2021

What I did:
Optimize/Reduce the time taken by show interface * and show ip bgp * commands on Multi-asic platforms.

How I did:
When checking for whether given port/port-channel/bgp-session is internal we used to walk through all namespace and collect data from each of then and then filter out.
Now as part of this PR we pass the namespace where port/port-channel/bgp-session belongs and then filter them out thus reducing the time considerably.

How I verify:

Before fix:

abdosi@xxxx:~$ time show interface status
real    1m0.347s
user    0m9.928s
sys     0m2.292s

abdosi@xxxx:~$ time show interface counters
real    0m43.750s
user    0m8.520s
sys     0m2.056s

abdosi@xxxx:~$ time show ip bgp summary
real    0m17.255s
user    0m2.476s
sys     0m0.804s

After fix:

abdosi@xxxx:~$ time show interface status
real    0m4.214s
user    0m2.140s
sys     0m0.412s

abdosi@xxxx:~$ time show interface counters
real    0m4.879s
user    0m2.500s
sys     0m0.680s

abdosi@xxxx:~$ time show ip bgp summary
real    0m6.769s
user    0m1.864s
sys     0m0.644s

@abdosi
Copy link
Contributor Author

abdosi commented Apr 3, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lguohan
Copy link
Contributor

lguohan commented Apr 4, 2021

need #1541

@lguohan
Copy link
Contributor

lguohan commented Apr 4, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@abdosi abdosi merged commit 87b2481 into sonic-net:master Apr 4, 2021
@abdosi abdosi deleted the multiasic_cli branch April 4, 2021 19:17
abdosi added a commit that referenced this pull request Apr 4, 2021
Optimize/Reduce the time taken by show interface * and show ip bgp * commands on Multi-asic platforms.
yxieca pushed a commit that referenced this pull request Apr 8, 2021
Optimize/Reduce the time taken by show interface * and show ip bgp * commands on Multi-asic platforms.
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
ad9022e (HEAD -> 201911, origin/201911) Reduce time taken by show commands on multi-asic platforms (sonic-net#1544)
4993a36 [fast-reboot]: Fix fail to execute fast-reboot problem (sonic-net#1047)

Signed-off-by: Abhishek Dosi <[email protected]>
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.

5 participants