Go to file
Victor Lopez bf2173073b Linux VM specific: maxmem limited by init mem
Check maxmem taking into account the minimum init memory that allows
that requested maximum memory.

Explanation:
Linux kernel needs space for memory-related structures created at boot.
If init_mem is just 400MB, then max_mem can't balloon above 4.3GB (at
which poing it yields "add_memory() failed: -17" messages and apps
crash), regardless of the max_mem_size value.

Based on Marek's findings and my tests on a 16GB PC, using several
processes like:
   stress -m 1 --vm-bytes 1g --vm-hang 100

result in the following points:
init_mem  ==> actual max memory
400             4300
700             7554
800             8635
1024            11051
1200            12954
1300            14038
1500            14045 <== probably capped on my 16GB system

The actual ratio of max_mem_size/init_mem is surprisingly constant at
10.79

If less init memory is set than that ratio allows, then the set
maxmem is unreachable and the VM becomes unstable (app crashes)

Based on qubes-devel discussion titled "Qubes Dom0 init memory against
Xen best practices?" at:
https://groups.google.com/d/msg/qubes-devel/VRqkFj1IOtA/UgMgnwfxVSIJ
2014-10-06 04:02:07 +02:00
core backups: use default kernel if saved one is not installed 2014-10-01 03:50:50 +02:00
core-modules Linux VM specific: maxmem limited by init mem 2014-10-06 04:02:07 +02:00
dispvm dispvm: use tray notification for "Updating default DispVM savefile" msg (#877) 2014-07-04 04:33:16 +02:00
doc doc: update qvm-create man page 2014-08-12 00:17:45 +02:00
linux proxyvm: add support for rules with expire time (#760) 2014-03-28 02:54:59 +01:00
qmemman Rearrange code to not import PyQt on every qvm-* call 2014-06-05 01:59:42 +02:00
qubes-rpc regexp fixes and validation (#829) 2014-05-16 18:35:59 +02:00
qubes-rpc-policy qubes-rpc-policy/qubes.GetImageRGBA.policy 2014-05-20 17:49:20 +02:00
qvm-tools qvm-tools/qvm-backup: add --debug option 2014-09-26 14:42:25 +02:00
rpm_spec tests: add initial backup test 2014-09-18 08:25:56 +02:00
site-packages add convenient symlinks simulating target python files layout 2014-03-10 01:05:01 +01:00
site-packages-qmemman Convenient link for qmemman 2014-04-23 12:53:41 +02:00
tests tests: initial VM mgmt tests 2014-10-02 10:56:04 +02:00
xen-vm-config Remove default runlevel from VM kernel parameters 2013-05-04 05:27:33 +02:00
.gitignore gitignore files - add build products 2011-03-06 14:06:24 +01:00
LICENSE Added LICENSE 2010-04-05 21:21:27 +02:00
Makefile Update make clean target 2013-03-20 16:40:01 +01:00
Makefile.builder Add Makefile.builder 2013-03-18 02:24:49 +01:00
version version 2.1.63 2014-09-19 11:01:07 +02:00