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

[interfaces] Reduce Calls to SONiC Cfggen #5174

Merged

Conversation

tahmed-dev
Copy link
Contributor

Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when running interfaces-
config.

singed-off-by: Tamer Ahmed tamer.ahmed@microsoft.com

- Why I did it
Reduce time required when invoking interfaces-config

- How I did it
Used template batch mode to batch together three calls into one call sonic-cfggen

- How to verify it

admin@str-s6000-acs-14:~$ time sudo ./interfaces-config-old.sh

real	0m4.801s
user	0m4.011s
sys	0m0.639s
admin@str-s6000-acs-14:~$ time sudo ./interfaces-config-new.sh

real	0m1.617s
user	0m1.360s
sys	0m0.224s
admin@str-s6000-acs-14:~$ diff /etc/network/interfaces.old /etc/network/interfaces.new
admin@str-s6000-acs-14:~$ diff /etc/sysctl.d/90-dhcp6-systcl.conf.old /etc/sysctl.d/90-dhcp6-systcl.conf.new
admin@str-s6000-acs-14:~$ diff /etc/dhcp/dhclient.conf.old /etc/dhcp/dhclient.conf.new

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006

Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when running interfaces-
config.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
@tahmed-dev tahmed-dev force-pushed the taahme/interfaces-reduce-cfggen-calls branch from 3b6b203 to 92a97db Compare August 13, 2020 21:59
@tahmed-dev tahmed-dev marked this pull request as ready for review August 14, 2020 01:35
@tahmed-dev tahmed-dev merged commit dfc0617 into sonic-net:master Aug 17, 2020
abdosi pushed a commit that referenced this pull request Oct 7, 2020
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when running interfaces-
config.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
lguohan pushed a commit that referenced this pull request Oct 30, 2020
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when running interfaces-
config.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
abdosi pushed a commit that referenced this pull request Dec 4, 2020
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when running interfaces-
config.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
abdosi pushed a commit that referenced this pull request Dec 22, 2020
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when running interfaces-
config.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when running interfaces-
config.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
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.

3 participants