Skip to content

[pull] master from Azure:master#1641

Merged
pull[bot] merged 1 commit intopphuchar:masterfrom
sonic-net:master
Jul 4, 2021
Merged

[pull] master from Azure:master#1641
pull[bot] merged 1 commit intopphuchar:masterfrom
sonic-net:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Jul 4, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

…m calls (#7987)

Why I did it
Currently hostcfgd is implemented in a way each feature which is enabled/disabled triggering execution of systemctl enable/unmask commands which eventually trigger 'systemctl daemon-reload' command.
Each call like this cost 0.6s and overall add a overhead of ~12 seconds of CPU time.
This change will verify the desired state of a feature and the current state of this feature on systemd and trigger a system call only when must.

How I did it
Check each feature status on systemd before executing a system call to enable and reload the systemctl daemon.

How to verify it
Build an image with this change and observe less system calls are executed.

Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
@pull pull bot added the ⤵️ pull label Jul 4, 2021
@pull pull bot merged commit d99595a into pphuchar:master Jul 4, 2021
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.

1 participant