One of the features listed as having been added to Xen 4 is page sharing for HVM domUs. I was wondering if 1) this is automatic, or something that must be enabled, and 2) if it must be enabled, how do you go about enabling it? Thanks! -Nick -------- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Apr 8, 2010 at 11:01 PM, Nick Couchman <Nick.Couchman@seakr.com> wrote:> One of the features listed as having been added to Xen 4 is page sharing for HVM domUs. I was wondering if 1) this is automatic, or something that must be enabled, and 2) if it must be enabled, how do you go about enabling it? > > Thanks! > -NickSee http://lists.xensource.com/archives/html/xen-changelog/2009-12/msg00192.html The setting you need to add is memory_sharing I think it may require hap but I am not sure yet.. just about to test it. Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Apr 9, 2010 at 1:18 PM, Andrew Lyon <andrew.lyon@gmail.com> wrote:> On Thu, Apr 8, 2010 at 11:01 PM, Nick Couchman <Nick.Couchman@seakr.com> wrote: >> One of the features listed as having been added to Xen 4 is page sharing for HVM domUs. I was wondering if 1) this is automatic, or something that must be enabled, and 2) if it must be enabled, how do you go about enabling it? >> >> Thanks! >> -Nick > > See http://lists.xensource.com/archives/html/xen-changelog/2009-12/msg00192.html > > The setting you need to add is memory_sharing > > I think it may require hap but I am not sure yet.. just about to test it. > > Andy >I added memory_sharing=1 to two hvm guests and started them up, xm log shows that the setting was applied but there seems to be no change in the reported memory usage, is there any way to monitor shared memory performance? Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Apr 9, 2010 at 1:26 PM, Andrew Lyon <andrew.lyon@gmail.com> wrote:> On Fri, Apr 9, 2010 at 1:18 PM, Andrew Lyon <andrew.lyon@gmail.com> wrote: >> On Thu, Apr 8, 2010 at 11:01 PM, Nick Couchman <Nick.Couchman@seakr.com> wrote: >>> One of the features listed as having been added to Xen 4 is page sharing for HVM domUs. I was wondering if 1) this is automatic, or something that must be enabled, and 2) if it must be enabled, how do you go about enabling it? >>> >>> Thanks! >>> -Nick >> >> See http://lists.xensource.com/archives/html/xen-changelog/2009-12/msg00192.html >> >> The setting you need to add is memory_sharing >> >> I think it may require hap but I am not sure yet.. just about to test it. >> >> Andy >> > > I added memory_sharing=1 to two hvm guests and started them up, xm log > shows that the setting was applied but there seems to be no change in > the reported memory usage, is there any way to monitor shared memory > performance? > > Andy >I don''t think memory_sharing=1 works at all, the very first thing that should happen when it is enabled is a printk: void mem_sharing_init(void) { printk("Initing memory sharing.\n"); But I''ve not seen that at all on my 4.x system. Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Apr 9, 2010 at 1:36 PM, Andrew Lyon <andrew.lyon@gmail.com> wrote:> On Fri, Apr 9, 2010 at 1:26 PM, Andrew Lyon <andrew.lyon@gmail.com> wrote: >> On Fri, Apr 9, 2010 at 1:18 PM, Andrew Lyon <andrew.lyon@gmail.com> wrote: >>> On Thu, Apr 8, 2010 at 11:01 PM, Nick Couchman <Nick.Couchman@seakr.com> wrote: >>>> One of the features listed as having been added to Xen 4 is page sharing for HVM domUs. I was wondering if 1) this is automatic, or something that must be enabled, and 2) if it must be enabled, how do you go about enabling it? >>>> >>>> Thanks! >>>> -Nick >>> >>> See http://lists.xensource.com/archives/html/xen-changelog/2009-12/msg00192.html >>> >>> The setting you need to add is memory_sharing >>> >>> I think it may require hap but I am not sure yet.. just about to test it. >>> >>> Andy >>> >> >> I added memory_sharing=1 to two hvm guests and started them up, xm log >> shows that the setting was applied but there seems to be no change in >> the reported memory usage, is there any way to monitor shared memory >> performance? >> >> Andy >> > > I don''t think memory_sharing=1 works at all, the very first thing that > should happen when it is enabled is a printk: > > void mem_sharing_init(void) > { > printk("Initing memory sharing.\n"); > > > But I''ve not seen that at all on my 4.x system. > > Andy >Also the 4.0 release announcement mentioned page to disk, but again I can find no reference to that... has anybody tested these new features? Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Pasi Kärkkäinen
2010-Apr-09 14:09 UTC
[Xen-devel] Re: [Xen-users] Xen 4 - Page Sharing HowTo?
On Fri, Apr 09, 2010 at 01:38:12PM +0100, Andrew Lyon wrote:> On Fri, Apr 9, 2010 at 1:36 PM, Andrew Lyon <andrew.lyon@gmail.com> wrote: > > On Fri, Apr 9, 2010 at 1:26 PM, Andrew Lyon <andrew.lyon@gmail.com> wrote: > >> On Fri, Apr 9, 2010 at 1:18 PM, Andrew Lyon <andrew.lyon@gmail.com> wrote: > >>> On Thu, Apr 8, 2010 at 11:01 PM, Nick Couchman <Nick.Couchman@seakr.com> wrote: > >>>> One of the features listed as having been added to Xen 4 is page sharing for HVM domUs. I was wondering if 1) this is automatic, or something that must be enabled, and 2) if it must be enabled, how do you go about enabling it? > >>>> > >>>> Thanks! > >>>> -Nick > >>> > >>> See http://lists.xensource.com/archives/html/xen-changelog/2009-12/msg00192.html > >>> > >>> The setting you need to add is memory_sharing > >>> > >>> I think it may require hap but I am not sure yet.. just about to test it. > >>> > >>> Andy > >>> > >> > >> I added memory_sharing=1 to two hvm guests and started them up, xm log > >> shows that the setting was applied but there seems to be no change in > >> the reported memory usage, is there any way to monitor shared memory > >> performance? > >> > >> Andy > >> > > > > I don''t think memory_sharing=1 works at all, the very first thing that > > should happen when it is enabled is a printk: > > > > void mem_sharing_init(void) > > { > > printk("Initing memory sharing.\n"); > > > > > > But I''ve not seen that at all on my 4.x system. > > > > Andy > > > > Also the 4.0 release announcement mentioned page to disk, but again I > can find no reference to that... has anybody tested these new > features? >Hopefully someone from xen-devel can help us with this feature.. -- Pasi _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2010-Apr-09 14:36 UTC
Re: [Xen-devel] Re: [Xen-users] Xen 4 - Page Sharing HowTo?
On 09/04/2010 15:09, "Pasi Kärkkäinen" <pasik@iki.fi> wrote:>>> void mem_sharing_init(void) >>> { >>> printk("Initing memory sharing.\n"); >>> >>> >>> But I''ve not seen that at all on my 4.x system.Should be unconditionally printed during Xen boot. Not when memory sharing is first used.>> Also the 4.0 release announcement mentioned page to disk, but again I >> can find no reference to that... has anybody tested these new >> features?I think you run the xenpaging daemon manually on each domain you want to have paged to disc. The daemon is probably under /usr/sbin/xenpaging. It takes two arguments: domain-id and memory allocated to the domain, in 4kB pages (e.g., memory in MB, multiplied by 256). -- Keir> Hopefully someone from xen-devel can help us with this feature.._______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Andrew Lyon
2010-Apr-09 14:59 UTC
Re: [Xen-devel] Re: [Xen-users] Xen 4 - Page Sharing HowTo?
On Fri, Apr 9, 2010 at 3:36 PM, Keir Fraser <keir.fraser@eu.citrix.com> wrote:> On 09/04/2010 15:09, "Pasi Kärkkäinen" <pasik@iki.fi> wrote: > >>>> void mem_sharing_init(void) >>>> { >>>> printk("Initing memory sharing.\n"); >>>> >>>> >>>> But I''ve not seen that at all on my 4.x system. > > Should be unconditionally printed during Xen boot. Not when memory sharing > is first used. > >>> Also the 4.0 release announcement mentioned page to disk, but again I >>> can find no reference to that... has anybody tested these new >>> features? > > I think you run the xenpaging daemon manually on each domain you want to > have paged to disc. The daemon is probably under /usr/sbin/xenpaging. It > takes two arguments: domain-id and memory allocated to the domain, in 4kB > pages (e.g., memory in MB, multiplied by 256). > > -- KeirHmm, I tried that but as soon as I run xenpaging it outputs lots of errors: ERROR Internal error: Error mapping page ERROR Internal error: Error mapping page ERROR Internal error: Error mapping page ERROR Internal error: Error mapping page ERROR Internal error: Error flushing ioemu cache ERROR Internal error: Error mapping page ERROR Internal error: Error mapping page ERROR Internal error: Error mapping page ERROR Internal error: Error mapping page ERROR Internal error: Error mapping page ERROR Internal error: Error mapping page ERROR Internal error: Error mapping page Perhaps there are hardware requirements for page to disk? Any idea what I need to do to have memory sharing support compiled into blktap2? The combination of memory sharing + blktap2 results in this error when I try to start a vm: using config file "./jos-ts3.cfg". Error: Failed to create device. stdout: stderr: MEMSHR support not compiled in. Check that target "/mnt/tb1_store/Xen_VMs/WinXP/WinXP.hda" exists and that blktap2 driver installed in dom0. Andy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2010-Apr-09 15:22 UTC
Re: [Xen-devel] Re: [Xen-users] Xen 4 - Page Sharing HowTo?
On 09/04/2010 15:59, "Andrew Lyon" <andrew.lyon@gmail.com> wrote:> ERROR Internal error: Error flushing ioemu cache > ERROR Internal error: Error mapping page > > Perhaps there are hardware requirements for page to disk? > > Any idea what I need to do to have memory sharing support compiled > into blktap2? The combination of memory sharing + blktap2 results in > this error when I try to start a vm: > > using config file "./jos-ts3.cfg". > Error: Failed to create device. > stdout: > stderr: MEMSHR support not compiled in. > Check that target "/mnt/tb1_store/Xen_VMs/WinXP/WinXP.hda" exists and > that blktap2 driver installed in dom0.Tbh I think these features are barely even tech preview in the 4.0.0 release. They got little testing and the devs who implemented them are also off doing other things at least part time. I hope they will get some more love before 4.0.1. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Nick Couchman
2010-Apr-09 16:28 UTC
Re: [Xen-devel] Re: [Xen-users] Xen 4 - Page Sharing HowTo?
> > Should be unconditionally printed during Xen boot. Not when memory sharing > is first used.Yep, I see it! What''s the best way to tell how much memory or how many pages are being shared? Will Xen''s memory status (e.g. with xentop or xm list) show lower memory usage per machine? Or is there somewhere else I need to dig to find how much memory is shared?> >>> Also the 4.0 release announcement mentioned page to disk, but again I >>> can find no reference to that... has anybody tested these new >>> features? > > I think you run the xenpaging daemon manually on each domain you want to > have paged to disc. The daemon is probably under /usr/sbin/xenpaging. It > takes two arguments: domain-id and memory allocated to the domain, in 4kB > pages (e.g., memory in MB, multiplied by 256). > > -- Keir >I think the RPMs I have are built without this - I cannot seem to locate it. I''ll have to see if I can compile it myself. Thanks! -Nick -------- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Keir Fraser
2010-Apr-09 16:40 UTC
Re: [Xen-devel] Re: [Xen-users] Xen 4 - Page Sharing HowTo?
On 09/04/2010 17:28, "Nick Couchman" <Nick.Couchman@seakr.com> wrote:>> Should be unconditionally printed during Xen boot. Not when memory sharing >> is first used. > > Yep, I see it! What''s the best way to tell how much memory or how many pages > are being shared? Will Xen''s memory status (e.g. with xentop or xm list) show > lower memory usage per machine? Or is there somewhere else I need to dig to > find how much memory is shared?Sharing opportunities should result in memory being freed back to Xen. So ''xm info'', or whatever else you use for monitoring Xen''s free memory, should work. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Nick Couchman
2010-Apr-09 20:45 UTC
Re: [Xen-devel] Re: [Xen-users] Xen 4 - Page Sharing HowTo?
> > Sharing opportunities should result in memory being freed back to Xen. So > ''xm info'', or whatever else you use for monitoring Xen''s free memory, should > work. > > -- KeirHmmm...two XP HVM domUs running, and a total of 7 M freed to Xen. Kind of hard to tell if memory sharing is working, or if this is normal rounding behavior... -Nick -------- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2010-Apr-10 06:27 UTC
Re: [Xen-devel] Re: [Xen-users] Xen 4 - Page Sharing HowTo?
On 09/04/2010 21:45, "Nick Couchman" <Nick.Couchman@seakr.com> wrote:>> Sharing opportunities should result in memory being freed back to Xen. So >> ''xm info'', or whatever else you use for monitoring Xen''s free memory, should >> work. >> >> -- Keir > > Hmmm...two XP HVM domUs running, and a total of 7 M freed to Xen. Kind of > hard to tell if memory sharing is working, or if this is normal rounding > behavior...The two images have to be using a common disc image (or a delta of a common disc image) exported by a memshr-aware block-device backend: blktap1 or blktap2. In fact, would have to be the former, since blktap2 has memshr support disabled as it was crashing. The sharing opportunities aren''t discovered by page scanning, as in some other schemes. -- Keir _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nick Couchman
2010-Apr-10 15:57 UTC
Re: [Xen-devel] Re: [Xen-users] Xen 4 - Page Sharing HowTo?
> The two images have to be using a common disc image (or a delta of a common > disc image) exported by a memshr-aware block-device backend: blktap1 or > blktap2. In fact, would have to be the former, since blktap2 has memshr > support disabled as it was crashing. The sharing opportunities aren''t > discovered by page scanning, as in some other schemes.Ah, this I did not know, though I wondered if it were the case based on the fact that the original post that Andrew pointed me toward included patches for the blktap drivers. So, is there any way to make this work using a physical device (like a logical volume) as the disk? -Nick -------- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users