From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIRkS-0007Us-S0 for qemu-devel@nongnu.org; Wed, 20 Mar 2013 18:44:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIRkP-0000k3-WF for qemu-devel@nongnu.org; Wed, 20 Mar 2013 18:44:44 -0400 Received: from mout.gmx.net ([212.227.17.20]:52423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIRkP-0000jp-Kr for qemu-devel@nongnu.org; Wed, 20 Mar 2013 18:44:41 -0400 Received: from mailout-de.gmx.net ([10.1.76.17]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LaZKz-1UzAEK17ZX-00mJ4R for ; Wed, 20 Mar 2013 23:44:39 +0100 Received: by mail-la0-f53.google.com with SMTP id fr10so4015326lab.12 for ; Wed, 20 Mar 2013 15:44:38 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20130320081130.GA5953@stefanha-thinkpad.muc.redhat.com> References: <20130320081130.GA5953@stefanha-thinkpad.muc.redhat.com> Date: Wed, 20 Mar 2013 23:44:37 +0100 Message-ID: From: Thomas Knauth Content-Type: multipart/alternative; boundary=047d7b3441c4875f5104d862f746 Subject: Re: [Qemu-devel] kvm suspend performance List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org --047d7b3441c4875f5104d862f746 Content-Type: text/plain; charset=UTF-8 Hi Stefan, thanks for taking the time to reply. On Wed, Mar 20, 2013 at 9:11 AM, Stefan Hajnoczi wrote: > Which QEMU or libvirt command are you using to suspend the guest to > disk? > virsh save > Why do you say it is CPU-bound? Did you use a tool like vmstat or > simply because it does 30 MB/s instead of the expected 100 MB/s? > I monitor the system with top/vmstat. The kvm process shows a utilization of 16% while the libvirtd process has a utilization of 4-5%. As this is a 4-core machine, a utilization of 25% would indicate that one core is fully utilized. vmstat also gives the number of context switches. I see a background context switch rate of about 60. This increases by 10x, to around 600, during the save. But even 600 cxt switches per second doesn't feel like a bottleneck. So while I agree, that I might have jumped to quick to a conclusion about the CPU-boundedness, there has to be some bottleneck. I would like to know where and why. In my naive view we are just reading memory and writing it to disk. This should progress faster than the 30 MB/s I am seeing right now. Which versions of libvirt and QEMU are you using? I've tried this on a couple of machines with differing versions of Ubuntu (12.04, 10.10, and 10.04). They are all showing the same performance. The machine where I did most of my measurements was the 12.04 machine. The versions are libvirt 0.9.8-2ubuntu17 and qemu-kvm 1.0+noroms-0ubuntu14.7. Kind regards, Thomas. --047d7b3441c4875f5104d862f746 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Stefan,

thanks for taking the = time to reply.

On Wed, Mar 20, 2013 at 9:11 AM, St= efan Hajnoczi <stefanha@gmail.com> wrote:
Which QEMU or libvirt= command are you using to suspend the guest to
disk?

virsh save <name> <= ;file>
=C2=A0
Why do you say it is CPU-bound? =C2=A0Did you use a tool like vmstat or
simply because it does 30 MB/s instead of the expected 100 MB/s?

I monitor the system with top/vmstat. The k= vm process shows a utilization of 16% while the libvirtd process has a util= ization of 4-5%. As this is a 4-core machine, a utilization of 25% would in= dicate that one core is fully utilized. vmstat also gives the number of con= text switches. I see a background context switch rate of about 60. This inc= reases by 10x, to around 600, during the save. But even 600 cxt switches pe= r second doesn't feel like a bottleneck.

So while I agree, that I might have jumped to qui= ck to a conclusion about the CPU-boundedness, there has to be some bottlene= ck. I would like to know where and why. In my naive view we are just readin= g memory and writing it to disk. This should progress faster than the 30 MB= /s I am seeing right now.

Which versions of libvirt and QEMU are you using?

I've tried this on a couple of machines with differing ver= sions of Ubuntu (12.04, 10.10, and 10.04). They are all showing the same pe= rformance. The machine where I did most of my measurements was the 12.04 ma= chine. The versions are libvirt 0.9.8-2ubuntu17 and=C2=A0
qemu-kvm 1.0+noroms-0ubuntu14.7.

Kind regards,
Thomas.
--047d7b3441c4875f5104d862f746--