|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] tools: improve NUMA guest placement when
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1260521994 0
# Node ID f9392f6eda79a0714f75769bcb668d58e77bd36a
# Parent a50c1cbf08ec034d168c9c34bc28a247c0384a88
tools: improve NUMA guest placement when ballooning
the "guest to a single NUMA node" constrain algorithm does not work
well when we do ballooning. Ballooning and NUMA don't play together
anyway, as Dom0 and thus ballooning is not NUMA aware, I am working on
this but it will not be ready for the Xen 4.0 release window. The
usual ballooning situation will result in an empty candidate list, as
no node has enough free memory to host the guest. In this case the
code will simply pick the first node: again and again, because all
nodes without enough memory will be ultimately penalized with the same
maxint value (regardless of the actual load). The attached patch will
change this to use a relative penalty in case of not-enough memory, so
that low-load low-memory nodes will be used at one point. A half
loaded node has shown to be a good value, as an unbalanced system is
much worse than non-local memory access for guests. Regardless of
that you should restrict the Dom0 on a NUMA system to a reasonable
memory size, so that ballooning is not necessary most of the time. In
this case the guest's memory will be NUMA local.
Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
---
tools/python/xen/xend/XendDomainInfo.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff -r a50c1cbf08ec -r f9392f6eda79 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Fri Dec 11 08:58:06 2009 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py Fri Dec 11 08:59:54 2009 +0000
@@ -2670,10 +2670,9 @@ class XendDomainInfo:
nodeload[i] += 1
break
for i in range(0, nr_nodes):
- if len(info['node_to_cpu'][i]) > 0 and i in node_list:
- nodeload[i] = int(nodeload[i] * 16 /
len(info['node_to_cpu'][i]))
- else:
- nodeload[i] = sys.maxint
+ nodeload[i] = int(nodeload[i] * 16 /
len(info['node_to_cpu'][i]))
+ if len(info['node_to_cpu'][i]) == 0 or i not in node_list:
+ nodelist[i] += 8
return map(lambda x: x[0], sorted(enumerate(nodeload),
key=lambda x:x[1]))
info = xc.physinfo()
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] tools: improve NUMA guest placement when ballooning,
Xen patchbot-unstable <=
|
|
|
|
|