Concurrent execution of rc-scripts with rcorder(8)

Hello,

the idea to start services concurrently during boot isn't new and the question why FreeBSD doesn't do it has popped up on the forum and mailing list occasionally. So, why not give it a shot?

rcorder(8) is normally used during boot to bring the rc-scripts into a particular order, so when they are executed linearly by /etc/rc, all constraints will be satisfied. I modified rcorder(8) to enable it to run rc-scripts concurrently, while keeping track of the constraints as rc-scripts start and finish. You can find the code at https://github.com/kil/rcorder. As it works now, it will fall back to the current mode of execution if anything goes wrong. So, if worst comes to worst, booting takes a bit longer.

If you feel brave, give it a try :) (Actually, not too much bravery is needed: on all boots of my machine it worked perfectly every time.)

I haven't done any measurements yet on how large the speedup is, but booting feels a bit faster with it. Also, there probably is room for improvement. Any ideas and feedback are very welcome!
 
wblock said:
Please post this to one of the mailing lists also, maybe freebsd-current or freebsd-hackers. Thanks!

Did so today. One brave soul already gave it a shoot and reported a speedup in booting time of about 15% (that is in the ballpark of what I'm seeing, roughly 15% - 20%). Also found a small bug today that caused too many scripts to be run.
 
I updated the README with some numbers, detailing the influence on booting time.

There aren't enough numbers to give general advice but if one wanted to give one, it would be that, basically, if you start some additional services via your rc.conf and your cpu has more than one core, you should see a speedup. If your rc.conf is really sparse and you have a cpu with only one core, a slowdown can be expected.
 
knk said:
I modified rcorder(8) to enable it to run rc-scripts concurrently, while keeping track of the constraints as rc-scripts start and finish.

I'm about to update my laptop; before I do that I can try this out and let you know how it works out. There are a few other things I'd like to test before the update anyway.

Fonz
 
fonz said:
I'm about to update my laptop; before I do that I can try this out and let you know how it works out. There are a few other things I'd like to test before the update anyway.

Fonz

Please do :)
 
Back
Top