librc-depend: fix unnecessary copying parent memory page table#974
Closed
GermanAizek wants to merge 1 commit intoOpenRC:masterfrom
Closed
librc-depend: fix unnecessary copying parent memory page table#974GermanAizek wants to merge 1 commit intoOpenRC:masterfrom
GermanAizek wants to merge 1 commit intoOpenRC:masterfrom
Conversation
3a19279 to
a245a7c
Compare
posix_spawn() is a more lightweight and modern alternative to fork()/exec(), which are used inside popen(). The main advantage of posix_spawn is that it can create a new process without completely duplicating the address space of the parent process. References: - https://blog.famzah.net/2018/12/19/posix_spawn-performance-benchmarks-and-usage-examples/ - https://lobste.rs/s/smbsd5/fork_road - https://www.reddit.com/r/C_Programming/comments/1lvdhp2/fork_vs_posix_spawn/
Member
|
this is just... #975 but without the helper? as mentioned over there, popen does not fork() internally on any platform we support |
Author
OpenRC, which prides itself on being fast and lightweight, performs worse than systemd on older single-core systems. And the longest startup process is "Caching service dependencies". This is where the longest slowdown occurs due to outdated Popen() functions. If you are not ready to optimize even for older systems, then what is the point of supporting OpenRC if it is easier to contribute to systemd. |
Member
|
could you please not split discussion between two (basically identical) PRs? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
posix_spawn() is a more lightweight and modern alternative to fork()/exec(), which are used inside popen(). The main advantage of posix_spawn is that it can create a new process without completely duplicating the address space of the parent process.
References: