Bug 730128 - qemu-kvm takes very long to start with large initrd
Summary: qemu-kvm takes very long to start with large initrd
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: 17
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 618720 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-11 20:39 UTC by Albert Strasheim
Modified: 2013-05-25 19:25 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-25 19:25:35 UTC


Attachments (Terms of Use)

Description Albert Strasheim 2011-08-11 20:39:23 UTC
Description of problem:

It takes qemu-kvm about 40 seconds to start booting the kernel if the -initrd specifies a initramfs of 150 MB.

Once the kernel starts booting, it boots within 4 seconds, all the way through systemd to the console.

qemu-kvm seems to be doing something strange.

Version-Release number of selected component (if applicable):

qemu-system-x86-0.14.0-7.fc15.x86_64

kernel 2.6.38.8-32.fc15.x86_64

How reproducible:

Always

Steps to Reproduce:
1. sudo yum -y --releasever=15 --installroot `pwd`/root install bash systemd
2. cd root; ln -s /sbin/init
3. find . | sudo cpio -o -H newc | gzip > ../initramfs.img
4. qemu-kvm -m 4096M -nographic -net none -kernel root/boot/vmlinuz-2.6.38.8-35.fc15.x86_64 -append "console=ttyS0 selinux=0 clocksource=hpet ipv6.disable=1 plymouth.enable=0 rd.plymouth=0" -initrd initramfs.img

Actual results:

qemu-kvm takes about 40 seconds before the kernel starts booting.

Expected results:

qemu-kvm should boot fast

Additional info:

Hardware is a Mac Pro with 2* Intel Xeon E5462 CPUs and 20 GB RAM.

Comment 1 Fedora Admin XMLRPC Client 2012-03-15 17:53:20 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Daniel Berrangé 2012-04-18 12:26:50 UTC
Changing to rawhide, since this basically affects all QEMU versions in Fedora & we don't want it auto-closed when F15 goes EOL.

Comment 3 Cole Robinson 2012-07-10 13:24:06 UTC
*** Bug 618720 has been marked as a duplicate of this bug. ***

Comment 4 Cole Robinson 2012-07-10 13:25:26 UTC
Rawhide bugs just tend to linger, so moving to F17. 

I thought I saw commits go by about fixing this with qemu 1.1, but can't find them now. Here's older info from Rich's report:

The root cause is possibly:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7972995b0c346de76

See discussion here:
http://lists.gnu.org/archive/html/qemu-devel/2010-08/threads.html#00133

Comment 5 Richard W.M. Jones 2012-07-10 13:31:56 UTC
I'm fairly sure this is going to be a problem in qemu
forever since upstream devs don't want to change the
way that the initrd is loaded to make it more efficient.

In libguestfs we sidestepped the issue by not using an
initrd to load the appliance.

Comment 6 Cole Robinson 2013-05-25 19:25:35 UTC
I'm quite certain that more recent qemu has improved on this, so closing. And as Rich mentioned even if there are still issues, the substantial speedups were rejected in the past.


Note You need to log in before you can comment on or make changes to this bug.