<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>44878</bug_id>
          
          <creation_ts>2023-01-10 19:14:42 +0300</creation_ts>
          <short_desc>make-initrd: медленная загрузка</short_desc>
          <delta_ts>2023-01-10 23:08:34 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>make-initrd</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Sheplyakov">asheplyakov</reporter>
          <assigned_to name="Alexey Gladkov">legion</assigned_to>
          <cc>antohami</cc>
    
    <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>legion</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>219936</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2023-01-10 19:14:42 +0300</bug_when>
    <thetext>С момента запуска /init в initramfs до запуска /sbin/init в корневой ФС проходит 18 секунд.
Измерял по логу ядра

[    8.534019] Freeing unused kernel memory: 3776K
[    8.534741] Run /init as init process
[    8.534875]   with arguments:
[    8.534985]     /init
[    8.535086]   with environment:
[    8.535196]     HOME=/
[    8.535297]     TERM=linux
[    8.535402]     BOOT_IMAGE=/boot/vmlinuz-6.2.0-rc3-00042-g379ba1775010
[    8.672904] input: Logitech USB Keyboard as /devices/platform/soc/soc:usb2@2c400000/2c400000.dwc3/xhci-hcd.1.auto/usb1/1-1/1-1:1.0/0003:046D:C31C.0001/input/input1
[    8.726275] hid-generic 0003:046D:C31C.0001: input,hidraw0: USB HID v1.10 Keyboard [Logitech USB Keyboard] on usb-xhci-hcd.1.auto-1/input0
[    8.735845] input: Logitech USB Keyboard Consumer Control as /devices/platform/soc/soc:usb2@2c400000/2c400000.dwc3/xhci-hcd.1.auto/usb1/1-1/1-1:1.1/0003:046D:C31C.0002/input/input2
[    8.788455] input: Logitech USB Keyboard System Control as /devices/platform/soc/soc:usb2@2c400000/2c400000.dwc3/xhci-hcd.1.auto/usb1/1-1/1-1:1.1/0003:046D:C31C.0002/input/input3
[    8.789611] hid-generic 0003:046D:C31C.0002: input,hidraw1: USB HID v1.10 Device [Logitech USB Keyboard] on usb-xhci-hcd.1.auto-1/input1
[    8.904776] usb 1-2: new low-speed USB device number 3 using xhci-hcd
[    9.179827] input: PixArt USB Optical Mouse as /devices/platform/soc/soc:usb2@2c400000/2c400000.dwc3/xhci-hcd.1.auto/usb1/1-2/1-2:1.0/0003:093A:2510.0003/input/input4
[    9.181333] hid-generic 0003:093A:2510.0003: input,hidraw2: USB HID v1.11 Mouse [PixArt USB Optical Mouse] on usb-xhci-hcd.1.auto-2/input0
[   18.442974] NET: Registered PF_INET6 protocol family
[   18.446934] Segment Routing with IPv6
[   18.447131] In-situ OAM (IOAM) with IPv6
[   19.951106] EXT4-fs (sda2): mounted filesystem 14fe396a-85e4-4fc0-a833-7837552a772b with ordered data mode. Quota mode: none.
[   26.903958] systemd[1]: systemd v249.12-alt3 running in system mode (+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)


На этой же плате (с этим же ядром) при использовании dracut initramfs завершает работу за 1,6 секунд:

[    8.598568] Freeing unused kernel memory: 3776K
[    8.599274] Run /init as init process
[    8.599409]   with arguments:
[    8.599520]     /init
[    8.599620]   with environment:
[    8.599730]     HOME=/
[    8.599832]     TERM=linux
[    8.599937]     BOOT_IMAGE=/boot/vmlinuz-6.2.0-rc3-00042-g379ba1775010
[    8.745826] input: Logitech USB Keyboard as /devices/platform/soc/soc:usb2@2c400000/2c400000.dwc3/xhci-hcd.1.auto/usb1/1-1/1-1:1.0/0003:046D:C31C.0001/input/input1
[    8.799464] hid-generic 0003:046D:C31C.0001: input,hidraw0: USB HID v1.10 Keyboard [Logitech USB Keyboard] on usb-xhci-hcd.1.auto-1/input0
[    8.808701] input: Logitech USB Keyboard Consumer Control as /devices/platform/soc/soc:usb2@2c400000/2c400000.dwc3/xhci-hcd.1.auto/usb1/1-1/1-1:1.1/0003:046D:C31C.0002/input/input2
[    8.861031] input: Logitech USB Keyboard System Control as /devices/platform/soc/soc:usb2@2c400000/2c400000.dwc3/xhci-hcd.1.auto/usb1/1-1/1-1:1.1/0003:046D:C31C.0002/input/input3
[    8.862309] hid-generic 0003:046D:C31C.0002: input,hidraw1: USB HID v1.10 Device [Logitech USB Keyboard] on usb-xhci-hcd.1.auto-1/input1
[    8.948977] NET: Registered PF_INET6 protocol family
[    8.952811] Segment Routing with IPv6
[    8.953011] In-situ OAM (IOAM) with IPv6
[    8.977186] usb 1-2: new low-speed USB device number 3 using xhci-hcd
[    9.038977] systemd[1]: systemd v249.12-alt3 running in system mode (+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[    9.042624] systemd[1]: Detected architecture arm64.


А через 25 секунд после старта ядра уже запущен lightdm (т.е загрузка в 1,7 раз быстрее).
При загрузке по сети, использовании luks, initramfs (созданный make-initrd) работает ещё медленнее (раза в 3 -- 4).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>219937</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Gladkov">legion</who>
    <bug_when>2023-01-10 19:21:00 +0300</bug_when>
    <thetext>Слишком мало данных.

На чём корневой раздел ?
Какие параметры переданы при загрузке ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>219938</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2023-01-10 19:25:24 +0300</bug_when>
    <thetext>(Ответ для Alexey Gladkov на комментарий #1)
&gt; Слишком мало данных.
&gt; 
&gt; На чём корневой раздел ?

# lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 238,5G  0 disk 
├─sda1   8:1    0   255M  0 part /boot/efi
├─sda2   8:2    0    32G  0 part /
├─sda3   8:3    0     4G  0 part [SWAP]
└─sda4   8:4    0 202,2G  0 part /home

&gt; Какие параметры переданы при загрузке ?

$ cat /proc/cmdline 
BOOT_IMAGE=/boot/vmlinuz-6.2.0-rc3-00042-g379ba1775010 root=UUID=14fe396a-85e4-4fc0-a833-7837552a772b ro audit=0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>219939</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Gladkov">legion</who>
    <bug_when>2023-01-10 19:33:50 +0300</bug_when>
    <thetext>Хм. Вроде простая конфигурация.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>219946</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Gladkov">legion</who>
    <bug_when>2023-01-10 23:08:34 +0300</bug_when>
    <thetext>Пока у меня нет конкретных идей по оптимизации. Оставлю багу открытой и буду её иметь в виду.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>