Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upQubes Settings GUI / setting Initial memory to less than 1/10th Max mem. requires enabling memory balancing #3569
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
donob4n
Feb 11, 2018
I had a similar problem. If you try to set more than more 'Max memory', you will get a warning message and the max value will be updated.
This needs to check if the VM is not included in balancing. I've fixed it in my 3.2 dom0 but I considered it pretty dummy for requesting a pull. Also I thought it don't affect Qubes 4.
Probably it shouldn't be called if the VM is not in memory balance.
donob4n
commented
Feb 11, 2018
•
|
I had a similar problem. If you try to set more than more 'Max memory', you will get a warning message and the max value will be updated. This needs to check if the VM is not included in balancing. I've fixed it in my 3.2 dom0 but I considered it pretty dummy for requesting a pull. Also I thought it don't affect Qubes 4. Probably it shouldn't be called if the VM is not in memory balance. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
donob4n
Feb 11, 2018
It's hard to avoid it being called since it's called by the gui, so maybe a good solution could be:
def check_mem_changes(self):
# skip VMs not included in memory balancing
if not self.include_in_balancing.isChecked()
self.max_mem_size.setValue(self.init_mem.value())
return
if self.max_mem_size.value() < self.init_mem.value():
QtGui.QMessageBox.warning(
None,
self.tr("Warning!"),
self.tr("Max memory can not be less than initial memory.<br>"
"Setting max memory to equal initial memory."))
self.max_mem_size.setValue(self.init_mem.value())
# Linux specific limit: init memory must not be below
# max_mem_size/10.79 in order to allow scaling up to
# max_mem_size (or else "add_memory() failed: -17" problem)
if self.init_mem.value() * 10 < self.max_mem_size.value():
QtGui.QMessageBox.warning(
None,
self.tr("Warning!"),
self.tr("Initial memory can not be less than one tenth "
"Max memory.<br>Setting initial memory to the minimum "
"allowed value."))
self.init_mem.setValue(self.max_mem_size.value() / 10)
donob4n
commented
Feb 11, 2018
|
It's hard to avoid it being called since it's called by the gui, so maybe a good solution could be:
|
taradiddles commentedFeb 11, 2018
•
edited
Edited 1 time
-
taradiddles
edited Feb 11, 2018 (most recent)
[ very low prio ]
Qubes OS version:
4.0rc4
Steps to reproduce the behavior:
Expected behavior:
Initial Memory is set to a lower value.
Actual behavior:
Error message - "Initial memory can't be less than one tenth Max Memory". However "Max Memory" is greyed out so one has to enable memory balancing, decrease the max memory, set a lower Initial memory value and then disable memory balancing.
General notes:
IMHO, more generally (= also for VMs with memory balancing enabled) setting a lower value than 1/10th the Max memory should automatically decrease the Max memory to 10 times the new Initial memory value - maybe with a notification message.
Related issues: