[Pkg-sysvinit-devel] An startpar with runlevel-full parallel execution
Jordi Pujol
jordi_pujol at telefonica.net
Mon May 11 09:01:13 UTC 2009
Hello Kel and list,
I tested the SVN versions of starpar and insserv and they work well with the
makefile concurrency,
to make a valuation of the benefits of using a new version I expound the
strengths and what lacks lnet-startpar.
- makes the whole process of the rc script, first runs the K-ill scripts and
after the S-tart scripts in only one execution.
- is a little bit faster, as a 5%, because all the process is done in a C
program.
- the code is more easy and direct, that implies easy to mantain and to
implement some behavior. As an idea, regarding the number of lines:
- SUSE's startpar 1694 lines of code
- LneT's startpar 550 lines of code
- the buffers have no limit of capacity,
- uses stream assignment, not uses getpty(), therefore the code is easy, but
using this stream assignment, the output from the children (if there is any)
processes of the services is not captured into the buffers, they could print
on the screen
A personal conclusion,
lnet-startpar is lighter and more simple and straightforward, but lacks some
features and needs to be improved in some points.
I have reviewed the program SUSE's startpar to add features that I feel can be
better for Debian,
To improve performance, I have added some parameters,
part of this code was already implemented earlier, now the user can modify the
values with the command line options, and the default values vary for SUSE or
Debian.
- the parameter " -I importance" designating a list of important services,
Debian default is "kdm,xdm,gdm", and Suse "xdm" (as before)
- the parameter " -E early" designating services that should be started early,
Debian default is "udev", and Suse "early" (as before)
- the parameter " -D directory" complete path where read the dependency files,
default is "/etc/init.d"
- the parameter " -q " means quiet, only print messages for the interactive
services
- in the implementation of "importance", the program adds importance each time
that a service is dependent on another, this leads to accumulation of large
importance values to services that are listed multiple times in the list of
dependencies, so I prefer that importance is not cumulative, but is managed
as a maximum;
About the splash API, I have not used that in lnet-startpar and actually I
don't use any splash utility, Sorry I can't help with that,
Attached are the modifications that I would do in SUSE's startpar to implement
these features,
these modifications have been tested with the concurrency "makefile" and give
almost the same execution time (+5%) as LneT startpar.
Thanks,
Jordi
El Saturday 09 May 2009 10:45:59 Kel Modderman va escriure:
> Please do. I'd like to discuss it more with you.
>
> What is in current package is new version of startpar from SuSe/Werner
> Fink, with patches for Debian runlevel compatibility. All patches have been
> accepted by Werner (except I need to redo version of the getpty() hack with
> minor change and resend it). I would prefer to stay with Werner's startpar
> utility than rewrite a new one (like lnet-startpar) if possible, as it is
> better to share knowledge and relationship with Werner Fink. So I encourage
> that if you want new features to try and work with Werner to add them to
> the existing startpar utility.
>
> One problem now is the splash screen API. The current implimentation seems
> to rely on everything happening in shell code flow of /etc/init.d/rc rather
> than an external C utility like startpar. I hate splash screens and have
> little idea about the current API so would need help to improve the
> situation with startpar.
>
> Thanks, Kel.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: startpar-diff.tar.bz2
Type: application/x-tbz
Size: 1953 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20090511/3c85924d/attachment.bin>
More information about the Pkg-sysvinit-devel
mailing list