[opensuse-factory] RFC: to upstart or not
Hi, I made upstart an optional replacement for sysvinit to a) test if it works good enough b) prove that it has no influence on the boot time b) is done and a) is kind of done. It works, and it only sometimes shows problems - that I have no time to debug as debugging it involves rebooting and it's about impossible to debug other people's machines reboot remotely. Additionally to that, upstart takes more memory than sysvinit's init and it makes it harder for people to adminstrate 11.3 and older systems in parallel. If upstart was the obvious future, I wouldn't care too much - but systemd[1] at least opens doubts that this will be the case. So I would to reduce the feature to "provide upstart" and set it to done and change the patterns back to sysvinit. Oppinions? If someone really wants upstart badly, he has to provide a patch as a reply to comment#38 in the feature though ;) [1] http://0pointer.de/blog/projects/systemd.html [2] https://features.opensuse.org/305690 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
* Stephan Kulow <coolo@novell.com> [2010-05-10 10:24]:
It works, and it only sometimes shows problems - that I have no time to debug as debugging it involves rebooting and it's about impossible to debug other people's machines reboot remotely.
Additionally to that, upstart takes more memory than sysvinit's init and it makes it harder for people to adminstrate 11.3 and older systems in parallel. If upstart was the obvious future, I wouldn't care too much - but systemd[1] at least opens doubts that this will be the case.
So I would to reduce the feature to "provide upstart" and set it to done and change the patterns back to sysvinit. Oppinions? If someone really wants upstart badly, he has to provide a patch as a reply to comment#38 in the feature though ;)
I don't see any benefit from using upstart. Before Redhat's launchd clone appeared the reasoning was along the lines that upstart was what everyone else was using. Currently openSUSE doesn't take adavntage of its event-driven model (and besides, at least when Ubuntu switched to using it during their 9.10 release they had some reliability problems with it). Rather it introduces a potential source of bugs while sysvinit has been stable, seems to work well and uses less resources. So reverting back to sysvinit and looking what happens seems like a sensible coice, no need to fix it if it's not broken. -- Guido Berhoerster -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Hi Coolo, @ll On Mo 10 Mai 2010 10:24:46 CEST Stephan Kulow <coolo@novell.com> wrote:
So I would to reduce the feature to "provide upstart" and set it to done and change the patterns back to sysvinit. Oppinions? If someone really wants upstart badly, he has to provide a patch as a reply to comment#38 in the feature though ;)
Thanks for your analysis and providing your results here! Staying with an accepted and well known "feature" like sysvinit sounds good to me. ---- What about having a look at (and maybe optimizing) our current init scripts instead? I'm currently searching for a good page about "optimizing bash/init scripts" - is there something better like http://elinux.org/Optimize_RC_Scripts ? => Is there someone who has good examples and can write something into our wiki or here on the mailinglist? (Something like "use 'case' instead of 'if' in the following cases...) => Is there someone who like to help reviewing the current init scripts of our distribution? With kind regards, Lars -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
* Lars Vogdt <lrupp@novell.com> [2010-05-14 20:42]:
What about having a look at (and maybe optimizing) our current init scripts instead?
I'm currently searching for a good page about "optimizing bash/init scripts" - is there something better like http://elinux.org/Optimize_RC_Scripts ?
That one looks reasonable for a start, it also recommends writing portable rather than bash-specific scripts ;)
=> Is there someone who has good examples and can write something into our wiki or here on the mailinglist? (Something like "use 'case' instead of 'if' in the following cases...)
The most important thing is to keep in mind that each use of an external command implies a fork()+exec(). Hence, using functionality of the shell and builtins is usually preferrable in terms of performance but there are exceptions e.g. when processing a lot of data the speed gains of an external command may exceed the performance penalty of the fork and exec (more concrete example below). Often excessively long pipes mixing cut, grep, sed, and awk can be consolidated in a single sed/awk command. Another thing is to avoid subshells when possible, however this is more complicated as its use is sometimes implementation-dependent (e.g. in the handling of pipes) and requires an understanding on how your shell works internally. IMHO it is more important to understand the underlying concepts of the shell, to use good judgement based thereon and to do some actual testing rather than applying off-the-shelf recipes. Having made my point, I'll make a start with some "recipes" (all only relying on SUSv3 features): # grep can be avoided where shell globbing is enough (at least # when processing not too much data, particularly bash's globbing # seems to be slow) grep xxx foo.txt while read -r line; do case "${line}" in *xxx*) printf "%s\n" "${line}" ;; *) ;; esac done < foo.txt # the shell itself can be used to split strings rather than cut # or awk input="johnd:x:1000:1000:John Doe:/export/home/johnd:/usr/bin/ksh93" printf "%s\n" "${input}" | awk -F: '{ print $5 }' ofs="${IFS}"; IFS=":" set -- $input printf "%s\n" "$5" IFS="${ofs}" # the shell's parameter expansion can sometimes replace command # substitution using sed or some specific commands filename="/foo/bar/baz.xxx" printf "%s\n" "$(basename "${filename}" .xxx)" basename="${filename##*/}"; basename="${basename%.*}" printf "%s\n" "${basename}" printf "%s\n" "$(dirname "${filename}")" printf "%s\n" "${filename%/*}"
=> Is there someone who like to help reviewing the current init scripts of our distribution?
Yes, I've got a rpmlint check for checking /bin/sh-Scripts for bashisms ready but it hasn't been itegrated yet. When it is in place I'd like to review (init) scripts anyway in order to fix any bashisms, if optimizations of the init scripts are welcome that could be done along the way. Having fixed /bin/sh scripts would then open some further possibilities, like easy switching between at least bash, dash, and ksh93 as /bin/sh as it is e.g. possible in Debian. Based on preliminary testing dash as /bin/sh seems to have a rather little performance impact on the boot process by itself. It would however be interesting to experiment with ksh93 as /bin/sh since it provides a fair number of builtins (which can be easily extended) as well as shcomp which allows to compile shell scripts. Unfortunately not many people seem intersted in this area, openSUSE lacks a Shell/Tools-Team. -- Guido Berhoerster -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
participants (3)
-
Guido Berhoerster
-
Lars Vogdt
-
Stephan Kulow