25s between systemd startup and actual display
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am trying to reduce startup time of a Beaglebone (4.14.32-ti-r42 #1 SMP Thu Apr 5 23:13:09 UTC 2018 armv7l GNU/Linux
) running Debian Stretch to display a local HTML page on its LCD.
Every analysis I've done so far indicates startup is <25s, but it still takes over 45s to display the HTML page.
systemd-analyze
Startup finished in 6.158s (kernel) + 17.082s (userspace) = 23.240s
systemd-analyze blame
22.762s dev-mmcblk1p1.device
12.823s postgresql@9.6-main.service
2.613s systemd-udev-trigger.service
2.301s systemd-logind.service
1.874s sysstat.service
1.848s networking.service
1.431s bb-wl18xx-wlan0.service
1.430s ssh.service
1.186s generic-board-startup.service
1.082s connman.service
891ms avahi-daemon.service
859ms systemd-journald.service
798ms udhcpd.service
639ms systemd-udevd.service
491ms systemd-timesyncd.service
464ms systemd-random-seed.service
449ms systemd-tmpfiles-setup-dev.service
415ms systemd-user-sessions.service
363ms rsyslog.service
310ms systemd-sysctl.service
304ms sys-fs-fuse-connections.mount
302ms systemd-update-utmp-runlevel.service
302ms systemd-tmpfiles-setup.service
269ms sys-kernel-debug.mount
269ms hostapd.service
252ms sys-kernel-config.mount
249ms systemd-modules-load.service
230ms systemd-backlight@backlight:backlight.service
221ms systemd-journal-flush.service
215ms dev-mqueue.mount
205ms kmod-static-nodes.service
205ms systemd-update-utmp.service
199ms user@1000.service
160ms systemd-remount-fs.service
47ms postgresql.service
systemd-analyze critical-chain
graphical.target @14.388s
âÂÂâÂÂmulti-user.target @14.383s
âÂÂâÂÂpostgresql.service @14.326s +30ms
âÂÂâÂÂpostgresql@9.6-main.service @3.885s +10.382s
âÂÂâÂÂbasic.target @3.639s
âÂÂâÂÂsockets.target @3.639s
âÂÂâÂÂdbus.socket @3.639s
âÂÂâÂÂsysinit.target @3.635s
âÂÂâÂÂsystemd-backlight@backlight:backlight.service @12.982s +205ms
âÂÂâÂÂsystem-systemdx2dbacklight.slice @12.943s
âÂÂâÂÂsystem.slice @700ms
âÂÂâÂÂ-.slice @614ms
The HTML page service
The process I created that loads the page on the LCD is at-gui.service
:
[Unit]
Description=Start GUI
[Service]
ExecStart=/bin/bash -lc 'startx'
[Install]
WantedBy=basic.target
This process starts OpenBox, which is configured to load a browser with the HTML page shown.
Startup Times
The LCD shows some change in brightness (potentially indicating Openbox has started?) around 27s after startup. It takes 48s to show the HTML page.
A possible start
- The item
postgresql@9.6-main.service
takes >10s to start. I need it (I need access to a Postgres database), but not before showing that first page. Is there a leaner equivalent of postgresql@9.6-main.service just for running a Postgres database?
Main question
- How can one see where the extra ~25s is going?
- How can one front-load the display of an HTML page?
debian systemd startup beagleboneblack
add a comment |Â
up vote
0
down vote
favorite
I am trying to reduce startup time of a Beaglebone (4.14.32-ti-r42 #1 SMP Thu Apr 5 23:13:09 UTC 2018 armv7l GNU/Linux
) running Debian Stretch to display a local HTML page on its LCD.
Every analysis I've done so far indicates startup is <25s, but it still takes over 45s to display the HTML page.
systemd-analyze
Startup finished in 6.158s (kernel) + 17.082s (userspace) = 23.240s
systemd-analyze blame
22.762s dev-mmcblk1p1.device
12.823s postgresql@9.6-main.service
2.613s systemd-udev-trigger.service
2.301s systemd-logind.service
1.874s sysstat.service
1.848s networking.service
1.431s bb-wl18xx-wlan0.service
1.430s ssh.service
1.186s generic-board-startup.service
1.082s connman.service
891ms avahi-daemon.service
859ms systemd-journald.service
798ms udhcpd.service
639ms systemd-udevd.service
491ms systemd-timesyncd.service
464ms systemd-random-seed.service
449ms systemd-tmpfiles-setup-dev.service
415ms systemd-user-sessions.service
363ms rsyslog.service
310ms systemd-sysctl.service
304ms sys-fs-fuse-connections.mount
302ms systemd-update-utmp-runlevel.service
302ms systemd-tmpfiles-setup.service
269ms sys-kernel-debug.mount
269ms hostapd.service
252ms sys-kernel-config.mount
249ms systemd-modules-load.service
230ms systemd-backlight@backlight:backlight.service
221ms systemd-journal-flush.service
215ms dev-mqueue.mount
205ms kmod-static-nodes.service
205ms systemd-update-utmp.service
199ms user@1000.service
160ms systemd-remount-fs.service
47ms postgresql.service
systemd-analyze critical-chain
graphical.target @14.388s
âÂÂâÂÂmulti-user.target @14.383s
âÂÂâÂÂpostgresql.service @14.326s +30ms
âÂÂâÂÂpostgresql@9.6-main.service @3.885s +10.382s
âÂÂâÂÂbasic.target @3.639s
âÂÂâÂÂsockets.target @3.639s
âÂÂâÂÂdbus.socket @3.639s
âÂÂâÂÂsysinit.target @3.635s
âÂÂâÂÂsystemd-backlight@backlight:backlight.service @12.982s +205ms
âÂÂâÂÂsystem-systemdx2dbacklight.slice @12.943s
âÂÂâÂÂsystem.slice @700ms
âÂÂâÂÂ-.slice @614ms
The HTML page service
The process I created that loads the page on the LCD is at-gui.service
:
[Unit]
Description=Start GUI
[Service]
ExecStart=/bin/bash -lc 'startx'
[Install]
WantedBy=basic.target
This process starts OpenBox, which is configured to load a browser with the HTML page shown.
Startup Times
The LCD shows some change in brightness (potentially indicating Openbox has started?) around 27s after startup. It takes 48s to show the HTML page.
A possible start
- The item
postgresql@9.6-main.service
takes >10s to start. I need it (I need access to a Postgres database), but not before showing that first page. Is there a leaner equivalent of postgresql@9.6-main.service just for running a Postgres database?
Main question
- How can one see where the extra ~25s is going?
- How can one front-load the display of an HTML page?
debian systemd startup beagleboneblack
If the only thing you're doing is displaying an HTML page, is there a reason you need this to sit on top of an X server? Wouldnetsurf
fill your needs?
â DopeGhoti
Jun 6 at 17:14
I'm not sure - the first page is just a loader. Eventually, we're running Rails, which accesses a Postgres database (Rails finishes last after ~75s). All local, no networking.
â sscirrus
Jun 6 at 17:19
We're building a sort of kiosk, so we needed the browser to be 'locked' from the user's perspective. We define our own super-simple webkit browser using Gtk and have it load the page.
â sscirrus
Jun 6 at 17:22
1
Seems fairly good the time.
â Rui F Ribeiro
Jun 6 at 21:46
I agree with user Rui F Ribeiro, if it takes roughly a minute from start up to your html display screen I do not see what the issue is. Please clarify why waiting a minute from a cold boot to static html page is an issue. Possible solutions would be to create cronjobs on start up that will get the services running or to not power down the computer between use or to use a non-systemd system.
â kemotep
Jun 7 at 13:01
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to reduce startup time of a Beaglebone (4.14.32-ti-r42 #1 SMP Thu Apr 5 23:13:09 UTC 2018 armv7l GNU/Linux
) running Debian Stretch to display a local HTML page on its LCD.
Every analysis I've done so far indicates startup is <25s, but it still takes over 45s to display the HTML page.
systemd-analyze
Startup finished in 6.158s (kernel) + 17.082s (userspace) = 23.240s
systemd-analyze blame
22.762s dev-mmcblk1p1.device
12.823s postgresql@9.6-main.service
2.613s systemd-udev-trigger.service
2.301s systemd-logind.service
1.874s sysstat.service
1.848s networking.service
1.431s bb-wl18xx-wlan0.service
1.430s ssh.service
1.186s generic-board-startup.service
1.082s connman.service
891ms avahi-daemon.service
859ms systemd-journald.service
798ms udhcpd.service
639ms systemd-udevd.service
491ms systemd-timesyncd.service
464ms systemd-random-seed.service
449ms systemd-tmpfiles-setup-dev.service
415ms systemd-user-sessions.service
363ms rsyslog.service
310ms systemd-sysctl.service
304ms sys-fs-fuse-connections.mount
302ms systemd-update-utmp-runlevel.service
302ms systemd-tmpfiles-setup.service
269ms sys-kernel-debug.mount
269ms hostapd.service
252ms sys-kernel-config.mount
249ms systemd-modules-load.service
230ms systemd-backlight@backlight:backlight.service
221ms systemd-journal-flush.service
215ms dev-mqueue.mount
205ms kmod-static-nodes.service
205ms systemd-update-utmp.service
199ms user@1000.service
160ms systemd-remount-fs.service
47ms postgresql.service
systemd-analyze critical-chain
graphical.target @14.388s
âÂÂâÂÂmulti-user.target @14.383s
âÂÂâÂÂpostgresql.service @14.326s +30ms
âÂÂâÂÂpostgresql@9.6-main.service @3.885s +10.382s
âÂÂâÂÂbasic.target @3.639s
âÂÂâÂÂsockets.target @3.639s
âÂÂâÂÂdbus.socket @3.639s
âÂÂâÂÂsysinit.target @3.635s
âÂÂâÂÂsystemd-backlight@backlight:backlight.service @12.982s +205ms
âÂÂâÂÂsystem-systemdx2dbacklight.slice @12.943s
âÂÂâÂÂsystem.slice @700ms
âÂÂâÂÂ-.slice @614ms
The HTML page service
The process I created that loads the page on the LCD is at-gui.service
:
[Unit]
Description=Start GUI
[Service]
ExecStart=/bin/bash -lc 'startx'
[Install]
WantedBy=basic.target
This process starts OpenBox, which is configured to load a browser with the HTML page shown.
Startup Times
The LCD shows some change in brightness (potentially indicating Openbox has started?) around 27s after startup. It takes 48s to show the HTML page.
A possible start
- The item
postgresql@9.6-main.service
takes >10s to start. I need it (I need access to a Postgres database), but not before showing that first page. Is there a leaner equivalent of postgresql@9.6-main.service just for running a Postgres database?
Main question
- How can one see where the extra ~25s is going?
- How can one front-load the display of an HTML page?
debian systemd startup beagleboneblack
I am trying to reduce startup time of a Beaglebone (4.14.32-ti-r42 #1 SMP Thu Apr 5 23:13:09 UTC 2018 armv7l GNU/Linux
) running Debian Stretch to display a local HTML page on its LCD.
Every analysis I've done so far indicates startup is <25s, but it still takes over 45s to display the HTML page.
systemd-analyze
Startup finished in 6.158s (kernel) + 17.082s (userspace) = 23.240s
systemd-analyze blame
22.762s dev-mmcblk1p1.device
12.823s postgresql@9.6-main.service
2.613s systemd-udev-trigger.service
2.301s systemd-logind.service
1.874s sysstat.service
1.848s networking.service
1.431s bb-wl18xx-wlan0.service
1.430s ssh.service
1.186s generic-board-startup.service
1.082s connman.service
891ms avahi-daemon.service
859ms systemd-journald.service
798ms udhcpd.service
639ms systemd-udevd.service
491ms systemd-timesyncd.service
464ms systemd-random-seed.service
449ms systemd-tmpfiles-setup-dev.service
415ms systemd-user-sessions.service
363ms rsyslog.service
310ms systemd-sysctl.service
304ms sys-fs-fuse-connections.mount
302ms systemd-update-utmp-runlevel.service
302ms systemd-tmpfiles-setup.service
269ms sys-kernel-debug.mount
269ms hostapd.service
252ms sys-kernel-config.mount
249ms systemd-modules-load.service
230ms systemd-backlight@backlight:backlight.service
221ms systemd-journal-flush.service
215ms dev-mqueue.mount
205ms kmod-static-nodes.service
205ms systemd-update-utmp.service
199ms user@1000.service
160ms systemd-remount-fs.service
47ms postgresql.service
systemd-analyze critical-chain
graphical.target @14.388s
âÂÂâÂÂmulti-user.target @14.383s
âÂÂâÂÂpostgresql.service @14.326s +30ms
âÂÂâÂÂpostgresql@9.6-main.service @3.885s +10.382s
âÂÂâÂÂbasic.target @3.639s
âÂÂâÂÂsockets.target @3.639s
âÂÂâÂÂdbus.socket @3.639s
âÂÂâÂÂsysinit.target @3.635s
âÂÂâÂÂsystemd-backlight@backlight:backlight.service @12.982s +205ms
âÂÂâÂÂsystem-systemdx2dbacklight.slice @12.943s
âÂÂâÂÂsystem.slice @700ms
âÂÂâÂÂ-.slice @614ms
The HTML page service
The process I created that loads the page on the LCD is at-gui.service
:
[Unit]
Description=Start GUI
[Service]
ExecStart=/bin/bash -lc 'startx'
[Install]
WantedBy=basic.target
This process starts OpenBox, which is configured to load a browser with the HTML page shown.
Startup Times
The LCD shows some change in brightness (potentially indicating Openbox has started?) around 27s after startup. It takes 48s to show the HTML page.
A possible start
- The item
postgresql@9.6-main.service
takes >10s to start. I need it (I need access to a Postgres database), but not before showing that first page. Is there a leaner equivalent of postgresql@9.6-main.service just for running a Postgres database?
Main question
- How can one see where the extra ~25s is going?
- How can one front-load the display of an HTML page?
debian systemd startup beagleboneblack
asked Jun 6 at 17:08
sscirrus
1484
1484
If the only thing you're doing is displaying an HTML page, is there a reason you need this to sit on top of an X server? Wouldnetsurf
fill your needs?
â DopeGhoti
Jun 6 at 17:14
I'm not sure - the first page is just a loader. Eventually, we're running Rails, which accesses a Postgres database (Rails finishes last after ~75s). All local, no networking.
â sscirrus
Jun 6 at 17:19
We're building a sort of kiosk, so we needed the browser to be 'locked' from the user's perspective. We define our own super-simple webkit browser using Gtk and have it load the page.
â sscirrus
Jun 6 at 17:22
1
Seems fairly good the time.
â Rui F Ribeiro
Jun 6 at 21:46
I agree with user Rui F Ribeiro, if it takes roughly a minute from start up to your html display screen I do not see what the issue is. Please clarify why waiting a minute from a cold boot to static html page is an issue. Possible solutions would be to create cronjobs on start up that will get the services running or to not power down the computer between use or to use a non-systemd system.
â kemotep
Jun 7 at 13:01
add a comment |Â
If the only thing you're doing is displaying an HTML page, is there a reason you need this to sit on top of an X server? Wouldnetsurf
fill your needs?
â DopeGhoti
Jun 6 at 17:14
I'm not sure - the first page is just a loader. Eventually, we're running Rails, which accesses a Postgres database (Rails finishes last after ~75s). All local, no networking.
â sscirrus
Jun 6 at 17:19
We're building a sort of kiosk, so we needed the browser to be 'locked' from the user's perspective. We define our own super-simple webkit browser using Gtk and have it load the page.
â sscirrus
Jun 6 at 17:22
1
Seems fairly good the time.
â Rui F Ribeiro
Jun 6 at 21:46
I agree with user Rui F Ribeiro, if it takes roughly a minute from start up to your html display screen I do not see what the issue is. Please clarify why waiting a minute from a cold boot to static html page is an issue. Possible solutions would be to create cronjobs on start up that will get the services running or to not power down the computer between use or to use a non-systemd system.
â kemotep
Jun 7 at 13:01
If the only thing you're doing is displaying an HTML page, is there a reason you need this to sit on top of an X server? Would
netsurf
fill your needs?â DopeGhoti
Jun 6 at 17:14
If the only thing you're doing is displaying an HTML page, is there a reason you need this to sit on top of an X server? Would
netsurf
fill your needs?â DopeGhoti
Jun 6 at 17:14
I'm not sure - the first page is just a loader. Eventually, we're running Rails, which accesses a Postgres database (Rails finishes last after ~75s). All local, no networking.
â sscirrus
Jun 6 at 17:19
I'm not sure - the first page is just a loader. Eventually, we're running Rails, which accesses a Postgres database (Rails finishes last after ~75s). All local, no networking.
â sscirrus
Jun 6 at 17:19
We're building a sort of kiosk, so we needed the browser to be 'locked' from the user's perspective. We define our own super-simple webkit browser using Gtk and have it load the page.
â sscirrus
Jun 6 at 17:22
We're building a sort of kiosk, so we needed the browser to be 'locked' from the user's perspective. We define our own super-simple webkit browser using Gtk and have it load the page.
â sscirrus
Jun 6 at 17:22
1
1
Seems fairly good the time.
â Rui F Ribeiro
Jun 6 at 21:46
Seems fairly good the time.
â Rui F Ribeiro
Jun 6 at 21:46
I agree with user Rui F Ribeiro, if it takes roughly a minute from start up to your html display screen I do not see what the issue is. Please clarify why waiting a minute from a cold boot to static html page is an issue. Possible solutions would be to create cronjobs on start up that will get the services running or to not power down the computer between use or to use a non-systemd system.
â kemotep
Jun 7 at 13:01
I agree with user Rui F Ribeiro, if it takes roughly a minute from start up to your html display screen I do not see what the issue is. Please clarify why waiting a minute from a cold boot to static html page is an issue. Possible solutions would be to create cronjobs on start up that will get the services running or to not power down the computer between use or to use a non-systemd system.
â kemotep
Jun 7 at 13:01
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
To answer your first question:
Your at-gui.service
has Type=simple
(the default), so it's considered started as soon as the bash
process is started. Thus whatever time it actually takes for it to display something useful is not accounted for by systemd.
I don't understand your second question, and it should probably be asked separately anyway.
I'll clarify my second question - I mean to ask how might I get the HTML page to load and display sooner in the process?
â sscirrus
Jun 7 at 23:24
Try replacing X11 with DirectFB or SDL. GTK 2 had DirectFB support, but it was removed in GTK 3. Or Webkit has other options besides GTK.
â Ferenc Wágner
Jun 10 at 18:54
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
To answer your first question:
Your at-gui.service
has Type=simple
(the default), so it's considered started as soon as the bash
process is started. Thus whatever time it actually takes for it to display something useful is not accounted for by systemd.
I don't understand your second question, and it should probably be asked separately anyway.
I'll clarify my second question - I mean to ask how might I get the HTML page to load and display sooner in the process?
â sscirrus
Jun 7 at 23:24
Try replacing X11 with DirectFB or SDL. GTK 2 had DirectFB support, but it was removed in GTK 3. Or Webkit has other options besides GTK.
â Ferenc Wágner
Jun 10 at 18:54
add a comment |Â
up vote
0
down vote
To answer your first question:
Your at-gui.service
has Type=simple
(the default), so it's considered started as soon as the bash
process is started. Thus whatever time it actually takes for it to display something useful is not accounted for by systemd.
I don't understand your second question, and it should probably be asked separately anyway.
I'll clarify my second question - I mean to ask how might I get the HTML page to load and display sooner in the process?
â sscirrus
Jun 7 at 23:24
Try replacing X11 with DirectFB or SDL. GTK 2 had DirectFB support, but it was removed in GTK 3. Or Webkit has other options besides GTK.
â Ferenc Wágner
Jun 10 at 18:54
add a comment |Â
up vote
0
down vote
up vote
0
down vote
To answer your first question:
Your at-gui.service
has Type=simple
(the default), so it's considered started as soon as the bash
process is started. Thus whatever time it actually takes for it to display something useful is not accounted for by systemd.
I don't understand your second question, and it should probably be asked separately anyway.
To answer your first question:
Your at-gui.service
has Type=simple
(the default), so it's considered started as soon as the bash
process is started. Thus whatever time it actually takes for it to display something useful is not accounted for by systemd.
I don't understand your second question, and it should probably be asked separately anyway.
answered Jun 7 at 16:52
Ferenc Wágner
2,704920
2,704920
I'll clarify my second question - I mean to ask how might I get the HTML page to load and display sooner in the process?
â sscirrus
Jun 7 at 23:24
Try replacing X11 with DirectFB or SDL. GTK 2 had DirectFB support, but it was removed in GTK 3. Or Webkit has other options besides GTK.
â Ferenc Wágner
Jun 10 at 18:54
add a comment |Â
I'll clarify my second question - I mean to ask how might I get the HTML page to load and display sooner in the process?
â sscirrus
Jun 7 at 23:24
Try replacing X11 with DirectFB or SDL. GTK 2 had DirectFB support, but it was removed in GTK 3. Or Webkit has other options besides GTK.
â Ferenc Wágner
Jun 10 at 18:54
I'll clarify my second question - I mean to ask how might I get the HTML page to load and display sooner in the process?
â sscirrus
Jun 7 at 23:24
I'll clarify my second question - I mean to ask how might I get the HTML page to load and display sooner in the process?
â sscirrus
Jun 7 at 23:24
Try replacing X11 with DirectFB or SDL. GTK 2 had DirectFB support, but it was removed in GTK 3. Or Webkit has other options besides GTK.
â Ferenc Wágner
Jun 10 at 18:54
Try replacing X11 with DirectFB or SDL. GTK 2 had DirectFB support, but it was removed in GTK 3. Or Webkit has other options besides GTK.
â Ferenc Wágner
Jun 10 at 18:54
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f448250%2f25s-between-systemd-startup-and-actual-display%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
If the only thing you're doing is displaying an HTML page, is there a reason you need this to sit on top of an X server? Would
netsurf
fill your needs?â DopeGhoti
Jun 6 at 17:14
I'm not sure - the first page is just a loader. Eventually, we're running Rails, which accesses a Postgres database (Rails finishes last after ~75s). All local, no networking.
â sscirrus
Jun 6 at 17:19
We're building a sort of kiosk, so we needed the browser to be 'locked' from the user's perspective. We define our own super-simple webkit browser using Gtk and have it load the page.
â sscirrus
Jun 6 at 17:22
1
Seems fairly good the time.
â Rui F Ribeiro
Jun 6 at 21:46
I agree with user Rui F Ribeiro, if it takes roughly a minute from start up to your html display screen I do not see what the issue is. Please clarify why waiting a minute from a cold boot to static html page is an issue. Possible solutions would be to create cronjobs on start up that will get the services running or to not power down the computer between use or to use a non-systemd system.
â kemotep
Jun 7 at 13:01