[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Anyone seeing huge slowdown launching qemu with Linux 2

From: Avi Kivity
Subject: Re: [Qemu-devel] Anyone seeing huge slowdown launching qemu with Linux 2.6.35?
Date: Tue, 03 Aug 2010 17:38:25 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100720 Fedora/3.1.1-1.fc13 Lightning/1.0b2pre Thunderbird/3.1.1

 On 08/03/2010 05:05 PM, Richard W.M. Jones wrote:
On Tue, Aug 03, 2010 at 04:19:39PM +0300, Avi Kivity wrote:
  On 08/03/2010 03:48 PM, Richard W.M. Jones wrote:
Thanks for the explanation.  I'll repost my "DMA"-like fw-cfg patch
once I've rebased it and done some more testing.  This huge regression
for a common operation (implementing -initrd) needs to be solved
without using inb/rep ins.
Adding more interfaces is easy but a problem in the long term.
We'll optimize it as much as we can.  Meanwhile, why are you loading
huge initrds?  Use a cdrom instead (it will also be faster since the
guest doesn't need to unpack it).
Because it involves rewriting the entire appliance building process,
and we don't necessarily know if it'll be faster after we've done

Look: currently we create the initrd on the fly in 700ms.  We've no
reason to believe that creating a CD-ROM on the fly wouldn't take
around the same time.  After all, both processes involve reading all
the host files from disk and writing a temporary file.

The time will only continue to grow as you add features and as the distro bloats naturally.

Much better to create it once and only update it if some dependent file changes (basically the current on-the-fly code + save a list of file timestamps).

Alternatively, pass through the host filesystem.

You have to create these things on the fly, because we don't actually
ship an appliance to end users, just a tiny (<  1 MB) skeleton.  You
can't ship a massive statically linked appliance to end users because
it's just unmanageable (think: security; updates; bandwidth).

Shipping it is indeed out of the question. But on-the-fly creation is not the only alternative.

Loading the initrd currently takes 115ms (or could do, if a sensible
50 line patch was permitted).

So the only possible saving would be the 115ms load time of the
initrd.  In theory the CD-ROM device could be detected in 0 time.

Total saving: 115ms.

815 ms by my arithmetic. You also save 3*N-2*P memory where N is the size of your initrd and P is the actual amount used by the guest.

But will it be any faster, since after spending 115ms, everything runs
from memory, versus being loaded from the CD?

Let's face the fact that qemu has suffered from an enormous
regression.  From some hundreds of milliseconds up to over a minute,
in the space of 6 months of development.

It wasn't qemu, but kvm. And it didn't take six months, just a few commits. Those aren't going back, they're a lot more important than some libguestfs problem which shouldn't have been coded differently in the first place.

For a very simple operation:
loading a file into memory.

Loading a file into memory is plenty fast if you use the standard interfaces. -kernel -initrd is a specialized interface.

error compiling committee.c: too many arguments to function

reply via email to

[Prev in Thread] Current Thread [Next in Thread]