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

Adding a huge number of static routes (>10k) in frr is very very slow over time #18206

Open
2 tasks done
rsys-spaul opened this issue Feb 20, 2025 · 2 comments
Open
2 tasks done
Labels
triage Needs further investigation

Comments

@rsys-spaul
Copy link

Description

I am using vtysh to add more than 10,000 static routes. Initially, this is fast for a few hundred static routes, but once it reaches thousands, it starts slowing down. Adding 10,000 routes using vtysh took more than four hours. When I used staticd.conf file and loaded the same 10k routes at startup, it was finished in few seconds. So, I am assuming that the mgmtd and the transaction based configuration is the cause for the delay.

Is there any other way to configure static routes in frr (using some socket programing or something else and without the mgmtd) so that I can add them very fast in runtime.

Version

10.0.1

How to reproduce

Using a script having 10k vtysh commands.

Expected behavior

The static routes should be added in minutes.

Actual behavior

The static route addition in a scaled setup takes hours to add.

Additional context

No response

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@rsys-spaul rsys-spaul added the triage Needs further investigation label Feb 20, 2025
@donaldsharp
Copy link
Member

a) What version of libyang2 are you using? There are explicit versions that have performance issues
b) Why are you not just writing the routes into a file and loading the file in one go?

@rsys-spaul
Copy link
Author

Hi @donaldsharp
a) I am using libyang version 2.41.0
b) This is not an option for me as I need to occasionally add or delete static routes using some other application which is managing the static routes.
It would be excellent if you could suggest a way to make this fast.

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

No branches or pull requests

2 participants