Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly calculate free memory in the system #3

Closed
marmarek opened this issue Mar 8, 2015 · 3 comments
Closed

Correctly calculate free memory in the system #3

marmarek opened this issue Mar 8, 2015 · 3 comments
Assignees
Labels
C: core P: major Priority: major. Between "default" and "critical" in severity. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@marmarek
Copy link
Member

marmarek commented Mar 8, 2015

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

@marmarek marmarek added this to the Release 1 Alpha 2 milestone Mar 8, 2015
@marmarek marmarek added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. C: core P: major Priority: major. Between "default" and "critical" in severity. labels Mar 8, 2015
@marmarek
Copy link
Member Author

marmarek commented Mar 8, 2015

Modified by joanna on 9 Apr 2010 23:40 UTC

@marmarek
Copy link
Member Author

marmarek commented Mar 8, 2015

Comment by joanna on 10 Apr 2010 12:52 UTC
Resolved by commit e9586a8:

http://qubes-os.org/gitweb/?p=mainstream/core.git;a=commitdiff;h=e9586a81289293e38b648953ff185666e34f11a8

@marmarek marmarek closed this as completed Mar 8, 2015
@marmarek
Copy link
Member Author

marmarek commented Mar 8, 2015

Comment by joanna on 10 Apr 2010 13:02 UTC
The changes are applied to qubes-code-dom0-1.0.1-1.rpm. User can update by doing (in Dom0):

yum update qubes-core-dom0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: core P: major Priority: major. Between "default" and "critical" in severity. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

2 participants