public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Jerry McBride <mcbrides9@comcast.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Dash as /bin/sh?
Date: Fri, 1 Sep 2006 22:57:08 -0400	[thread overview]
Message-ID: <200609012257.08294.mcbrides9@comcast.net> (raw)
In-Reply-To: <200609020406.15888.harmgeerts@home.nl>

On Friday 01 September 2006 22:06, Harm Geerts wrote:
> On Friday 01 September 2006 17:21, Neil Bothwick wrote:
> > > Speaking of which, you probably should see the shell used in the
> > > scripts from the sys-apps/baselayout package. All shell scripts
> > > use /bin/bash and not /bin/sh.
> > >
> > > So linking (d)ash as the default shell doesn't nearly have the impact
> > > you'd like it to have.
> >
> > A 20% reduction in boot time is a reasonable impact IMO.
>
> Any chance that was a fluke?
>
> I've done a few reboots with bootchart to confirm this and I don't get any
> speedup. In fact /bin/sh is never called because the gentoo init scripts
> explicitly use bash. (sys-apps/baselayout-1.12.4-r7)

I can't do it right now, I'm doing an "emerge -e world" on my laptop, but 
tomorrow I'll do a grep and sed and change #!/bin/bash to #!/bin/dash on the 
relavant parts of the baselayout and see if it has any impact, other than 
performance. 

"Slapping right hand to forehead...", This something I never thought of! 
Thanks for the idea.

The other thing to consider is, you don't have to use "all" the gentoo init 
scripts...

Just this week, I evaluated minit, initng, runit and fcache. For me, initNG 
offered the best overall improvement. 

However, I got even better performance with my own solution. Basicly, I use 
the very minimum number gentoo startup scripts. All I use are those that 
initialize the disks and that's it.  The rest of the bootup process is done 
in local.start. My local.start configures all the devices on my laptop, 
including the lo, eth0  services. It loads the modules in correct order, 
brings up portmap, nfs, samba, cups, fam, hal, dbus, alsa, etc., etc. Where 
possible I run the commands as detached processes for even more 
performance... My local.start is ugly as hell, but very fast as there's very 
little bash/python scripting involved... and none of the python bloat that 
gentoo has going on in /etc/init.d. I'm able to get to a fully functioning 
command prompt in like 10 seconds after the kernel is done loading. 
Some configuration still goes on in the background, but I never notice it. 

I've got a lot more testing to do, but at first blush I believe the generation 
of this type of local.start could be automated. What I see happening is, once 
a gentoo user is satisfied that the box is setup to their liking, they'd run 
a script that would evaluate /etc/runlevels, scoop the necessary setup 
information from /etc/conf.d  and generate a local.start providing the new 
boot process. The runlevels could be pruned automatically and on the next 
reboot, the new boot process is used for a dramatic decrease in boot time.

I dunno, this could be fun. ;')

Cheers all, Jerry



-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2006-09-02  3:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-01  8:45 [gentoo-user] Dash as /bin/sh? Alexander Skwar
2006-09-01  9:17 ` asl.pavel
2006-09-01 10:13 ` Erik
2006-09-01 11:09   ` [gentoo-user] " Alexander Skwar
2006-09-01 11:03 ` [gentoo-user] " Neil Bothwick
2006-09-01 14:05   ` Neil Bothwick
2006-09-01 14:33     ` [gentoo-user] " Harm Geerts
2006-09-01 15:21       ` Neil Bothwick
2006-09-02  2:06         ` Harm Geerts
2006-09-02  2:57           ` Jerry McBride [this message]
2006-09-02  5:58             ` Richard Fish
2006-09-02 18:10           ` Neil Bothwick
2006-09-02 18:38             ` Jerry McBride
2006-09-03 11:49               ` [gentoo-user] " Alexander Skwar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609012257.08294.mcbrides9@comcast.net \
    --to=mcbrides9@comcast.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox