From: Dan Magenheimer Subject: Re: domain creation vs querying free memory (xend and xl) Date: Thu, 4 Oct 2012 09:54:04 -0700 (PDT) Message-ID: <3e5cf0ba-4241-4f00-bef6-aaff2cc23419@default> References: <53b8c758-2675-42a7-b63f-4f9ad0006d84@default> <20581.55931.246130.308384@mariner.uk.xensource.com> <8ba2021c-1095-4fd1-98a5-f6eec8a3498b@default> <20121002091017.GA95926@ocelot.phlegethon.org> <66cc0085-1216-40f7-8059-eaf615202c12@default> <20121002201624.GA98445@ocelot.phlegethon.org> <20121004100645.GC38243@ocelot.phlegethon.org> <1349345864.650.247.camel@zakaz.uk.xensource.com> <239799F4-AF29-494F-86D2-ADF45ACA8792@gridcentric.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <239799F4-AF29-494F-86D2-ADF45ACA8792@gridcentric.ca> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andres Lagar-Cavilla , Ian Campbell Cc: Olaf Hering , "Keir (Xen.org)" , Konrad Wilk , George Dunlap , Kurt Hackel , Tim Deegan , xen-devel@lists.xen.org, George Shuklin , Dario Faggioli , Ian Jackson List-Id: xen-devel@lists.xenproject.org > From: Andres Lagar-Cavilla [mailto:andreslc@gridcentric.ca] > Subject: Re: [Xen-devel] domain creation vs querying free memory (xend and xl) > > > On Oct 4, 2012, at 6:17 AM, Ian Campbell wrote: > > > On Thu, 2012-10-04 at 11:06 +0100, Tim Deegan wrote: > >> but my question was really: what should xl do, in the presence of > >> ballooning, sharing, paging and tmem, to > >> - decide whether a VM can be started at all; > >> - control those four systems to shuffle memory around; and > > Are we talking about a per-VM control, with one or more of those sub-systems colluding concurrently? > Or are we talking about a global view, and how chunks of host memory get sub-allocated? Hopefully the > latter... > > >> - resolve races sensibly to avoid small VMs deferring large ones. > >> (AIUI, xl already has some logic to handle the case of balloon-to-fit.) > >> > >> The second of those three is the interesting one. It seems to me that > >> if the tools can't force all other actors to give up memory (and not > >> immediately take it back) then they can't guarantee to be able to start > >> a new VM, even with the new reservation hypercalls. > > > > There was a bit of discussion in the spring about this sort of thing > > (well, three of the four), which seems to have fallen a bit by the > > wayside^W^W^W^W^W^Wbeen deferred until 4.3 (ahem) e.g. > > http://lists.xen.org/archives/html/xen-devel/2012-03/msg01181.html > > > > I'm sure there was earlier discussion which led to that, but I can't > > seem to see it in the archives right now, perhaps I'm not looking for > > the right Subject. > > IIRC, we had a bit of that conversation during the Santa Clara hackathon. The idea was to devise a > scheme so that libxl can be told who the "actor" will be for memory management, and then hand-off > appropriately. Add xl bindings, suitable defaults, and an implementation of the "balloon actor" by Scanning through the archived message I am under the impression that the focus is on a single server... i.e. "punt if actor is not xl", i.e. it addressed "balloon-to-fit" and only tries to avoid stepping on other memory overcommit technologies. That makes it almost orthogonal, I think, to the problem I originally raised. But a bigger concern is that its focus on a single machine ignores the "cloud", where Xen seems to hold an advantage. In the cloud, the actor is "controlling" _many_ machines. In the problem I originally raised, this actor (a centralized management console) is simply looking for a server that has sufficient memory to house a new domain, and it (or the automation/sysadmin running it) gets unhappy if (xl running on) the server says "yes there is enough memory" but then later says, "oops, I guess there wasn't enough after all". > libxl, and the end result is the ability to start domains with a memory target suitably managed by > balloon, xenpaging, tmem, foo, according to the user's wish. With no need to know obscure knobs. To > the extent that might be possible. Am I detecting s[k|c]epticism? If so, I too am s[k|c]eptical. Dan