From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42999 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsH9J-0003iP-SV for qemu-devel@nongnu.org; Wed, 23 Feb 2011 11:01:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsH9I-0007n1-U3 for qemu-devel@nongnu.org; Wed, 23 Feb 2011 11:01:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsH9I-0007mh-KA for qemu-devel@nongnu.org; Wed, 23 Feb 2011 11:01:08 -0500 Message-ID: <4D652ED4.6040605@redhat.com> Date: Wed, 23 Feb 2011 17:59:16 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: Strategic decision: COW format References: <4D5BC467.4070804@redhat.com> <4D5E4271.80501@redhat.com> <4D5E8031.5020402@codemonkey.ws> <4D637A20.9020307@redhat.com> <4D650F10.3060900@redhat.com> <4D651858.9040106@codemonkey.ws> <4D651BD2.3040500@redhat.com> <4D6527F4.2010101@codemonkey.ws> <4D652984.90401@redhat.com> <4D652C26.2010304@codemonkey.ws> In-Reply-To: <4D652C26.2010304@codemonkey.ws> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , Chunqiang Tang , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi On 02/23/2011 05:47 PM, Anthony Liguori wrote: >> I don't see how that works, since the memory image is duplicated for >> each snapshot. So thousands of snapshots = terabytes of storage, and >> hours of creating the snapshots. > > > Fabrice wanted to use CoW to as a mechanism to deduplicate the memory > contents with the on-disk state specifically to address this problem. > For the longest time, there was a comment in the savevm code along > these lines. It might still be there. > > I think the lack of on-disk hashes was a critical missing bit to make > this feature really work well. So you have to use dirty logging to see which pages changed, otherwise you have to dedup all of them. Still I think migration/kemari is a better fit for this. >> Can you elaborate? What's the problem with a linear array of >> snapshots (say up to 10,000 snapshots)? > > Lots of things. The array will start to consume quite a bit of > contiguous space as it gets larger which means it needs to be relocated. If you double the space each time, it amortizes out. A snapshot seems to be around 40 bytes. So 10K snapshots = 400KB, hardly a huge amount (sans pointed-to data which doesn't need to move). > Deleting a snapshot is a far more expensive operation than it needs to > be. > Move the last snapshot into the deleted entry? -- error compiling committee.c: too many arguments to function