Skip to content

Correctly calculate free memory in the system #3

Closed
@marmarek

Description

@marmarek

Reported by wikimaster on 6 Apr 2010 16:59 UTC
Currently qubes.py prevents starting a VM if the memory available for Dom0 was to go below a defined limit (700MB). On some systems, when Dom0 becomes short on memory (<500MB), and Dom0 starts using the swap file, the overall system performance drops down dramatically. This is most likely caused by the reduced filesystem caching, and is very apparent on systems with fast SSD drives, enabled full disk encryption, and _without_ the AES instruction in the CPU (in which case CPU is heavily loaded doing the crypto).

The QubesVM.start() method calculates the memory that will be left to Dom0 after the start of a new VM using this simple method:

dom0_mem_new = dom0_mem - mem_required

... and if dom0_mem_new is too small it raises an exception, which qvm-run handles and displays a message to the user that she should stop some running VMs before continuing.

However when the users stops a VM, Xen doesn't return the memory back to Dom0. This, in turn, makes it impossible for the user to start any new VM, without rebooting the system.

The proper solution should account for this "hidden" memory that has been freed when a user stopped a VM, and is available to other domains, but has not be returned to Dom0.

Migrated-From: https://wiki.qubes-os.org/ticket/3

Metadata

Metadata

Assignees

Labels

C: coreThis issue pertains to a Qubes core component.P: majorPriority: major. Between "default" and "critical" in severity.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions