diff --git a/dom0/qmemman/qmemman_algo.py b/dom0/qmemman/qmemman_algo.py index 22c3feb5..e64c76de 100755 --- a/dom0/qmemman/qmemman_algo.py +++ b/dom0/qmemman/qmemman_algo.py @@ -60,7 +60,7 @@ def prefmem(domain): CACHE_FACTOR = 1.3 #dom0 is special, as it must have large cache, for vbds. Thus, give it a special boost if domain.id == '0': - return domain.mem_used*CACHE_FACTOR + 350*1024*1024 + return min(domain.mem_used*CACHE_FACTOR + 350*1024*1024, domain.memory_maximum) return min(domain.mem_used*CACHE_FACTOR, domain.memory_maximum) def memory_needed(domain):