From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44338 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgK4R-0001Wg-OM for qemu-devel@nongnu.org; Tue, 03 Aug 2010 12:10:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OgK4L-0002rI-JA for qemu-devel@nongnu.org; Tue, 03 Aug 2010 12:10:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36309) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgK4L-0002rC-CP for qemu-devel@nongnu.org; Tue, 03 Aug 2010 12:10:21 -0400 Message-ID: <4C583F6A.7030600@redhat.com> Date: Tue, 03 Aug 2010 19:10:18 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Anyone seeing huge slowdown launching qemu with Linux 2.6.35? References: <20100803111306.GA21886@amd.home.annexia.org> <20100803113302.GT24773@redhat.com> <20100803121000.GV13789@amd.home.annexia.org> <20100803123714.GU24773@redhat.com> <20100803124808.GW13789@amd.home.annexia.org> <4C58176B.2050306@redhat.com> <20100803140506.GD22211@amd.home.annexia.org> <4C5829E1.60004@redhat.com> <20100803145337.GF22211@amd.home.annexia.org> In-Reply-To: <20100803145337.GF22211@amd.home.annexia.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: qemu-devel@nongnu.org, Gleb Natapov , kvm@vger.kernel.org On 08/03/2010 05:53 PM, Richard W.M. Jones wrote: > >>> Total saving: 115ms. >> 815 ms by my arithmetic. > no, not true, 115ms. If you bypass creating the initrd/cdrom (700 ms) and loading it (115ms) you save 815ms. >> 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. > Can you explain this? (assuming ahead-of-time image generation) initrd: qemu reads image (host pagecache): N qemu stores image in RAM: N guest copies image to its RAM: N guest faults working set (no XIP): P total: 3N+P initramfs: qemu reads image (host pagecache): N qemu stores image: N guest copies image: N guest extracts image (XIP): N total: 4N cdrom: guest faults working set: P kernel faults working set: P total: 2P difference: 3N-P or 4N-2P depending on model >> Loading a file into memory is plenty fast if you use the standard >> interfaces. -kernel -initrd is a specialized interface. > Why bother with any command line options at all? After all, they keep > changing and causing problems for qemu's users ... Apparently we're > all doing stuff "wrong", in ways that are never explained by the > developers. That's a real problem. It's hard to explain the intent behind something, especially when it's obvious to the author and not so obvious to the user. However making everything do everything under all circumstances has its costs. -kernel and -initrd is a developer's interface intended to make life easier for users that use qemu to develop kernels. It was not intended as a high performance DMA engine. Neither was the firmware _configuration_ interface. That is what virtio and to a lesser extent IDE was written to perform. You'll get much better results from them. -- error compiling committee.c: too many arguments to function