[Bug 808611] New: Very slow loading of initrd
https://bugzilla.novell.com/show_bug.cgi?id=808611 https://bugzilla.novell.com/show_bug.cgi?id=808611#c0 Summary: Very slow loading of initrd Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: joschibrauchle@gmx.de QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.160 Safari/537.22 This bugreport is a followup to this thread on the opensuse-factory mailing list: http://lists.opensuse.org/opensuse-factory/2013-03/msg00162.html With openSUSE 12.3, loading of the initrd via grub legacy from harddisk **sometimes is extremely slow**, e.g. on a very recent Core-i7 system it takes ~10 seconds, on an older Core2Duo up to 30-60 seconds! These times are **only for loading** the initrd, not booting the system! During these 10-60 seconds, the HDD led of the machines are constantly on/flashing. The problem exists even with the "stock" kernel and initrd from the oss repo under /boot/x86_64/loader, if I copy then to the boot partition and add them to grub. This is our disk layout: --------- # fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x000ec0fc Device Boot Start End Blocks Id System /dev/sda1 * 2048 305151 151552 83 Linux /dev/sda2 305152 17092607 8393728 82 Linux swap / Solaris /dev/sda3 17092608 976773119 479840256 8e Linux LVM --------- The /boot partition is ext4. Currently there is no further output except the grub screen showing ------ root (hd0,0) kernel ... initrd ... <flashing cursor for a long time, i.e. 10-60 seconds> ------ I can **sometimes, not 100%** create slow and fast loading initrd's (with grub) on my machine using this procedure: 1. Slow loading initrd by re-installing kernel: # zypper in -f kernel-desktop ...<cut> (1/1) Installing: kernel-desktop-3.7.10-1.1.1 .........................................................................................................[done] Additional rpm output: Kernel image: /boot/vmlinuz-3.7.10-1.1-desktop Initrd image: /boot/initrd-3.7.10-1.1-desktop Root device: /dev/system/slash (mounted on / as ext4) /usr device: /dev/system/usr (mounted on /usr as ext4) Resume device: /dev/sda2 Kernel Modules: thermal_sys thermal processor fan dm-mod dm-snapshot scsi_dh scsi_dh_alua scsi_dh_rdac scsi_dh_emc scsi_dh_hp_sw xhci-hcd hid-logitech-dj linear Features: acpi dm plymouth block usb lvm2 resume.userspace resume.kernel --> Result: Slow boot with 10+ seconds delay at loading initrd # filefrag -v /boot/initrd-3.7.10-1.1-desktop Filesystem type is: ef53 File size of /boot/initrd-3.7.10-1.1-desktop is 32689465 (31924 blocks, blocksize 1024) ext logical physical expected length flags 0 0 43009 6144 1 6144 55297 49153 2048 2 8192 63489 57345 2048 3 10240 69633 65537 4096 4 14336 75777 73729 17588 eof /boot/initrd-3.7.10-1.1-desktop: 5 extents found 2. Fast loading initrd, just run: # mkinitrd Kernel image: /boot/vmlinuz-3.7.10-1.1-desktop Initrd image: /boot/initrd-3.7.10-1.1-desktop Root device: /dev/system/slash (mounted on / as ext4) /usr device: /dev/system/usr (mounted on /usr as ext4) Resume device: /dev/sda2 Kernel Modules: thermal_sys thermal processor fan dm-mod dm-snapshot scsi_dh scsi_dh_alua scsi_dh_rdac scsi_dh_emc scsi_dh_hp_sw xhci-hcd hid-logitech-dj linear Features: acpi dm plymouth block usb lvm2 resume.userspace resume.kernel --> Result: Fast boot with no delay! I unpacked both initrd's (into dirs "zypper" and "mkinitrd"): --------------- # diff -wuir zypper/ mkinitrd/ Only in zypper/bin: cat Only in zypper/bin: chmod Only in zypper/bin: cp Only in zypper/bin: date Only in zypper/bin: dmesg Only in zypper/bin: ls Only in zypper/bin: mkdir Only in zypper/bin: mknod Only in zypper/bin: mount Only in zypper/bin: mv Only in zypper/bin: rm Only in zypper/bin: sed Only in zypper/bin: sleep Only in zypper/bin: umount Only in zypper/bin: uname diff -wuir zypper/etc/adjtime mkinitrd/etc/adjtime --- zypper/etc/adjtime 2013-03-04 20:00:08.125172787 +0100 +++ mkinitrd/etc/adjtime 2013-03-04 20:04:38.492049355 +0100 @@ -1,3 +1,3 @@ --0.236439 1362423098 0.000000 -1362423098 +-0.236439 1362423464 0.000000 +1362423464 UTC diff -wuir zypper/mkinitrd.config mkinitrd/mkinitrd.config --- zypper/mkinitrd.config 2013-03-04 20:00:07.609173198 +0100 +++ mkinitrd/mkinitrd.config 2013-03-04 20:04:38.178049423 +0100 @@ -1 +1 @@ --k /boot/vmlinuz-3.7.10-1.1-desktop -i /boot/initrd-3.7.10-1.1-desktop + Question: Why are there different files in the initrd created by zypper and by mkinitrd? Reproducible: Sometimes Steps to Reproduce: 1. "zypper in -f kernel-desktop" -> initrd takes 10+ seconds to load on boot 2. "mkinitrd" -> initrd loads immediately on boot -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=808611 https://bugzilla.novell.com/show_bug.cgi?id=808611#c1 Jiri Srain <jsrain@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsrain@suse.com AssignedTo|jsrain@suse.com |mmarek@suse.com --- Comment #1 from Jiri Srain <jsrain@suse.com> 2013-03-11 10:16:06 UTC --- Michal, why are the initrds different at all? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=808611 https://bugzilla.novell.com/show_bug.cgi?id=808611#c2 --- Comment #2 from Joschi Brauchle <joschibrauchle@gmx.de> 2013-03-11 10:32:14 UTC --- I just now created an initrd that loads **fast** via kernel reinstallation with zypper. I.e. the load time does not depend on which command I use to create the initrd, but seems rather random (so far). # filefrag -v /boot/initrd-3.7.10-1.1-desktop Filesystem type is: ef53 File size of /boot/initrd-3.7.10-1.1-desktop is 32667526 (31902 blocks, blocksize 1024) ext logical physical expected length flags 0 0 116737 14336 1 14336 139265 131073 10240 2 24576 34817 149505 2048 3 26624 49153 36865 5278 eof /boot/initrd-3.7.10-1.1-desktop: 4 extents found I will try to figure out if having 5 extents or more results in slow loading... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=808611 https://bugzilla.novell.com/show_bug.cgi?id=808611#c3 --- Comment #3 from Joschi Brauchle <joschibrauchle@gmx.de> 2013-03-11 10:58:34 UTC --- I recreated about 15 more initrd's with "mkinitrd". So far, all initrd's with < 5 extents load fast,
= 5 extents load slow.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=808611 https://bugzilla.novell.com/show_bug.cgi?id=808611#c4 --- Comment #4 from Joschi Brauchle <joschibrauchle@gmx.de> 2013-05-21 14:39:57 UTC --- I can provide SSH/RDP access to a VirtualBox machine that exhibits exactly this property or I can provide the VBox harddisk as .vdi file, if needed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=808611 https://bugzilla.novell.com/show_bug.cgi?id=808611#c5 Hans Greif <hans-juergen.greif@kabelbw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hans-juergen.greif@kabelbw. | |de --- Comment #5 from Hans Greif <hans-juergen.greif@kabelbw.de> 2013-07-11 11:23:46 UTC --- Hello, I have to wait 15 minutes for system opensuse 12.3 to come up on a 4.5GHz,24GB machine. The machine must work with nvidia driver for 2x580 NVIDIA graphic cards because the nouveau driver is hanging. I have observed in the beginning of a desktop session, that the system tries to work with 0.8MB RAM all processor try to work but must wait for free RAM later on it uses 2.3 GB. Can set the bootmgr to get 20GB RAM to boot faster? Cheers grepi -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com