WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Xen Memory De-duplication

To: Xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Xen Memory De-duplication
From: Aditya Gadre <adivb2003@xxxxxxxxx>
Date: Sat, 9 Oct 2010 23:26:23 +0530
Cc:
Delivery-date: Sat, 09 Oct 2010 10:57:21 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=1rMnBxfOtIkJW65h6hYfVAWBB/Hg90ihiiQM56c90mE=; b=pBPzIGx+XvXHO4B1vLGCl+77xkxnrHcIbyIU2EzNhiIUI5TypccAFfErC1GgN5GsRV 9f2hdRNiMdux7XgqJC6L6J1b1m/C5u7ZRhdbCp/wB/xCP46vzzVlPHyBqG2eH2QAOQCt 7bTHUuOLCk8CHCuZr6i7zYIp4UTy+TNdGOao0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=IIETmbW0xWTCOiRZsQCyDTU44S6X3kGonDopiJ0Whyj7VzcLA3yH2pJNZ2dGaCybqT w2ucYjdUpdFy2zg3yvUjN0qfqN1LQis/55C5IsYpb/503b7aW/lSfglZWLL4awUIPJGd demTn/zlGHP6rCzxj9ZEsNNXOZCOGU0v9G/so=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Aim is to implement Xen Memory Deduplication with minimum overhead.

Our approach to de-duplication is as follows

In most cases, Domain-U uses a small set of well-known operating systems such as Linux, FreeBSD and Microsoft Windows. In such environment many domains share read-only filesystems that contain operating system and frequently usedprogram files and libraries.Each domain has their own writable filesystems for storing data and temporary files. In this configuration, multiple pages scattered in different domains mostly happen to contain same disk block. So, in our approach to perform deduplication we intend to add a data structure in dom 0 which store disk block number and the machine frame number(MFN) when a read request for the read only code(and data) is made. Now when another domain U places the request for the block of code and Dom 0 recieves a request for I/O (DMA), it will first check into the data structure for the entry for the block. If it finds the block it will return the MFN of the already read page and map it to the requesting domain's PFN resulting in zero I/O processing time of blocks which are already read. This in turn results in de-duplication of the read only pages accessed by multiple domains without any overhead of hashing the page.

Test case scenario:

Consider a Dom0 linux kernel using a filesystem with deduplication enabled. Then we install a DomU kernel with the virtual disk as a image file on the disk(.img). Then we make multiple copies of the image to deploy multiple DomUs running same kernel. Now, as deduplication is enabled in the file system initially all the blocks of the domains will be pointing to the same disk blocks. Now when the kernel's are booted, they all will consume memory only once for the programs(code segment) loaded in the memory. Now as these OSs start to write to their own virtual filesystems the blocks of the image will be COW'ed by the filesystem resulting in different block number.
Is such a approach implemented?  We intend to implement this as a project. What are the suspected challanges?


Regards,
Aditya Gadre
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel