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

Refactor(eos_validate_state): ANTA Slow catalog creation when high amount of devices #3304

Closed
carl-baillargeon opened this issue Oct 29, 2023 · 5 comments · Fixed by #3701
Closed
Assignees

Comments

@carl-baillargeon
Copy link
Contributor

carl-baillargeon commented Oct 29, 2023

_get_eos_validate_state_vars is being called twice per device when it could be run once for all devices.

get_anta_results.py time logs:

[WARNING]: <p03l07> Logging setup time: 0.002478 seconds
[WARNING]: <p03l07> AvdTestHardware render time: 0.046718 seconds
[WARNING]: <p03l07> AvdTestHardware merge catalog time: 0.000320 seconds
[WARNING]: <p03l07> AvdTestNTP render time: 0.000074 seconds
[WARNING]: <p03l07> AvdTestNTP merge catalog time: 0.000029 seconds
[WARNING]: <p03l07> AvdTestInterfacesState render time: 0.074167 seconds
[WARNING]: <p03l07> AvdTestInterfacesState merge catalog time: 0.000024 seconds
[WARNING]: <p03l07> AvdTestLLDPTopology render time: 0.104166 seconds
[WARNING]: <p03l07> AvdTestLLDPTopology merge catalog time: 0.000024 seconds
[WARNING]: <p03l07> AvdTestMLAG render time: 0.006816 seconds
[WARNING]: <p03l07> AvdTestMLAG merge catalog time: 0.000020 seconds
[WARNING]: <p03l07> AvdTestP2PIPReachability render time: 0.059278 seconds
[WARNING]: <p03l07> AvdTestP2PIPReachability merge catalog time: 0.000058 seconds
[WARNING]: <p03l07> AvdTestBGP render time: 0.032573 seconds
[WARNING]: <p03l07> AvdTestBGP merge catalog time: 0.000024 seconds
[WARNING]: <p03l07> AvdTestRoutingTable render time: 24.519279 seconds
[WARNING]: <p03l07> AvdTestRoutingTable merge catalog time: 0.000238 seconds
[WARNING]: <p03l07> AvdTestInbandReachability render time: 0.022567 seconds
[WARNING]: <p03l07> AvdTestInbandReachability merge catalog time: 0.000194 seconds
[WARNING]: <p03l07> AvdTestLoopback0Reachability render time: 22.413227 seconds
[WARNING]: <p03l07> AvdTestLoopback0Reachability merge catalog time: 0.000258 seconds
[WARNING]: <p03l07> Catalog setup time: 47.769864 seconds
[WARNING]: <p03l07> Save catalog time: 1.276969 seconds
[WARNING]: <p03l07> Dry run report time: 1.751170 seconds
[WARNING]: <p03l07> Save results time: 0.220179 seconds
[WARNING]: <p03l07> Format results time: 0.017472 seconds

avdtestbase.py time logs:

[WARNING]: <p03l08> loopback0_mapping property hit by AvdTestRoutingTable
[WARNING]: <p03l08> Running _get_eos_validate_state_vars by AvdTestRoutingTable
[WARNING]: <p03l08> AvdTestRoutingTable --> Get vars time: 22.742139 seconds
[WARNING]: <p03l08> vtep_mapping property hit by AvdTestRoutingTable
[WARNING]: <p03l08> loopback0_mapping property hit by AvdTestLoopback0Reachability
[WARNING]: <p03l08> Running _get_eos_validate_state_vars by AvdTestLoopback0Reachability
[WARNING]: <p03l08> AvdTestLoopback0Reachability --> Get vars time: 18.451186 seconds
[WARNING]: <p03l08> Catalog setup time: 41.942543 seconds
@carl-baillargeon carl-baillargeon self-assigned this Oct 29, 2023
@gmuloc
Copy link
Contributor

gmuloc commented Oct 30, 2023

_get_eos_validate_state_vars is being called twice per device when it could be run once for all devices.

for all or for each device?

@gmuloc gmuloc changed the title Fix(eos_validate_state): ANTA Slow catalog creation when high amount of devices Refactor(eos_validate_state): ANTA Slow catalog creation when high amount of devices Oct 30, 2023
@carl-baillargeon
Copy link
Contributor Author

_get_eos_validate_state_vars is being called twice per device when it could be run once for all devices.

for all or for each device?

For all since the function is getting a mapping of all Loopback0 and VTEP IPs of all devices in the fabric.

Copy link

This issue is stale because it has been open 90 days with no activity. The issue will be reviewed by a maintainer and may be closed

@gmuloc
Copy link
Contributor

gmuloc commented Feb 19, 2024

@carl-baillargeon has it not been fix in one of your recent changes?

@carl-baillargeon
Copy link
Contributor Author

_get_eos_validate_state_vars is being called twice per device when it could be run once for all devices.

for all or for each device?

For all since the function is getting a mapping of all Loopback0 and VTEP IPs of all devices in the fabric.

In #3701, I did it per device. To get a mapping for all devices we would have to create an additional task in the Ansible role but that will just slow things in Ansible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants