Disabling journald increases boot-up time!?

Hi there,

In order to decrease the boot-up time I tried to disable the journald service of systemd. I did this in a three different ways:

  1. Disable via systemctl mask (for systemd-journal-flush.service and systemd-journald.service)
  2. Change /etc/journald.conf to avoid storing the logs (Storage=none)
  3. See point 2 + Decrease loglevels in configuration (MaxLevelStore=warning, MaxLevelSyslog=warning, MaxLevelKMsg=warning, MaxLevelConsole=warning, MaxLevelWall=crit)

To my surprise none of these steps decreased the boot-up time. On the contrary, all of them actually increased the time:

  1. +1200ms,
  2. +40ms
  3. +20ms

I should add that the time I am referring to is the output for userspace of systemd-analyze plot (averaged over 2 to 4 boot-ups).

Does anyone have an explanation for this?

Thanks in advance!

hi @magra

Welcome to the Toradex Community!!!

Could you provide the version of the hardware and software of your module?

Concerning your issue: What is your application? Why are you trying to reduce the boot-up time??
Could you provide the serial boot log for all the three ways you tried to disable the journald service?

Best regards, Jaski

Hi Jaski,

Thanks for your reply.

Our module: Apalis iMX6 Quad 2GB IT V1.1C, Qt5-X11-Image 2.8b2 20180713

We are working on a Qt/Qml graphical application with CAN-Bus input. It will be the only application on the board and should start up in 10 sec. The current start-up time of the application alone is 6 sec so we are trying to reduce the boot-up time as far as possible. Here are the serial boot logs obtained with (grabserial -t -d /dev/USB0):

Default:

[0.000001 0.000001] 
[0.000829 0.000828] 
[0.000892 0.000063] U-Boot 2016.11-2.8.2+g087e95a (Jun 10 2018 - 03:37:16 -0400)
[0.005834 0.004942] 
[0.005881 0.000047] CPU:   Freescale i.MX6Q rev1.5 at 792 MHz
[0.007490 0.001609] Reset cause: POR
[0.007973 0.000483] I2C:   ready
[0.008866 0.000893] DRAM:  2 GiB
[0.061343 0.052477] PMIC:  device id: 0x10, revision id: 0x21, programmed
[0.063263 0.001920] MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
[0.189116 0.125853] auto-detected panel HDMI
[0.204852 0.015736] Display: HDMI (1024x768)
[0.236789 0.031937] In:    serial
[0.237491 0.000702] Out:   serial
[0.238069 0.000578] Err:   serial
[0.261184 0.023115] Model: Toradex Apalis iMX6 Quad 2GB IT V1.1C, Serial# 05184618
[0.263287 0.002103] Net:   using PHY at 7
[0.277760 0.014473] FEC [PRIME]
[0.278458 0.000698] Hit any key to stop autoboot:  0 
[0.303137 0.024679] Booting from internal eMMC chip...
[0.304195 0.001058] reading imx6q-apalis-eval.dtb
[0.318654 0.014459] 54314 bytes read in 18 ms (2.9 MiB/s)
[0.320001 0.001347] reading zImage
[0.453696 0.133695] 3451704 bytes read in 110 ms (29.9 MiB/s)
[0.455076 0.001380] ## Flattened Device Tree blob at 12000000
[0.456430 0.001354]    Booting using the fdt blob at 0x12000000
[0.457662 0.001232]    Using Device Tree in place at 12000000, end 12010429
[0.459163 0.001501] 
[0.459197 0.000034] Starting kernel ...
[0.459798 0.000601] 
[4.788131 4.328333] [    3.969750] vgaarb: this pci device is not a vga device
[4.964148 0.176017] [    4.137690] vgaarb: this pci device is not a vga device
[5.475909 0.511761] 
[5.536335 0.060426] .---O---.                                           
[5.540433 0.004098] |       |                  .-.           o o        
[5.547116 0.006683] |   |   |-----.-----.-----.| |   .----..-----.-----.
[5.548550 0.001434] |       |     | __  |  ---'| '--.|  .-'|     |     |
[5.550371 0.001821] |   |   |  |  |     |---  ||  --'|  |  |  '  | | | |
[5.552954 0.002583] '---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'
[5.554760 0.001806]                 -'  |
[5.555376 0.000616]                 '---'
[5.556062 0.000686] 
[5.556097 0.000035] The Angstrom Distribution apalis-imx6 ttymxc0
[5.557353 0.001256] 
[5.557388 0.000035] Angstrom v2017.12 - Kernel 
[5.558208 0.000820] 
[5.558242 0.000034] Apalis-iMX6_Qt5-X11-Image 2.8b2 20180713
[5.559540 0.001298] 
[5.567321 0.007781] apalis-imx6 login: 

Masked journald services:

[0.000001 0.000001] 
[0.000772 0.000771] 
[0.000974 0.000202] U-Boot 2016.11-2.8.2+g087e95a (Jun 10 2018 - 03:37:16 -0400)
[0.002914 0.001940] 
[0.002954 0.000040] CPU:   Freescale i.MX6Q rev1.5 at 792 MHz
[0.009207 0.006253] Reset cause: POR
[0.009814 0.000607] I2C:   ready
[0.010181 0.000367] DRAM:  2 GiB
[0.046116 0.035935] PMIC:  device id: 0x10, revision id: 0x21, programmed
[0.048219 0.002103] MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
[0.190361 0.142142] auto-detected panel HDMI
[0.205844 0.015483] Display: HDMI (1024x768)
[0.238219 0.032375] In:    serial
[0.238934 0.000715] Out:   serial
[0.239501 0.000567] Err:   serial
[0.260833 0.021332] Model: Toradex Apalis iMX6 Quad 2GB IT V1.1C, Serial# 05184618
[0.262846 0.002013] Net:   using PHY at 7
[0.277687 0.014841] FEC [PRIME]
[0.278048 0.000361] Hit any key to stop autoboot:  0 
[0.303731 0.025683] Booting from internal eMMC chip...
[0.304883 0.001152] reading imx6q-apalis-eval.dtb
[0.319223 0.014340] 54314 bytes read in 18 ms (2.9 MiB/s)
[0.320606 0.001383] reading zImage
[0.512215 0.191609] 3451704 bytes read in 110 ms (29.9 MiB/s)
[0.513993 0.001778] ## Flattened Device Tree blob at 12000000
[0.516130 0.002137]    Booting using the fdt blob at 0x12000000
[0.518096 0.001966]    Using Device Tree in place at 12000000, end 12010429
[0.519612 0.001516] 
[0.519646 0.000034] Starting kernel ...
[0.520134 0.000488] 
[2.716498 2.196364] [    1.866251] systemd[1]: systemd-journald-dev-log.socket: Socket service systemd-journald.service not loaded, refusing.
[2.721161 0.004663] [    1.877210] systemd[1]: Failed to listen on Journal Socket (/dev/log).
[2.723352 0.002191] [e[0;1;31mFAILEDe[0m] Failed to listen on Journal Socket (/dev/log).
[2.745248 0.021896] See 'systemctl status systemd-journald-dev-log.socket' for details.
[2.746487 0.001239] [e[0;32m  OK  e[0m] Listening on udev Kernel Socket.
[2.761256 0.014769] [e[0;32m  OK  e[0m] Created slice User and Session Slice.
[2.809444 0.048188] [e[0;32m  OK  e[0m] Reached target Remote File Systems.
[2.825445 0.016001] [e[0;32m  OK  e[0m] Started Dispatch Password Requests to Console Directory Watch.
[2.875402 0.049957] [e[0;32m  OK  e[0m] Reached target Host and Network Name Lookups.
[2.891410 0.016008] [e[0;32m  OK  e[0m] Created slice System Slice.
[2.937452 0.046042]          Mounting Kernel Debug File System...
[3.031559 0.094107] [e[0;32m  OK  e[0m] Reached target Slices.
[3.085797 0.054238] [e[0;32m  OK  e[0m] Created slice system-serial\x2dgetty.slice.
[3.088115 0.002318] [e[0;32m  OK  e[0m] Created slice system-getty.slice.
[3.092479 0.004364] [e[0;32m  OK  e[0m] Listening on udev Control Socket.
[3.093908 0.001429] [e[0;32m  OK  e[0m] Reached target Paths.
[3.099121 0.005213] [e[0;1;31mFAILEDe[0m] Failed to listen on Journal Socket.
[3.131797 0.032676] See 'systemctl status systemd-journald.socket' for details.
[3.163525 0.031728]          Starting File System Check on Root Device...
[3.195200 0.031675]          Starting Load Kernel Modules...
[3.244341 0.049141]          Starting Export GPIOs to user space...
[3.245986 0.001645] [e[0;32m  OK  e[0m] Listening on /dev/initctl Compatibility Named Pipe.
[3.252286 0.006300] [e[0;32m  OK  e[0m] Listening on Network Service Netlink Socket.
[3.255184 0.002898] [e[0;32m  OK  e[0m] Reached target Swap.
[3.259782 0.004598]          Mounting Temporary Directory (/tmp)...
[3.261168 0.001386] [e[0;32m  OK  e[0m] Mounted Kernel Debug File System.
[3.262661 0.001493] [e[0;32m  OK  e[0m] Mounted Temporary Directory (/tmp).
[3.302045 0.039384] [e[0;32m  OK  e[0m] Started Load Kernel Modules.
[3.303774 0.001729]          Starting Apply Kernel Variables...
[3.309179 0.005405]          Mounting Kernel Configuration File System...
[3.310873 0.001694] [e[0;32m  OK  e[0m] Mounted Kernel Configuration File System.
[3.314568 0.003695] [e[0;32m  OK  e[0m] Started Export GPIOs to user space.
[3.316091 0.001523] [e[0;32m  OK  e[0m] Started Apply Kernel Variables.
[3.318814 0.002723] [e[0;32m  OK  e[0m] Started File System Check on Root Device.
[3.350130 0.031316]          Starting Remount Root and Kernel File Systems...
[3.403187 0.053057] [e[0;32m  OK  e[0m] Started Remount Root and Kernel File Systems.
[3.435514 0.032327]          Starting udev Coldplug all Devices...
[3.451484 0.015970]          Starting Create Static Device Nodes in /dev...
[3.497441 0.045957] [e[0;32m  OK  e[0m] Started Create Static Device Nodes in /dev.
[3.513368 0.015927] [e[0;32m  OK  e[0m] Reached target Local File Systems (Pre).
[3.561261 0.047893]          Mounting /var/volatile...
[3.593036 0.031775]          Starting udev Kernel Device Manager...
[3.684722 0.091686] [e[0;32m  OK  e[0m] Mounted /var/volatile.
[3.687037 0.002315] [    2.813749] systemd-udevd[129]: Invalid rule /lib/udev/rules.d/73-seat-late.rules:15: RUN{builtin}: 'uaccess' unknown
[3.695817 0.008780] [e[0;32m  OK  e[0m] Started udev Kernel Device Manager.
[3.722184 0.026367]          Starting Load/Save Random Seed...
[3.724568 0.002384] [e[0;32m  OK  e[0m] Reached target Local File Systems.
[3.743609 0.019041]          Starting Create Volatile Files and Directories...
[3.770316 0.026707] [e[0;32m  OK  e[0m] Started Load/Save Random Seed.
[3.786298 0.015982] [e[0;32m  OK  e[0m] Started Create Volatile Files and Directories.
[3.839287 0.052989]          Starting Update UTMP about System Boot/Shutdown...
[3.887034 0.047747] [e[0;32m  OK  e[0m] Started udev Coldplug all Devices.
[3.967290 0.080256] [e[0;32m  OK  e[0m] Found device /dev/ttymxc0.
[4.014316 0.047026] [e[0;32m  OK  e[0m] Started Update UTMP about System Boot/Shutdown.
[4.030370 0.016054] [e[0;32m  OK  e[0m] Reached target System Initialization.
[4.077427 0.047057] [e[0;32m  OK  e[0m] Listening on D-Bus System Message Bus Socket.
[4.106277 0.028850] [e[0;32m  OK  e[0m] Started Daily Cleanup of Temporary Directories.
[4.122460 0.016183] [e[0;32m  OK  e[0m] Reached target Timers.
[4.166240 0.043780] [e[0;32m  OK  e[0m] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[4.195964 0.029724] [e[0;32m  OK  e[0m] Listening on RPCbind Server Activation Socket.
[4.212303 0.016339]          Starting Console System Startup Logging...
[4.244138 0.031835]          Starting sshd.socket.
[4.292015 0.047877] [e[0;32m  OK  e[0m] Started Console System Startup Logging.
[4.388102 0.096087] [e[0;32m  OK  e[0m] Listening on sshd.socket.
[4.740051 0.351949] [e[0;32m  OK  e[0m] Reached target Sound Card.
[4.798453 0.058402] [e[0;32m  OK  e[0m] Reached target Sockets.
[4.803967 0.005514] [e[0;32m  OK  e[0m] Reached target Basic System.
[4.836078 0.032111] [e[0;32m  OK  e[0m] Reached target Containers.
[4.868000 0.031922]          Starting start X and a qt application...
[4.899853 0.031853] [e[0;32m  OK  e[0m] Started D-Bus System Message Bus.
[5.027757 0.127904]          Starting Connection service...
[5.097579 0.069822]          Starting Load default USB gadget schema g1.schema...
[5.113768 0.016189]          Starting Login Service...
[5.145751 0.031983]          Starting Avahi mDNS/DNS-SD Stack...
[5.177587 0.031836]          Starting Save/Restore Sound Card State...
[5.209689 0.032102] [e[0;32m  OK  e[0m] Started Timestamping service.
[5.233840 0.024151] [e[0;32m  OK  e[0m] Started start X and a qt application.
[5.234933 0.001093] [e[0;32m  OK  e[0m] Started Save/Restore Sound Card State.
[5.265841 0.030908] [e[0;32m  OK  e[0m] Started Login Service.
[5.329935 0.064094] [e[0;32m  OK  e[0m] Started Connection service.
[5.361608 0.031673] [e[0;32m  OK  e[0m] Started Avahi mDNS/DNS-SD Stack.
[5.505907 0.144299] [e[0;32m  OK  e[0m] Started Load default USB gadget schema g1.schema.
[5.553533 0.047626]          Starting Network Service...
[5.725751 0.172218] [e[0;32m  OK  e[0m] Started Network Service.
[5.726315 0.000564] [    4.896047] vgaarb: this pci device is not a vga device
[5.821699 0.095384] [e[0;32m  OK  e[0m] Reached target Network.
[5.941194 0.119495]          [    5.067790] vgaarb: this pci device is not a vga device
[5.941815 0.000621] Starting Permit User Sessions...
[5.963164 0.021349] [e[0;32m  OK  e[0m] Started Permit User Sessions.
[6.027222 0.064058] [e[0;32m  OK  e[0m] Started Getty on tty1.
[6.059241 0.032019] [e[0;32m  OK  e[0m] Started Serial Getty on ttymxc0.
[6.075178 0.015937] [e[0;32m  OK  e[0m] Reached target Login Prompts.
[6.123129 0.047951] [e[0;32m  OK  e[0m] Reached target Multi-User System.
[6.155268 0.032139] [e[0;32m  OK  e[0m] Reached target Graphical Interface.
[6.199203 0.043935]          Starting Update UTMP about System Runlevel Changes...
[6.258139 0.058936] [e[0;32m  OK  e[0m] Started Update UTMP about System Runlevel Changes.
[7.283927 1.025788] 
[7.347089 0.063162] .---O---.                                           
[7.347964 0.000875] |       |                  .-.           o o        
[7.348725 0.000761] |   |   |-----.-----.-----.| |   .----..-----.-----.
[7.349159 0.000434] |       |     | __  |  ---'| '--.|  .-'|     |     |
[7.349672 0.000513] |   |   |  |  |     |---  ||  --'|  |  |  '  | | | |
[7.350221 0.000549] '---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'
[7.350724 0.000503]                 -'  |
[7.350860 0.000136]                 '---'
[7.350997 0.000137] 
[7.351004 0.000007] The Angstrom Distribution apalis-imx6 ttymxc0
[7.351377 0.000373] 
[7.351392 0.000015] Angstrom v2017.12 - Kernel 
[7.351996 0.000604] 
[7.352016 0.000020] Apalis-iMX6_Qt5-X11-Image 2.8b2 20180713
[7.362116 0.010100] 
[7.378022 0.015906] apalis-imx6 login: 

Journald.conf → Storage=None:

[0.000001 0.000001] 
[0.000698 0.000697] 
[0.000784 0.000086] U-Boot 2016.11-2.8.2+g087e95a (Jun 10 2018 - 03:37:16 -0400)
[0.027693 0.026909] 
[0.027742 0.000049] CPU:   Freescale i.MX6Q rev1.5 at 792 MHz
[0.029080 0.001338] Reset cause: POR
[0.029671 0.000591] I2C:   ready
[0.030083 0.000412] DRAM:  2 GiB
[0.070579 0.040496] PMIC:  device id: 0x10, revision id: 0x21, programmed
[0.070921 0.000342] MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
[0.215100 0.144179] auto-detected panel HDMI
[0.230871 0.015771] Display: HDMI (1024x768)
[0.263051 0.032180] In:    serial
[0.263631 0.000580] Out:   serial
[0.263994 0.000363] Err:   serial
[0.286063 0.022069] Model: Toradex Apalis iMX6 Quad 2GB IT V1.1C, Serial# 05184618
[0.288167 0.002104] Net:   using PHY at 7
[0.302367 0.014200] FEC [PRIME]
[0.302844 0.000477] Hit any key to stop autoboot:  0 
[0.328662 0.025818] Booting from internal eMMC chip...
[0.329782 0.001120] reading imx6q-apalis-eval.dtb
[0.343995 0.014213] 54314 bytes read in 18 ms (2.9 MiB/s)
[0.345194 0.001199] reading zImage
[0.479014 0.133820] 3451704 bytes read in 110 ms (29.9 MiB/s)
[0.480348 0.001334] ## Flattened Device Tree blob at 12000000
[0.481473 0.001125]    Booting using the fdt blob at 0x12000000
[0.482721 0.001248]    Using Device Tree in place at 12000000, end 12010429
[0.484361 0.001640] 
[0.484399 0.000038] Starting kernel ...
[0.485042 0.000643] 
[4.814057 4.329015] [    3.971333] vgaarb: this pci device is not a vga device
[5.038007 0.223950] [    4.188399] vgaarb: this pci device is not a vga device
[5.981857 0.943850] 
[6.042817 0.060960] .---O---.                                           
[6.044982 0.002165] |       |                  .-.           o o        
[6.046936 0.001954] |   |   |-----.-----.-----.| |   .----..-----.-----.
[6.048892 0.001956] |       |     | __  |  ---'| '--.|  .-'|     |     |
[6.050646 0.001754] |   |   |  |  |     |---  ||  --'|  |  |  '  | | | |
[6.052233 0.001587] '---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'
[6.057992 0.005759]                 -'  |
[6.062790 0.004798]                 '---'
[6.063433 0.000643] 
[6.063479 0.000046] The Angstrom Distribution apalis-imx6 ttymxc0
[6.064698 0.001219] 
[6.064732 0.000034] Angstrom v2017.12 - Kernel 
[6.065549 0.000817] 
[6.065582 0.000033] Apalis-iMX6_Qt5-X11-Image 2.8b2 20180713
[6.067630 0.002048] 
[6.073659 0.006029] apalis-imx6 login: 

Journald.conf → Storage=None & reduced log levels:

[0.000001 0.000001] 
[0.000477 0.000476] 
[0.000528 0.000051] U-Boot 2016.11-2.8.2+g087e95a (Jun 10 2018 - 03:37:16 -0400)
[0.003417 0.002889] 
[0.003463 0.000046] CPU:   Freescale i.MX6Q rev1.5 at 792 MHz
[0.006149 0.002686] Reset cause: POR
[0.006678 0.000529] I2C:   ready
[0.007305 0.000627] DRAM:  2 GiB
[0.045795 0.038490] PMIC:  device id: 0x10, revision id: 0x21, programmed
[0.049443 0.003648] MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
[0.189804 0.140361] auto-detected panel HDMI
[0.205724 0.015920] Display: HDMI (1024x768)
[0.237895 0.032171] In:    serial
[0.238957 0.001062] Out:   serial
[0.240028 0.001071] Err:   serial
[0.260762 0.020734] Model: Toradex Apalis iMX6 Quad 2GB IT V1.1C, Serial# 05184618
[0.263173 0.002411] Net:   using PHY at 7
[0.277478 0.014305] FEC [PRIME]
[0.278029 0.000551] Hit any key to stop autoboot:  0 
[0.303262 0.025233] Booting from internal eMMC chip...
[0.304365 0.001103] reading imx6q-apalis-eval.dtb
[0.318789 0.014424] 54314 bytes read in 18 ms (2.9 MiB/s)
[0.320112 0.001323] reading zImage
[0.453642 0.133530] 3451704 bytes read in 110 ms (29.9 MiB/s)
[0.455641 0.001999] ## Flattened Device Tree blob at 12000000
[0.457509 0.001868]    Booting using the fdt blob at 0x12000000
[0.459462 0.001953]    Using Device Tree in place at 12000000, end 12010429
[0.461247 0.001785] 
[0.461269 0.000022] Starting kernel ...
[0.461563 0.000294] 
[4.788327 4.326764] [    3.973181] vgaarb: this pci device is not a vga device
[4.979925 0.191598] [    4.167618] vgaarb: this pci device is not a vga device
[5.412030 0.432105] 
[5.476991 0.064961] .---O---.                                           
[5.479816 0.002825] |       |                  .-.           o o        
[5.481590 0.001774] |   |   |-----.-----.-----.| |   .----..-----.-----.
[5.483450 0.001860] |       |     | __  |  ---'| '--.|  .-'|     |     |
[5.485201 0.001751] |   |   |  |  |     |---  ||  --'|  |  |  '  | | | |
[5.486930 0.001729] '---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'
[5.489166 0.002236]                 -'  |
[5.489725 0.000559]                 '---'
[5.490701 0.000976] 
[5.490739 0.000038] The Angstrom Distribution apalis-imx6 ttymxc0
[5.492730 0.001991] 
[5.492785 0.000055] Angstrom v2017.12 - Kernel 
[5.493983 0.001198] 
[5.494048 0.000065] Apalis-iMX6_Qt5-X11-Image 2.8b2 20180713
[5.495499 0.001451] 
[5.507576 0.012077] apalis-imx6 login: 

Best regards

Hi, not sure if this helps in your case, but we lowered boot up time on our Colibri VF50 by disabling boot log to be sent to serial output. If we need to check boot log, it’s still available in journald.

Hi @magra

You can also have a look here.

Best regards
Jaski

Thank you for the tip,
We already set the Kernel boot log to “quiet”. Can you give me any hints on how to avoid the remaining output?

variable “console” will do this job if set to “/dev/null”.

printenv console

console=/dev/null

Take a look here also: Configuring Serial Port Debug Console (Linux/U-Boot) | Toradex Developer Center