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
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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Tue, 14 Sep 2004, Todd Jones wrote:> 2. Inflate a balloon in that domain and return say 40MB back to XenOK, 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/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 ... ;)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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel