parallel booting init in C - even larger speedup

Olivier Sessink lists at olivier.pk.wau.nl
Sun Sep 25 19:00:59 UTC 2005


Hi all,

I saw the posting from Petter Reinholdtsen, and some years ago I wrote a
similar program in C: it runs all init scripts with the same sequence
number in parallel.

The program doesn't use system(), but uses fork() and exec() to run the
scripts (thus the magic #! line is *required*) which removes an instance
of /bin/sh for each init script (if that is bash, that is a 625kb
executable, compared with my executable of 6kb which forks itself).

Compared with the regular init scripts, this program reduced the init
process 2X on my laptop!!

Currently the stdout/stderr for each process is the same, and thus the
output of all daemons is a mess.

It might be not ready for production use, but it might give some good
inspiration, and I'm open for suggestions if there are any plans to
really use it.

Attached!

regards,
	Olivier Sessink
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parallel_init.tar.gz
Type: application/x-gzip
Size: 2838 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/initscripts-ng-devel/attachments/20050925/a8423431/parallel_init.tar.bin


More information about the initscripts-ng-devel mailing list