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

fix show mac slow #1524

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pettershao-ragilenetworks
Copy link
Contributor

@pettershao-ragilenetworks pettershao-ragilenetworks commented Mar 24, 2021

Signed-off-by: pettershao-ragilenetworks pettershao@ragilenetworks.com

What I did

fix sonic-net/sonic-buildimage#7136

How I did it

In testing, I found that ' port_util.get_vlan_id_from_bvid' will do many db actions to get vlan id, this really take times, so I store it temporarily when find the mapping info at first time, and use it when try to find vlan id for same bvid later.

How to verify it

big datastream, and show mac.

Previous command output (if the output of a command-line utility has changed)

before change, it takes long time .(5k, up to 15 seconds)

New command output (if the output of a command-line utility has changed)

after change, it takes only a while(5k, less than 1 seconds)

Signed-off-by: pettershao-ragilenetworks <pettershao@ragilenetworks.com>
@ghost
Copy link

ghost commented Mar 24, 2021

CLA assistant check
All CLA requirements met.

@pettershao-ragilenetworks
Copy link
Contributor Author

@prsunny @lguohan hi , help forword this!

@prsunny
Copy link
Contributor

prsunny commented Mar 26, 2021

Looks like we've another PR for the same - https://github.com/Azure/sonic-utilities/pull/1523/files. Could you please review?

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.

[FDB] show mac command is very slow when entires up to 1k or more
2 participants