From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tamas K Lengyel Subject: Re: Xen Memory de-duplication Date: Thu, 21 Apr 2016 09:24:20 -0600 Message-ID: References: <20160417121538.GA10917@citrix.com> <20160417142026.GA27575@citrix.com> <20160420132453.GA4239@citrix.com> <1461177287.6768.4.camel@citrix.com> <1461242825.3240.17.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7926399176799489016==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Maryam Masoudian Cc: Dario Faggioli , Wei Liu , Xen-devel List-Id: xen-devel@lists.xenproject.org --===============7926399176799489016== Content-Type: multipart/alternative; boundary=001a114b1d58e70a9d0531004d8e --001a114b1d58e70a9d0531004d8e Content-Type: text/plain; charset=UTF-8 On Thu, Apr 21, 2016 at 9:13 AM, Maryam Masoudian wrote: > > > On Thu, Apr 21, 2016 at 5:17 PM, Dario Faggioli > wrote: > >> On Wed, 2016-04-20 at 13:01 -0600, Tamas K Lengyel wrote: >> > On Apr 20, 2016 12:34, "Dario Faggioli" >> > wrote: >> > > On Wed, 2016-04-20 at 10:25 -0600, Tamas K Lengyel wrote: >> > > > On Wed, Apr 20, 2016 at 7:24 AM, Wei Liu >> > wrote: >> > > > > Not sure. You can check xl manpage for those commands. >> > > > xl doesn't have any command that shows you a breakdown of sharing >> > > > among VMs, >> > > Well, I didn't find any useful description for xl sharing : it just shows > the shared memory. > What I really want is seeing the deduplicated memory among VMs. > I ran two windows VMs and thought of the kernel memory to be shared among > them if the memory de-duplication is enabled in Xen. > But the result of xl sharing for these VMs was 0 . > Xen won't magically share memory across VMs for you, you need to decide what pages want to share and among what VMs. Take a look at https://github.com/tklengyel/drakvuf/blob/master/src/xen_helper/xen_helper.c#L197 for an example on how you can dedup the entire memory of two identical VMs. And as I already mentioned, you can see memory shared across VMs by using the libxc library, as you can see at https://github.com/tklengyel/drakvuf/blob/master/src/xen_helper/xen_helper.c#L245 . Tamas --001a114b1d58e70a9d0531004d8e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Thu, Apr 21, 2016 at 9:13 AM, Maryam Masoudian <= ;maryammasou= dian@gmail.com> wrote:


On Thu, Apr 21, 2016 at 5:17= PM, Dario Faggioli <dario.faggioli@citrix.com> wrot= e:
On Wed, 2016-= 04-20 at 13:01 -0600, Tamas K Lengyel wrote:
> On Apr 20, 2016 12:34, "Dario Faggioli" <dario.faggioli@citrix.com>
> wrote:
> > On Wed, 2016-04-20 at 10:25 -0600, Tamas K Lengyel wrote:
> > > On Wed, Apr 20, 2016 at 7:24 AM, Wei Liu <
wei.liu2@citrix.com>
> wrote:
> > > > Not sure. You can check xl manpage for tho= se commands.
> > > xl doesn't have any command that shows you a breakdown o= f sharing
> > > among VMs,

=
Well, I didn't find any useful description for xl sharing : it jus= t shows the shared memory.
What I really want is seeing the dedupl= icated memory among VMs.
I ran two windows VMs and thought of the = kernel memory to be shared among them if the memory de-duplication is enabl= ed in Xen.
But the result of xl sharing for these VMs was 0 .
<= /div>

Xen won't magic= ally share memory across VMs for you, you need to decide what pages want to= share and among what VMs. Take a look at https://github= .com/tklengyel/drakvuf/blob/master/src/xen_helper/xen_helper.c#L197 for= an example on how you can dedup the entire memory of two identical VMs. An= d as I already mentioned, you can see memory shared across VMs by using the= libxc library, as you can see at https://github.com/tkl= engyel/drakvuf/blob/master/src/xen_helper/xen_helper.c#L245.

Tamas

--001a114b1d58e70a9d0531004d8e-- --===============7926399176799489016== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============7926399176799489016==--