* Memory oversubscription
@ 2004-09-14 22:39 Todd Jones
2004-09-14 22:55 ` Keir Fraser
2004-09-23 21:06 ` Rik van Riel
0 siblings, 2 replies; 5+ messages in thread
From: Todd Jones @ 2004-09-14 22:39 UTC (permalink / raw)
To: xen-devel
Hi. First of all, thanks for Xen. It's terrific!
I'm interested in doing memory oversubscription and am wondering if Xen
can do this (now or in the future).
For example, on a machine with 100MB available physical memory, can I:
1. Create a domain with a 90MB allocation
2. Inflate a balloon in that domain and return say 40MB back to Xen
I know there are mechanisms for doing 1 and 2...
3. Allocate a second domain with an allocation of 50MB?
Thanks,
--Todd
-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Memory oversubscription
2004-09-14 22:39 Memory oversubscription Todd Jones
@ 2004-09-14 22:55 ` Keir Fraser
2004-09-23 21:06 ` Rik van Riel
1 sibling, 0 replies; 5+ messages in thread
From: Keir Fraser @ 2004-09-14 22:55 UTC (permalink / raw)
To: Todd Jones; +Cc: xen-devel
Yes, that will work. The total current memory reservation across all
domains must always be smaller than the amount of RAM. However, the
upper limit that Xen will allow the reservations to increase to can
sum to larger than available RAM.
However, beware that Linux won't be happy if it fails to increase its
reservation when it believes it ought to be able to -- the net driver
in particular will barf spectacularly. Fixing this is really a small
matter of cleaning up the code that I ought to get round to.
Within Xen, nothing smart happens when you run low on RAM (e.g.,
failing one guest's memory request in favour of other more important
guests). I guess this could be smarter!
-- Keir
> Hi. First of all, thanks for Xen. It's terrific!
>
> I'm interested in doing memory oversubscription and am wondering if Xen
> can do this (now or in the future).
>
> For example, on a machine with 100MB available physical memory, can I:
> 1. Create a domain with a 90MB allocation
> 2. Inflate a balloon in that domain and return say 40MB back to Xen
>
> I know there are mechanisms for doing 1 and 2...
>
> 3. Allocate a second domain with an allocation of 50MB?
>
> Thanks,
>
> --Todd
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
> Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
> Camcorder. More prizes in the weekly Lunch Hour Challenge.
> Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel
-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Memory oversubscription
2004-09-14 22:39 Memory oversubscription Todd Jones
2004-09-14 22:55 ` Keir Fraser
@ 2004-09-23 21:06 ` Rik van Riel
2004-09-23 21:50 ` Ian Pratt
1 sibling, 1 reply; 5+ messages in thread
From: Rik van Riel @ 2004-09-23 21:06 UTC (permalink / raw)
To: Todd Jones; +Cc: xen-devel
On Tue, 14 Sep 2004, Todd Jones wrote:
> 2. Inflate a balloon in that domain and return say 40MB back to Xen
OK, how does this work ?
I've searched through the documentation and it doesn't
seem to be an xm option either ... ;)
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Memory oversubscription
2004-09-23 21:06 ` Rik van Riel
@ 2004-09-23 21:50 ` Ian Pratt
2004-09-23 22:08 ` Rik van Riel
0 siblings, 1 reply; 5+ messages in thread
From: Ian Pratt @ 2004-09-23 21:50 UTC (permalink / raw)
To: Rik van Riel; +Cc: Todd Jones, xen-devel, Ian.Pratt
> On Tue, 14 Sep 2004, Todd Jones wrote:
>
> > 2. Inflate a balloon in that domain and return say 40MB back to Xen
>
> OK, how does this work ?
>
> I've searched through the documentation and it doesn't
> seem to be an xm option either ... ;)
For the moment, you can only control the amount of memory that a
domain is using from within the domain itself using
/proc/xen/memory_target
Whatever size (in bytes) you enter in this field, the domain will
try to adjust itself to this size. If it's currently too big, it
will try to grab free pages and hand them back to Xen. If it
needs to grow, it will request new pages from Xen.
We need to add a new xend control message that allow dom0 to
directly control what the memory target for another domain should
be. We then need to add a new xm command to enable it to be
controlled.
The maximum size the domain can grow to is bounded by the minimum
of that set by "xm maxmem" and the size of the mem_map array that
the domain has. There's a new "maxmem=" linux kernel command line
option to enable a domain to be started with a bigger mem_map
array than is required for its initial memory allocation. Once
hot-plug memory is standard we'll be able to do away with the
maxmem option.
Hmm. Thinking about it, I'm not sure whether either memory_target
or maxmem have been ported from 2.4 to 2.6. Any volunteers?
[This would also be a good opportunity to do a slight cleanup to
the balloon driver and thread the 'released' pages in a linked
list through the mem_map array rather than scanning the P2M table.]
Ian
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Memory oversubscription
2004-09-23 21:50 ` Ian Pratt
@ 2004-09-23 22:08 ` Rik van Riel
0 siblings, 0 replies; 5+ messages in thread
From: Rik van Riel @ 2004-09-23 22:08 UTC (permalink / raw)
To: Ian Pratt; +Cc: Todd Jones, xen-devel
On Thu, 23 Sep 2004, Ian Pratt wrote:
> Hmm. Thinking about it, I'm not sure whether either memory_target
> or maxmem have been ported from 2.4 to 2.6. Any volunteers?
Well that would explain ;)
I wouldn't mind taking a look, though next week I'll
probably be busy with Fedora Core 3 Bug Week ;)
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-09-23 22:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-14 22:39 Memory oversubscription Todd Jones
2004-09-14 22:55 ` Keir Fraser
2004-09-23 21:06 ` Rik van Riel
2004-09-23 21:50 ` Ian Pratt
2004-09-23 22:08 ` Rik van Riel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.