From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX9HA-0007Hd-Oz for qemu-devel@nongnu.org; Wed, 23 May 2012 06:58:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SX9H0-0002lA-Ql for qemu-devel@nongnu.org; Wed, 23 May 2012 06:58:44 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:33785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX9H0-0002kD-HO for qemu-devel@nongnu.org; Wed, 23 May 2012 06:58:34 -0400 Received: by obbwd20 with SMTP id wd20so13620586obb.4 for ; Wed, 23 May 2012 03:58:31 -0700 (PDT) MIME-Version: 1.0 Sender: nicolas.prochazka@gmail.com In-Reply-To: References: Date: Wed, 23 May 2012 12:58:31 +0200 Message-ID: From: nicolas prochazka Content-Type: multipart/alternative; boundary=bcaec54c4df60f538404c0b2044a Subject: Re: [Qemu-devel] The image size of instance VM keeps growing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?Q2hhcmxlcy5Uc2FpLeiUoea4hea1ty3noJTnqbbnmbzlsZXpg6g=?= Cc: Stefan Hajnoczi , =?UTF-8?B?Sm9uYWguV3Ut5ZCz5ZCb5YuJLeeglOeptueZvOWxlemDqA==?= , "qemu-devel@nongnu.org" --bcaec54c4df60f538404c0b2044a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable hello, I think it's not qemu relative but windows relative Windows do a lot of things as auto defrag disk ( without monitoring) when idle time read this document: http://www.vmware.com/files/pdf/VMware-View-OptimizationGuideWindows7-EN.pd= fand optimize your guest. Regards, Nicolas P. 2012/5/23 Charles.Tsai-=E8=94=A1=E6=B8=85=E6=B5=B7-=E7=A0=94=E7=A9=B6=E7=99= =BC=E5=B1=95=E9=83=A8 > Stefan, > > Here are what we tested and found for this issue. > > 1. We checked the integrity of the qcow2 image by running > =E2=80=9Cqemu-img check=E2=80=9D and it looked good. > 2. We monitored the I/O activities of VM using > =E2=80=9CProcess monitor=E2=80=9D, =E2=80=9CProcess explorer=E2=80= =9D and could not find a process > running an aggressive I/O activity in the background. > > In the guest OS, the following configurations are turn off to cut > down I/O activities. > 1. Disable the NIC. > 2. Disable Windows automatic update. > 3. Disable the page file of the virtual memory. > > After the VM ran for overnight, the image size for the running VM > grew up to 3G bytes. > > > This issue is very easy to be duplicated. Here are the steps. > > 1. Create a qcow2 image of 64-bit Windows 7 VM from the CD. > 2. Launch the VM > 3. Turn off the VM configurations stated above. > 4. Let the VM run. > 5. Watch the growth of the VM image size. The longer the VM > runs, the bigger the size of the VM is. > > During the run-time, you can run =E2=80=9Cprocess monitor=E2=80=9D= to watch guest > OS=E2=80=99s I/O activities. You can see File I/O, registry I/O from the > system during the run-time in this test case. But the growth rate of the > image size seems to be greater than default system I/O. > > > -----Original Message----- > From: Stefan Hajnoczi [mailto:stefanha@gmail.com] > Sent: Monday, May 21, 2012 9:24 PM > To: Charles.Tsai-=E8=94=A1=E6=B8=85=E6=B5=B7-=E7=A0=94=E7=A9=B6=E7=99=BC= =E5=B1=95=E9=83=A8 > Cc: qemu-devel@nongnu.org; Jonah.Wu-=E5=90=B3=E5=90=9B=E5=8B=89-=E7=A0=94= =E7=A9=B6=E7=99=BC=E5=B1=95=E9=83=A8 > Subject: Re: [Qemu-devel] The image size of instance VM keeps growing > > On Mon, May 21, 2012 at 10:08 AM, Charles.Tsai-=E8=94=A1=E6=B8=85=E6=B5= =B7-=E7=A0=94=E7=A9=B6=E7=99=BC=E5=B1=95=E9=83=A8 > wrote: > > We can run a tool to see if there is any active I/O or not. Does the > image size shrink back if an I/O activity stops? > > What we found here is that the image size kept growing. If this problem > persists, it could eat up the entire disk space. > > It's possible for an image to grow larger than its backing file due to th= e > layout and metadata of qcow2 (or any image file format). But this overhe= ad > should be fixed to maximum 1 MB, maybe (assuming you are not using qcow2 > snapshots where the file can grow arbitrarily). > > If the image file is growing endlessly then there is a problem :). > The starting point is figuring out which I/O request causes this to happe= n > so it can be reproduced and debugged. Can you isolate the problem to a f= ew > steps that can be reproduced? > > Stefan > --bcaec54c4df60f538404c0b2044a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable hello,=C2=A0
I think it's not qemu relative but windows relative
Windows do a lot of things as auto defrag disk ( without monitoring= ) when idle time

