From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Network I/O performance Date: Wed, 13 May 2009 10:23:02 +0300 Message-ID: <4A0A7556.4070406@redhat.com> References: <0199E0D51A61344794750DC57738F58E66BBF927A9@GVW1118EXC.americas.hpqcorp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7BIT Cc: "kvm@vger.kernel.org" To: "Fischer, Anna" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:52870 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752157AbZEMHXe convert rfc822-to-8bit (ORCPT ); Wed, 13 May 2009 03:23:34 -0400 In-Reply-To: <0199E0D51A61344794750DC57738F58E66BBF927A9@GVW1118EXC.americas.hpqcorp.net> Sender: kvm-owner@vger.kernel.org List-ID: Fischer, Anna wrote: > I am running KVM with Fedora Core 8 on a 2.6.23 32-bit kernel. I use the tun/tap device model and the Linux bridge kernel module to connect my VM to the network. I have 2 10G Intel 82598 network devices (with the ixgbe driver) attached to my machine and I want to do packet routing in my VM (the VM has two virtual network interfaces configured). Analysing the network performance of the standard QEMU emulated NICs, I get less that 1G of throughput on those 10G links. Surprisingly though, I don't really see CPU utilization being maxed out. This is a dual core machine, and mpstat shows me that both CPUs are about 40% idle. My VM is more or less unresponsive due to the high network processing load while the host OS still seems to be in good shape. How can I best tune this setup to achieve bes t possible performance with KVM? I know there is virtIO and I know there is PCI pass-through, but those models are not an option for me right now. > How many cpus are assigned to the guest? If only one, then 40% idle equates to 100% of a core for the guest and 20% for housekeeping. If this is the case, you could try pinning the vcpu thread ("info cpus" from the monitor) to one core. You should then see 100%/20% cpu load distribution. wrt emulated NIC performance, I'm guessing you're not doing tcp? If you were we might do something with TSO. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.