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

Bug#763695: console-setup is slowest part of boot, not fast as setupcon manpage tells us



On Wed, 8 Oct 2014 18:27:04 +0300 Anton Zinoviev <anton@lml.bas.bg> wrote:
> On Wed, Oct 01, 2014 at 11:31:18PM +0200, Julian Andres Klode wrote:
> >
> > console-setup requires 800ms during a boot. The complete boot finishes
> > in 4.1 seconds. This really should not be a shell script in the long
> > term, but short term at least removing "fast" from the manual page
> > would be a good idea...
> >
> > Here's a boot graph:
> > https://people.debian.org/~jak/boot.svg
>
> One possible explanation is what Samuel Thibault proposed (for some
> reason setupcon doesn't use cached keymap).  The following is (may be)
> another explanation.
>
> I don't know how exactly recent Debian systems boot so the following is
> only a guess.  Considering that keyboard-setup.service uses only 190 ms
> compared to 823 ms for console-setup.service, I suppose that these 823 ms
> are caused by forked printf commands (by setupcon) waiting for the
> virtual consoles to become active.  So during most of these 823ms the
> scripts were waiting and didn't consume cpu resources.
>
> If my hypothesis is true, the proper fix is to improve the description
> console-setup.service in order to run it only after the virtual consoles
> become active.  This, however, is not something I can do (with my
> current knowledge).

I am experiencing the same problem. I edited setupcon to add "set -x"
at the beginning to help tracing where the slowness is. It doesn't
look like printf is at fault.

I also tried changing the amount of ACTIVE_CONSOLES in
/etc/default/console-setup but it did not make much of a difference (I
tried setting it to just tty1 and to the empty string).

Logs, plots and systemd-blame at
https://people.debian.org/~fsateler/console-setup/

Saludos


Reply to: