From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 10 of 10 v2] Some automatic NUMA placement documentation Date: Mon, 18 Jun 2012 17:54:25 +0200 Message-ID: <1340034865.4705.86.camel@Solace> References: <0e566a40afad1e3dc299.1339779878@Solace> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <0e566a40afad1e3dc299.1339779878@Solace> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Andre Przywara , Ian Campbell , Stefano Stabellini , George Dunlap , Juergen Gross , Ian Jackson List-Id: xen-devel@lists.xenproject.org On Fri, 2012-06-15 at 19:04 +0200, Dario Faggioli wrote: > +### Automatic Guest Placement with xl ### > + > +In case no "cpus=" option is specified in the config file, xl tries > +to figure out on its own on which node(s) the domain could fit best. > + > +First of all, it needs to find a node (or a set of nodes) that have > +enough free memory for accommodating the domain. After that, the actual > +decision on where to put the new guest happens by generating all the > +possible combinations of nodes that satisfies the above and chose among > +them according to the following heuristics: > + > + * candidates involving fewer nodes come first. In case two (or more) > + candidates span the same number of nodes, > + * candidates with greater amount of free memory come first. In case > + two (or more) candidates differ in their amount of free memory by > + less than 10%, > + * candidates with fewer domains already placed on them come first. > + > +Giving preference to small candidates ensures better performance for > +the guest, as it avoid spreading its memory among different nodes. > +Using the nodes that have the biggest amounts of free memory helps > +keeping the memory fragmentation small, from a system wide perspective. > +Finally, in case more candidates fulfil these criteria by the same > +extent, choosing the candidate that is hosting fewer domain helps > +balancing the load on the various nodes. > + This part below is basically a leftover from previous version. Things does not work like that any longer. Basically, what we do is looking for all the nodes, or a sets of nodes, that have enough free memory and at least as much pCPUs as the domain has vCPUs and then apply the heuristics outlined above. > +The last step is figuring out whether the selected candidate contains > +at least as much CPUs as the number of VCPUs of the VM. The current > +solution for the case when this is not verified is just to add some > +more nodes, until the condition turns into being true. When doing > +this, the nodes with the least possible distance from the ones > +already in the nodemap are considered. > + Sorry, (already fixed in my local patchqueue) Dario -- <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)