[SOLVED] Can i force the kernel to boot it's initializations parallel ???
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can i force the kernel to boot it's initializations parallel ???
Hello,
I was wondering if i could mange to initialize drivers, services etc. (all these jobs what the kernel does during startup) in parallel instead of sequentially. I want to aggressively lower the boot time. I know some services depend on each other but to make an easy example: during probing the network devices, it shall take care of the audio too, instead of waiting 10 s until the network is ready.
I heard of systemd and InitNG but I'm sure there has to be other methods. Isn't there an option for the kernel itself to boot this way ?
I heared, that the kernel is doing many jobs already in parallel, but i thought it was possible to still improve this on some specific needs of the application. So the biggest part seems to be the init system ? Are there alternatives to systemd and InitNG ?
The init daemons usually execute a series of scripts in, say, /etc/init.d/, and it always executes them in alphabetical order.
You'll observe that the files (or symlinks) here include a number in their names: "Snn" for start scripts and "Knn" for kill scripts. This is done on purpose, specifically to allow you to re-order the scripts. ("Kill" scripts are executed in reverse alphabetical order.)
As far as I know, scripts are always executed one-by-one, for obvious reasons of simplicity. However, within a script, you might see things being executed in-parallel, say by using xargs with the -P maxprocs option. Which all makes sense ... "init" really doesn't know what each script actually does, so it executes whatever it finds, in an always predictable-sequence, and it allows each individual script to be the master of its own affairs. Scripts can potentially be written in any language or execute any program.
I would frankly advise you to "go ahead and wait 10 seconds," or to explicitly specify your network configuration (once Linux has figured out what it is by booting-up once), so that in the future it doesn't have to "probe" and "discover." Mucking around too much with this aspect of the system is likely to cause unpredictability = trouble, with no real payoff for your troubles.
Last edited by sundialsvcs; 01-22-2014 at 09:26 AM.
thanks for the response, even I knew most of what you said, still i prefere these wide answers, because if I find something new it helps to have better search results.
To have a fast boot, many people recommend to put all the init-scripts into just one, and if you say that it's possible to make it parallel within a script it all makes sense.
If you are saying that you are already using systemd, then, according to my limited knowledge, it should be already be capable of doing the things that you seem to be asking for.
So, maybe the answer is to look further into systemd, and see what it can do for you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.