[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Memory Sharing on HVM guests

On Thu, 2013-08-08 at 9:29 +0100, Ian wrote:
> On Wed, 2013-08-07 at 10:35 -0700, waitxie wrote:
> > Hi, Jui-Hao,
> Did you intend to CC this person?
> > I want to enable memory sharing in xen. I am a newbie in Xen. I searched in
> > internet. There is few information about memory sharing. Your google
> > document can not be access any more.
> >
> > https://docs.google.com/document/pub?id=16cK1JtXhhyNkGHtV_0XTkFnM2nkVxSP144EjozioC6w#h.y4a96-augwr7
> >
> > Can you give me some instruction about enabling memory sharing in xen?
> > Thanks.

Maybe, but since it was in reply to a 2.5 year old email, I'm not sure
anything would be forthcoming.  However, I am also interested in
memory sharing, mainly among Linux domains running off a common COW
core image, so allow me to bring in a few specific questions:

1) Is memory sharing currently working?  I assume it is, given today's
emails from Tim Deegan and Nai Xia, but it seems there may have been
times it was not working.

2) It sounds like for domains running off a common base image, and in
particular Linux, the blkback2-initiated memory sharing is very
effective, and introduces little overhead.  Is the blkback2 memory
sharing currently working (it more definitely appears that this was
disabled at some point)?  How is it invoked (for example, configure
options and/or command line parameters)?

3) Various literature points out zero-page sharing is effective for
Windows, mainly due to scrubbing of pages when they are freed (page
scrubbing by Xen on domain startup also seems to help).  Is there any
code available for identifying zero pages and getting the needed
hypercalls invoked?  This might be a naive page scanner running on
dom0, or more a more OS-aware scanner capable of crawling through the
kernel to pull out free page info.  Has anyone modified the Linux
kernel to zero out freed pages to better exploit zero-page sharing?

4) Memory ballooning seems fairly new for HVMs.  Does it conflict with
memory sharing?  For example, it might only be safe to do blkback2
sharing, but better to allow only ballooning to manage free pages to
avoid confusion over page ownership.  Also, when a page is freed due
to sharing, is it then available for ballooning?  I suppose if all of
an HVM's free pages are being quickly scrubbed and shared, ballooning
could be superfluous for that domain.

5) Is there any code available that runs inside a domain for
identifying zero pages (and possibly identifying and hashing pages
that might be less dynamic) and passing that information to dom0?  For
example, a kernel module or other code with appropriate kernel hooks.

6) Does OS caching need to be disabled, or more likely dialed down to
a small maximum, to ensure free memory gets shared and relinquished?

7) What is the behavior when a page needs to be unshared on an
overcommitted system, and no pages are available?  For example, does
the unlucky domain get hung or destroyed?  Swapping has been
mentioned, with accompanying issues of identifying appropriate pages
to be swapped.  Is there any code implementing swapping?

8) My understanding is that only HVM-, and not PV-based, domUs can
share pages.  However, even if such a feature is not presently
implemented, could dom0 share pages with an HVM domain?

9) Aside from the occasional academic projects, is memory sharing
being actively used anywhere?

10) Any caveats besides the general risk of an overcommited set of
domains requiring more memory than is available?

Sorry; that was a few more questions than I started off with.  They
are in order of importance, if that helps...

Thank you,

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.