[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Making init scripts use dash



On Thu, May 18, 2006 at 05:27:23PM -0300, Margarita Manterola wrote:
> During some tests I've performed, I've found that making the init
> scripts run with dash as default shell instead of bash makes the boot
> time a 10% faster (6 seconds in a 60 second boot).

This speed-up is not limited to booting.  For example, my tests of
package build speed show around 4% improvement for package builds.

The interesting fact is that, contrary to what I expected, running
"configure" was improved by only about 1% on average.  Thus, it's
bash's start-up which is the slow part, in the terms of actual
speed, bash is not that far behind.  Too bad, make runs every single
command in a separate shell, going through bash's slow start each time.


I checked these results by building four packages (fuse, kbtin, bash
and dash) a number of times; having dash as /bin/sh speeds up the
builds by 3-4% except for building bash itself (just 0.39%).


Conclusion: moving to dash is worth it.


Cheers and schtuff,
-- 
1KB		// Rule #6: If violence wasn't your last resort,
		// you failed to resort to enough of it.
		//   - The Seven Habits of Highly Effective Pirates



Reply to: