Skip to contentSkip to conversation

Xen 4 - Page Sharing HowTo?

Xen-users Pasi Kärkkäinen 3 participants 4 messages Apr 9, 2010 5 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 34 lines · Andrew Lyon
Quoted 33 lines · Andrew Lyon
Quoted 16 lines · Andrew Lyon
Quoted 6 lines · Andrew Lyon
Quoted 4 lines · Nick Couchman

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

Quoted 8 lines

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

Quoted 7 lines

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");

Quoted 9 lines
Quoted 4 lines

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

#6 lore raw
Quoted 6 lines · Pasi Kärkkäinen
Quoted 6 lines
Quoted 6 lines

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.

Quoted 3 lines
Quoted 3 lines

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

Quoted 1 line

Hopefully someone from xen-devel can help us with this feature..

#7 lore raw
Quoted 16 lines · Keir Fraser
Quoted 6 lines · Pasi Kärkkäinen
Quoted 6 lines
Quoted 6 lines

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.

Quoted 3 lines
Quoted 3 lines

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?

Quoted 6 lines

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

Hmm, 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

#8 lore raw
Quoted 9 lines · Andrew Lyon

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:

Quoted 6 lines

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