[arch-general] Optimizing boot

Tomasz Kramkowski tk at kyriasis.com
Tue Apr 29 18:58:43 EDT 2014


On Tue, Apr 29, 2014 at 06:28:42PM -0400, Toyam Cox wrote:
> On Tue, Apr 29, 2014 at 6:17 PM, Jan Alexander Steffens <
> jan.steffens at gmail.com> wrote:
> 
> > On Wed, Apr 30, 2014 at 12:06 AM, Toyam Cox
> > <csupercomputergeek at gmail.com> wrote:
> > > Hello,
> > >
> > > I want to have a sub-30 second boot time, so as to make it possible for
> > me
> > > to power down my computer and power back up at a moment's notice. Right
> > > now, I have a (according to my watch) ~35 second boot time. I used
> > > systemd-analyze, and discovered that NetworkManager.service is running
> > for
> > > 12 seconds of that time! Also, polkit.service runs quite a while after
> > > everything else, but that is less important.
> > >
> > > How do I optimize NetworkManager.service to shorten boot times,
> > especially
> > > as I don't need a network first-thing?
> > >
> > > --
> > > - Toyam
> >
> > Are you using a display manager? If not (getty), add a snippet for
> > getty at .service to use Type=simple instead of Type=idle (making it
> > start ASAP) and add "quiet" to the kernel command line so boot
> > messages are suppressed. This will allow you to log in with getty
> > while the system is still booting.
> >
> 
> 
> I'm using LXDM, my attempt to be lightweight with a GUI. Would Type=simple
> still work with LXDM? I notice it starts relatively soon in the boot
> process, meaning I'd need to figure out getting polkit to start even
> sooner, but is it an option?
> 
> -- 
> - Toyam

LXDM is separate from getty. Getty runs on a TTY and prompts the user for a
username. LXDM is a display manager, it runs on the X server and also prompts
the user for a username and password. I doubt changing settings for one will
affect the other. (Even though getty should by default run on all 6 initially
available TTYs. Correct me if I'm wrong.)

If you really want to speed up boot times you might want to consider cutting
down on the Display Manager as it is not essential to using a DE/WM with X
server. But in the end, because LXDM is supposedly so lightweight, and I
presume that you count starting X and running a DE/WM a part of the boot
process, you might not get any speed advantage.

In the end, it really is a matter of what you consider a "booted" machine. I
can get from halted and powered off to getty in under or around 20 seconds, a
few seconds to log in, a few more for X server and under a second for i3wm (Yes
it's lightning speed.) and I can be "booted" into a graphical environment in
around 30 seconds.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20140429/85e401c2/attachment.asc>


More information about the arch-general mailing list