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

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



On Aug 9, 2013, at 12:34 PM, Eric Shelton <eshelton@xxxxxxxxx> wrote:

> Thank you for taking the time; it answered a number of lingering questions.
> 
> If anyone is successfully using blkback2 with memshr, I would
> appreciate hearing about it.
> 
>>> 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?
>> 
>> OS guest side caching is irrelevant. OS dom0 caching is disabled in most 
>> cases
>> when using blkback or blktap. I am not sure what you are talking about here
>> though: you are linking caching to freeing memory to sharing. Caching is a 
>> good
>> thing and that's precisely what tools/memshr, the page cache on the OS guest 
>> side,
>> aims to share.
> 
> Maybe an example will avoid abusing some of those terms:
> Given a standard Linux system with swap disabled, a set of processes
> will have certain minimum RAM requirement for instructions and data (I
> have seen the term "working set" applied) - for example, more than 1GB
> of RAM will be needed to run a large full-chip simulation.
> 
> Generally there is more than that minimum amount of RAM.  Over time,
> except with a small working set of programs and data, all or most the
> excess RAM tends to be put to use in the page cache (rather than being
> entirely unused), but is readily available to be directly assigned to
> processes.  I assume pages in the page cache would contain useful,
> non-zero data, such as recent block I/O data.  This appears to exclude
> zero-page sharing, and may not be all that successful for same-page
> sharing.
> 
> In general, I probably would find it more useful if (most of) the
> excess pages were available for other domains via sharing.  For
> example, maybe it would be better for the excess pages to be part of
> the page cache for a storage domain common to the other domains,
> allowing it to make more holistic caching decisions and hopefully
> already have the more active blocks in its cache - perhaps affording
> some TMEM-like benefits to non-TMEM-capable OSes (which is pretty much
> anything other than Linux?).

That whole description really seems like TMEM.
> 
> The question was mainly: if I lazily/conservatively overallocate
> excess memory to domains, and hope page sharing will automagically
> minimize their footprint, will the use and dirtying of excess pages by
> the page cache cripple their sharing?  If so, I am curious if would
> make sense to cap the page cache, if possible, to say 100MB.  I
> suspect total disabling of the page cache is impossible or destroys
> performance.
You just can't do that in Linux. Psge cache is so intimately baked in, there is 
no notion of "turning it off"

Andres
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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