core-admin/core-modules
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
..
__init__.py Move all files one level up 2013-03-16 19:56:51 +01:00
01QubesAppVm.py Declare file encoding for all python files, fill missing copyright headers 2014-05-18 21:03:27 +02:00
01QubesDisposableVm.py Declare file encoding for all python files, fill missing copyright headers 2014-05-18 21:03:27 +02:00
01QubesHVm.py hvm: reserve memory for stubdom 2014-09-16 01:18:55 +02:00
02QubesTemplateHVm.py Declare file encoding for all python files, fill missing copyright headers 2014-05-18 21:03:27 +02:00
000QubesVm.py Linux VM specific: maxmem limited by init mem 2014-10-06 04:02:07 +02:00
003QubesTemplateVm.py Declare file encoding for all python files, fill missing copyright headers 2014-05-18 21:03:27 +02:00
005QubesNetVm.py Declare file encoding for all python files, fill missing copyright headers 2014-05-18 21:03:27 +02:00
006QubesAdminVm.py Declare file encoding for all python files, fill missing copyright headers 2014-05-18 21:03:27 +02:00
006QubesProxyVm.py Declare file encoding for all python files, fill missing copyright headers 2014-05-18 21:03:27 +02:00
README.txt Move all files one level up 2013-03-16 19:56:51 +01:00

This directory contains Qubes core modules. It will be loaded in
lexicographical order, use numeric prefix to force load ordering.

0* - Qubes base modules
00* - Qubes core VM classes