Regards,=C2=A0
Nicolas P.

2012/5/23 Charles.Tsai-=E8=94=A1=E6=B8=85=E6=B5=B7-=E7=A0= =94=E7=A9=B6=E7=99=BC=E5=B1=95=E9=83=A8 <charles.tsai@cloudena.com= >
Stefan,

=C2=A0 =C2=A0 =C2=A0 =C2=A0Here are what we tested and found =C2=A0for thi= s issue.

=C2=A0 =C2=A0 =C2=A0 =C2=A01. =C2=A0 =C2=A0 =C2=A0We checked the integrity= of the qcow2 image by running =E2=80=9Cqemu-img check=E2=80=9D and it look= ed good.
=C2=A0 =C2=A0 =C2=A0 =C2=A02. =C2=A0 =C2=A0 =C2=A0We monitored the I/O act= ivities of VM using
=C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=80=9CProcess monitor=E2=80=9D, =E2=80=9CPro= cess explorer=E2=80=9D and could not find a process running an aggressive I= /O activity in the background.

=C2=A0 =C2=A0 =C2=A0 =C2=A0In the guest OS, the following configurations a= re turn off to cut down I/O activities.
=C2=A0 =C2=A0 =C2=A0 =C2=A01. =C2=A0 =C2=A0 =C2=A0Disable the NIC.
=C2=A0 =C2=A0 =C2=A0 =C2=A02. =C2=A0 =C2=A0 =C2=A0Disable Windows automati= c update.
=C2=A0 =C2=A0 =C2=A0 =C2=A03. =C2=A0 =C2=A0 =C2=A0Disable the page file of= the virtual memory.

=C2=A0 =C2=A0 =C2=A0 =C2=A0After the VM ran for overnight, the image size = for the running VM grew up to 3G bytes.


=C2=A0 =C2=A0 =C2=A0 =C2=A0This issue is very easy to be duplicated. Here = are the steps.

=C2=A0 =C2=A0 =C2=A0 =C2=A01. =C2=A0 =C2=A0 =C2=A0Create a qcow2 image of = 64-bit Windows 7 VM from the CD.
=C2=A0 =C2=A0 =C2=A0 =C2=A02. =C2=A0 =C2=A0 =C2=A0Launch the VM
=C2=A0 =C2=A0 =C2=A0 =C2=A03. =C2=A0 =C2=A0 =C2=A0Turn off the VM configur= ations stated above.
=C2=A0 =C2=A0 =C2=A0 =C2=A04. =C2=A0 =C2=A0 =C2=A0Let the VM run.
=C2=A0 =C2=A0 =C2=A0 =C2=A05. =C2=A0 =C2=A0 =C2=A0Watch the growth of the = VM image size. The longer the VM runs, the bigger the size of the VM is.
=C2=A0 =C2=A0 =C2=A0 =C2=A0During the run-time, you can run =E2=80=9Cproce= ss monitor=E2=80=9D to watch guest OS=E2=80=99s I/O activities. You can see= File I/O, registry I/O from the =C2=A0 =C2=A0 =C2=A0system during the run-= time in this test case. But the growth rate of the image size seems to be g= reater than default system I/O.


-----Original Message-----
From: Stefan Hajnoczi [mailto:stefanh= a@gmail.com]
Sent: Monday, May 21, 2012 9:24 PM
To: Charles.Tsai-=E8=94=A1=E6=B8=85=E6=B5=B7-=E7=A0=94=E7=A9=B6=E7=99=BC=E5= =B1=95=E9=83=A8
Cc: qemu-devel@nongnu.org; Jon= ah.Wu-=E5=90=B3=E5=90=9B=E5=8B=89-=E7=A0=94=E7=A9=B6=E7=99=BC=E5=B1=95=E9= =83=A8
Subject: Re: [Qemu-devel] The image size of instance VM keeps growing


--bcaec54c4df60f538404c0b2044a--