host xxx did no satisfy internal filter Memory because its swap value was illegal.

[sorry, this is my first time to use mailing list, repost again, with content from html to plain text] ### Description ### 1. problem 1) migrate vm {name:xyz001, mem(min, max) = (2G,4G)} from ovirt host n33 to n34, failed. 2) shutting down vm {name: test001, mem(min, max) = (1G,1G)} on n34, update test001's config: Host->Start Running On: Specific(n34), then start test001, while, it's running on n33. 2. err message Error while executing action: migrate [engine gui] xyz001: Cannot migrate VM. There is no host that satisfies current scheduling constraints. See below for details: The host n33.ovirt did not satisfy internal filter Memory because has availabe 1863 MB memory. Insufficient free memory to run the VM. The host n34.ovirt did not satisfy internal filter Memory because its swap value was illegal. [engine.log] INFO [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] Lock Acquired to object 'EngineLock:{exclusiveLocks='[73351885-9a92-4317-baaf-e4f2bed1171a=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName test11>]', sharedLocks='null'}' INFO [org.ovirt.engine.core.bll.scheduling.SchedulingManager] (default task-23) [5916aa3b] Candidate host 'n34' ('2ae3a219-ae9a-4347-b1e2-0e100360231e') was filtered out by 'VAR__FILTERTYPE__INTERNAL' filter 'Memory' (correlation id: null) INFO [org.ovirt.engine.core.bll.scheduling.SchedulingManager] (default task-23) [5916aa3b] Candidate host 'n33' ('688aec34-5630-478e-ae5e-9d57990804e5') was filtered out by 'VAR__FILTERTYPE__INTERNAL' filter 'Memory' (correlation id: null) WARN [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] CanDoAction of action 'MigrateVm' failed for user admin@internal. Reasons: VAR__ACTION__MIGRATE,VAR__TYPE__VM,SCHEDULING_ALL_HOSTS_FILTERED_OUT,VAR__FILTERTYPE__INTERNAL,$hostName n33,$filterName Memory,$availableMem 1863,VAR__DETAIL__NOT_ENOUGH_MEMORY,SCHEDULING_HOST_FILTERED_REASON_WITH_DETAIL,VAR__FILTERTYPE__INTERNAL,$hostName n34,$filterName Memory,VAR__DETAIL__SWAP_VALUE_ILLEGAL,SCHEDULING_HOST_FILTERED_REASON_WITH_DETAIL INFO [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] Lock freed to object 'EngineLock:{exclusiveLocks='[73351885-9a92-4317-baaf-e4f2bed1171a=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName test11>]', sharedLocks='null'}' 3. DC Compatibility Version: 3.5 4. Cluster Memory Optimization: For Server Load - Allow scheduling of 150% of physical memory Memory Balloon: Enable Memory Balloon Optimization Enable KSM: Share memory pages across all available memory (best KSM effectivness) 5. HOST name: n33, n34 mem: 32G 6. VM [n33] 11 vms (min, max) = (2G,4G) = 8 (min, max) = (2G,8G) = 1 (min, max) = (2G,2G) = 2 total: 22G/44G [n34] 7 vms (min, max) = (0.5G,1G) = 1 (min, max) = (1G,2G) = 1 (min, max) = (2G,2G) = 1 (min, max) = (2G,4G) = 3 (min, max) = (8G,8G) = 1 total: 17.5G/25G -------------------------------------------- (min, max) = (2G,4G) stands for: Memory Size: 4G Physical Memory Guaranteed: 2G Memory Balloon Device Enabled: checked -------------------------------------------- 7. rpm version [root@n33 ~]# rpm -qa |grep vdsm vdsm-yajsonrpc-4.16.27-0.el6.noarch vdsm-jsonrpc-4.16.27-0.el6.noarch vdsm-cli-4.16.27-0.el6.noarch vdsm-python-zombiereaper-4.16.27-0.el6.noarch vdsm-xmlrpc-4.16.27-0.el6.noarch vdsm-python-4.16.27-0.el6.noarch vdsm-4.16.27-0.el6.x86_64 [root@engine ~]# rpm -qa |grep ovirt ovirt-release36-001-2.noarch ovirt-engine-setup-base-3.6.0.3-1.el6.noarch ovirt-engine-setup-3.6.0.3-1.el6.noarch ovirt-image-uploader-3.6.0-1.el6.noarch ovirt-engine-wildfly-8.2.0-1.el6.x86_64 ovirt-engine-setup-plugin-vmconsole-proxy-helper-3.6.0.3-1.el6.noarch ovirt-host-deploy-1.4.0-1.el6.noarch ovirt-engine-backend-3.6.0.3-1.el6.noarch ovirt-engine-webadmin-portal-3.6.0.3-1.el6.noarch ovirt-engine-jboss-as-7.1.1-1.el6.x86_64 ovirt-engine-lib-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-ovirt-engine-common-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-ovirt-engine-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-websocket-proxy-3.6.0.3-1.el6.noarch ovirt-engine-sdk-python-3.6.0.3-1.el6.noarch ovirt-iso-uploader-3.6.0-1.el6.noarch ovirt-vmconsole-proxy-1.0.0-1.el6.noarch ovirt-engine-extensions-api-impl-3.6.0.3-1.el6.noarch ovirt-engine-websocket-proxy-3.6.0.3-1.el6.noarch ovirt-engine-vmconsole-proxy-helper-3.6.0.3-1.el6.noarch ebay-cors-filter-1.0.1-0.1.ovirt.el6.noarch ovirt-host-deploy-java-1.4.0-1.el6.noarch ovirt-engine-tools-3.6.0.3-1.el6.noarch ovirt-engine-restapi-3.6.0.3-1.el6.noarch ovirt-engine-3.6.0.3-1.el6.noarch ovirt-engine-extension-aaa-jdbc-1.0.1-1.el6.noarch ovirt-engine-cli-3.6.0.1-1.el6.noarch ovirt-vmconsole-1.0.0-1.el6.noarch ovirt-engine-wildfly-overlay-001-2.el6.noarch ovirt-engine-dbscripts-3.6.0.3-1.el6.noarch ovirt-engine-userportal-3.6.0.3-1.el6.noarch ovirt-guest-tools-iso-3.6.0-0.2_master.fc22.noarch ### DB ### [root@engine ~]# su postgres bash-4.1$ cd ~ bash-4.1$ psql engine engine=# select vds_id, physical_mem_mb, mem_commited, vm_active, vm_count, reserved_mem, guest_overhead, transparent_hugepages_state, pending_vmem_size from vds_dynamic; vds_id | physical_mem_mb | mem_commited | vm_active | vm_count | reserved_mem | guest_overhead | transparent_hugepages_state | pending_vmem_size --------------------------------------+-----------------+--------------+-----------+----------+--------------+----------------+-----------------------------+------------------- 688aec34-5630-478e-ae5e-9d57990804e5 | 32057 | 45836 | 11 | 11 | 321 | 65 | 2 | 0 2ae3a219-ae9a-4347-b1e2-0e100360231e | 32057 | 26120 | 7 | 7 | 321 | 65 | 2 | 0 (2 rows) ### memory ### [n33] # free -m total used free shared buffers cached Mem: 32057 31770 287 0 41 6347 -/+ buffers/cache: 25381 6676 Swap: 29999 10025 19974 Physical Memory: 32057 MB total, 25646 MB used, 6411 MB free Swap Size: 29999 MB total, 10025 MB used, 19974 MB free Max free Memory for scheduling new VMs: 1928.5 MB [n34] # free -m total used free shared buffers cached Mem: 32057 31713 344 0 78 13074 -/+ buffers/cache: 18560 13497 Swap: 29999 5098 24901 Physical Memory: 32057 MB total, 18593 MB used, 13464 MB free Swap Size: 29999 MB total, 5098 MB used, 24901 MB free Max free Memory for scheduling new VMs: 21644.5 MB ### code ### ##from: https://github.com/oVirt/ovirt-engine v3.6.0 ##from: D:\code\java\ovirt-engine\backend\manager\modules\dal\src\main\resources\bundles\AppErrors.properties VAR__DETAIL__SWAP_VALUE_ILLEGAL=$detailMessage its swap value was illegal ##from: D:\code\java\ovirt-engine\backend\manager\modules\bll\src\main\java\org\ovirt\engine\core\bll\scheduling\policyunits\MemoryPolicyUnit.java #-----------code--------------1# private boolean isVMSwapValueLegal(VDS host) { if (!Config.<Boolean> getValue(ConfigValues.EnableSwapCheck)) { return true; } (omitted..) return ((swap_total - swap_free - mem_available) * 100 / physical_mem_mb) <= Config.<Integer> getValue(ConfigValues.BlockMigrationOnSwapUsagePercentage) (omitted..) } #-----------code--------------1# if EnableSwapCheck = False then return True, so we can simply disable this option? Any Suggestion? [root@engine ~]# engine-config --get BlockMigrationOnSwapUsagePercentage BlockMigrationOnSwapUsagePercentage: 0 version: general so,, Config.<Integer> getValue(ConfigValues.BlockMigrationOnSwapUsagePercentage) = 0 so,, (swap_total - swap_free - mem_available) * 100 / physical_mem_mb <= 0 so,, swap_total - swap_free - mem_available <= 0 right? so,, if (swap_total - swap_free) <= mem_available then return True else return False #-----------code--------------2# for (VDS vds : hosts) { if (!isVMSwapValueLegal(vds)) { log.debug("Host '{}' swap value is illegal", vds.getName()); messages.addMessage(vds.getId(), EngineMessage.VAR__DETAIL__SWAP_VALUE_ILLEGAL.toString()); continue; } if (!memoryChecker.evaluate(vds, vm)) { int hostAavailableMem = SlaValidator.getInstance().getHostAvailableMemoryLimit(vds); log.debug("Host '{}' has {} MB available. Insufficient memory to run the VM", vds.getName(), hostAavailableMem); messages.addMessage(vds.getId(), String.format("$availableMem %1$d", hostAavailableMem)); messages.addMessage(vds.getId(), EngineMessage.VAR__DETAIL__NOT_ENOUGH_MEMORY.toString()); continue; } (omitted..) } #-----------code--------------2# !isVMSwapValueLegal then throw exception, right? so,, when we migrate vm from n33 to n34, the swap status on n34 actually is: (swap_total - swap_free) > mem_available swap_used > mem_available? confused... so,, the logic is: 1) check n33: swap[passed], then memory[failed], then goto (for..continue..loop) 2) check n34: swap[failed], then goto (for..continue..loop) If I have misunderstood anything, please let me know. ### conclusion ### 1) n33 do not have enough memory. [yes, I know that.] 2) n34 memory is illegal [why and how to solve it?] 3) what I tried: --change config: BlockMigrationOnSwapUsagePercentage [root@engine ~]# engine-config --set BlockMigrationOnSwapUsagePercentage=75 -cver general [root@engine ~]# engine-config --get BlockMigrationOnSwapUsagePercentage BlockMigrationOnSwapUsagePercentage: 75 version: general Result: failed. --disable EnableSwapCheck How? Option not found from 'engine-config --list', should I update table field direct from db? --disk swap partition on host Should I do this operation? --update ovirt-engine? No useful infomation found in latest release note, should I do this operation? ### help ### any help would be appreciated. ZYXW. Reference http://www.ovirt.org/Sla/FreeMemoryCalculation http://lists.ovirt.org/pipermail/users/2012-November/010858.html http://lists.ovirt.org/pipermail/users/2013-March/013201.html http://comments.gmane.org/gmane.comp.emulators.ovirt.user/19288 http://jim.rippon.me.uk/2013/07/ovirt-testing-english-instructions-for.html

On Tue, Dec 29, 2015 at 5:54 AM, pc <pc@pcswo.com> wrote:
[sorry, this is my first time to use mailing list, repost again, with content from html to plain text]
### Description ### 1. problem 1) migrate vm {name:xyz001, mem(min, max) = (2G,4G)} from ovirt host n33 to n34, failed. 2) shutting down vm {name: test001, mem(min, max) = (1G,1G)} on n34, update test001's config: Host->Start Running On: Specific(n34), then start test001, while, it's running on n33.
2. err message Error while executing action: migrate [engine gui] xyz001: Cannot migrate VM. There is no host that satisfies current scheduling constraints. See below for details: The host n33.ovirt did not satisfy internal filter Memory because has availabe 1863 MB memory. Insufficient free memory to run the VM. The host n34.ovirt did not satisfy internal filter Memory because its swap value was illegal.
[engine.log] INFO [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] Lock Acquired to object 'EngineLock:{exclusiveLocks='[73351885-9a92-4317-baaf-e4f2bed1171a=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName test11>]', sharedLocks='null'}' INFO [org.ovirt.engine.core.bll.scheduling.SchedulingManager] (default task-23) [5916aa3b] Candidate host 'n34' ('2ae3a219-ae9a-4347-b1e2-0e100360231e') was filtered out by 'VAR__FILTERTYPE__INTERNAL' filter 'Memory' (correlation id: null) INFO [org.ovirt.engine.core.bll.scheduling.SchedulingManager] (default task-23) [5916aa3b] Candidate host 'n33' ('688aec34-5630-478e-ae5e-9d57990804e5') was filtered out by 'VAR__FILTERTYPE__INTERNAL' filter 'Memory' (correlation id: null) WARN [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] CanDoAction of action 'MigrateVm' failed for user admin@internal. Reasons: VAR__ACTION__MIGRATE,VAR__TYPE__VM,SCHEDULING_ALL_HOSTS_FILTERED_OUT,VAR__FILTERTYPE__INTERNAL,$hostName n33,$filterName Memory,$availableMem 1863,VAR__DETAIL__NOT_ENOUGH_MEMORY,SCHEDULING_HOST_FILTERED_REASON_WITH_DETAIL,VAR__FILTERTYPE__INTERNAL,$hostName n34,$filterName Memory,VAR__DETAIL__SWAP_VALUE_ILLEGAL,SCHEDULING_HOST_FILTERED_REASON_WITH_DETAIL INFO [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] Lock freed to object 'EngineLock:{exclusiveLocks='[73351885-9a92-4317-baaf-e4f2bed1171a=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName test11>]', sharedLocks='null'}'
3. DC Compatibility Version: 3.5
4. Cluster Memory Optimization: For Server Load - Allow scheduling of 150% of physical memory Memory Balloon: Enable Memory Balloon Optimization Enable KSM: Share memory pages across all available memory (best KSM effectivness)
5. HOST name: n33, n34 mem: 32G
6. VM [n33] 11 vms (min, max) = (2G,4G) = 8 (min, max) = (2G,8G) = 1 (min, max) = (2G,2G) = 2 total: 22G/44G
[n34] 7 vms (min, max) = (0.5G,1G) = 1 (min, max) = (1G,2G) = 1 (min, max) = (2G,2G) = 1 (min, max) = (2G,4G) = 3 (min, max) = (8G,8G) = 1 total: 17.5G/25G -------------------------------------------- (min, max) = (2G,4G) stands for: Memory Size: 4G Physical Memory Guaranteed: 2G Memory Balloon Device Enabled: checked --------------------------------------------
7. rpm version [root@n33 ~]# rpm -qa |grep vdsm vdsm-yajsonrpc-4.16.27-0.el6.noarch vdsm-jsonrpc-4.16.27-0.el6.noarch vdsm-cli-4.16.27-0.el6.noarch vdsm-python-zombiereaper-4.16.27-0.el6.noarch vdsm-xmlrpc-4.16.27-0.el6.noarch vdsm-python-4.16.27-0.el6.noarch vdsm-4.16.27-0.el6.x86_64
[root@engine ~]# rpm -qa |grep ovirt ovirt-release36-001-2.noarch ovirt-engine-setup-base-3.6.0.3-1.el6.noarch ovirt-engine-setup-3.6.0.3-1.el6.noarch ovirt-image-uploader-3.6.0-1.el6.noarch ovirt-engine-wildfly-8.2.0-1.el6.x86_64 ovirt-engine-setup-plugin-vmconsole-proxy-helper-3.6.0.3-1.el6.noarch ovirt-host-deploy-1.4.0-1.el6.noarch ovirt-engine-backend-3.6.0.3-1.el6.noarch ovirt-engine-webadmin-portal-3.6.0.3-1.el6.noarch ovirt-engine-jboss-as-7.1.1-1.el6.x86_64 ovirt-engine-lib-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-ovirt-engine-common-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-ovirt-engine-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-websocket-proxy-3.6.0.3-1.el6.noarch ovirt-engine-sdk-python-3.6.0.3-1.el6.noarch ovirt-iso-uploader-3.6.0-1.el6.noarch ovirt-vmconsole-proxy-1.0.0-1.el6.noarch ovirt-engine-extensions-api-impl-3.6.0.3-1.el6.noarch ovirt-engine-websocket-proxy-3.6.0.3-1.el6.noarch ovirt-engine-vmconsole-proxy-helper-3.6.0.3-1.el6.noarch ebay-cors-filter-1.0.1-0.1.ovirt.el6.noarch ovirt-host-deploy-java-1.4.0-1.el6.noarch ovirt-engine-tools-3.6.0.3-1.el6.noarch ovirt-engine-restapi-3.6.0.3-1.el6.noarch ovirt-engine-3.6.0.3-1.el6.noarch ovirt-engine-extension-aaa-jdbc-1.0.1-1.el6.noarch ovirt-engine-cli-3.6.0.1-1.el6.noarch ovirt-vmconsole-1.0.0-1.el6.noarch ovirt-engine-wildfly-overlay-001-2.el6.noarch ovirt-engine-dbscripts-3.6.0.3-1.el6.noarch ovirt-engine-userportal-3.6.0.3-1.el6.noarch ovirt-guest-tools-iso-3.6.0-0.2_master.fc22.noarch
### DB ### [root@engine ~]# su postgres bash-4.1$ cd ~ bash-4.1$ psql engine engine=# select vds_id, physical_mem_mb, mem_commited, vm_active, vm_count, reserved_mem, guest_overhead, transparent_hugepages_state, pending_vmem_size from vds_dynamic; vds_id | physical_mem_mb | mem_commited | vm_active | vm_count | reserved_mem | guest_overhead | transparent_hugepages_state | pending_vmem_size
--------------------------------------+-----------------+--------------+-----------+----------+--------------+----------------+-----------------------------+------------------- 688aec34-5630-478e-ae5e-9d57990804e5 | 32057 | 45836 | 11 | 11 | 321 | 65 | 2 | 0 2ae3a219-ae9a-4347-b1e2-0e100360231e | 32057 | 26120 | 7 | 7 | 321 | 65 | 2 | 0 (2 rows)
### memory ### [n33] # free -m total used free shared buffers cached Mem: 32057 31770 287 0 41 6347 -/+ buffers/cache: 25381 6676 Swap: 29999 10025 19974
Physical Memory: 32057 MB total, 25646 MB used, 6411 MB free Swap Size: 29999 MB total, 10025 MB used, 19974 MB free Max free Memory for scheduling new VMs: 1928.5 MB
[n34] # free -m total used free shared buffers cached Mem: 32057 31713 344 0 78 13074 -/+ buffers/cache: 18560 13497 Swap: 29999 5098 24901
Physical Memory: 32057 MB total, 18593 MB used, 13464 MB free Swap Size: 29999 MB total, 5098 MB used, 24901 MB free Max free Memory for scheduling new VMs: 21644.5 MB
### code ### ##from: https://github.com/oVirt/ovirt-engine v3.6.0
##from: D:\code\java\ovirt-engine\backend\manager\modules\dal\src\main\resources\bundles\AppErrors.properties VAR__DETAIL__SWAP_VALUE_ILLEGAL=$detailMessage its swap value was illegal
##from: D:\code\java\ovirt-engine\backend\manager\modules\bll\src\main\java\org\ovirt\engine\core\bll\scheduling\policyunits\MemoryPolicyUnit.java #-----------code--------------1# private boolean isVMSwapValueLegal(VDS host) { if (!Config.<Boolean> getValue(ConfigValues.EnableSwapCheck)) { return true; } (omitted..) return ((swap_total - swap_free - mem_available) * 100 / physical_mem_mb) <= Config.<Integer> getValue(ConfigValues.BlockMigrationOnSwapUsagePercentage) (omitted..) } #-----------code--------------1# if EnableSwapCheck = False then return True, so we can simply disable this option? Any Suggestion?
[root@engine ~]# engine-config --get BlockMigrationOnSwapUsagePercentage BlockMigrationOnSwapUsagePercentage: 0 version: general
so,, Config.<Integer> getValue(ConfigValues.BlockMigrationOnSwapUsagePercentage) = 0 so,, (swap_total - swap_free - mem_available) * 100 / physical_mem_mb <= 0 so,, swap_total - swap_free - mem_available <= 0 right? so,, if (swap_total - swap_free) <= mem_available then return True else return False
#-----------code--------------2# for (VDS vds : hosts) { if (!isVMSwapValueLegal(vds)) { log.debug("Host '{}' swap value is illegal", vds.getName()); messages.addMessage(vds.getId(), EngineMessage.VAR__DETAIL__SWAP_VALUE_ILLEGAL.toString()); continue; } if (!memoryChecker.evaluate(vds, vm)) { int hostAavailableMem = SlaValidator.getInstance().getHostAvailableMemoryLimit(vds); log.debug("Host '{}' has {} MB available. Insufficient memory to run the VM", vds.getName(), hostAavailableMem); messages.addMessage(vds.getId(), String.format("$availableMem %1$d", hostAavailableMem)); messages.addMessage(vds.getId(), EngineMessage.VAR__DETAIL__NOT_ENOUGH_MEMORY.toString()); continue; } (omitted..) }
#-----------code--------------2# !isVMSwapValueLegal then throw exception, right? so,, when we migrate vm from n33 to n34, the swap status on n34 actually is: (swap_total - swap_free) > mem_available
swap_used > mem_available? confused...
so,, the logic is: 1) check n33: swap[passed], then memory[failed], then goto (for..continue..loop) 2) check n34: swap[failed], then goto (for..continue..loop)
If I have misunderstood anything, please let me know.
### conclusion ### 1) n33 do not have enough memory. [yes, I know that.] 2) n34 memory is illegal [why and how to solve it?] 3) what I tried: --change config: BlockMigrationOnSwapUsagePercentage [root@engine ~]# engine-config --set BlockMigrationOnSwapUsagePercentage=75 -cver general [root@engine ~]# engine-config --get BlockMigrationOnSwapUsagePercentage BlockMigrationOnSwapUsagePercentage: 75 version: general
Result: failed.
--disable EnableSwapCheck How? Option not found from 'engine-config --list', should I update table field direct from db?
--disk swap partition on host Should I do this operation?
--update ovirt-engine? No useful infomation found in latest release note, should I do this operation?
### help ### any help would be appreciated.
ZYXW. Reference http://www.ovirt.org/Sla/FreeMemoryCalculation http://lists.ovirt.org/pipermail/users/2012-November/010858.html http://lists.ovirt.org/pipermail/users/2013-March/013201.html http://comments.gmane.org/gmane.comp.emulators.ovirt.user/19288 http://jim.rippon.me.uk/2013/07/ovirt-testing-english-instructions-for.html
Hi, Let me simplify things. We do not allow swapping in general. The reason is that it kills the performance of all hosts. As you were able to see in our code (0 is the default config value we have) we expect the following expression: swap_total - swap_free - mem_available) * 100 / physical_mem_mb) <= 0 And in your case we see the value is > 0. This means that swap_total < (swap_free+mem_available) or in general your host is swapping. Since the host is swapping, we do not allow to run a VM on it. Let me know if you have any further questions. Doron

swap_total =3D=C2=A029999, =C2=A0swap_free =3D 24901,=C2=A0mem_available =3D = ? (mem_available =C2=A0is=C2=A0344 or=C2=A013497 ? Obviously=C2=A0the=C2=A0for= mer value match the fomula, right?)2) suggestionDisable swap on ovirt host sho=
</div><div style=3D"clear: both;"><span style=3D"font-family: Tahoma, Arial, = STHeiti, SimSun; font-size: 14px; color: rgb(0, 0, 0);"> </span></div><di= v style=3D"clear: both;"><span style=3D"font-family: Tahoma, Arial, STHeiti, S= imSun; font-size: 14px; color: rgb(0, 0, 0);">1) Just a little confused about = how to caculate the value.</span></div><div style=3D"clear: both;"><span style= =3D"font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; color: rgb(0= , 0, 0);">###and I quote,</span></div><div style=3D"clear: both;"><span style=3D= "font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; color: rgb(0, 0= , 0);">----</span></div><div style=3D"clear: both;"><div class=3D"gmail_extra"=
<span style=3D"color: rgb(0, 0, 0); font-family: Tahoma, Arial, STHeiti, SimS= un; font-size: 14px; font-style: normal; font-variant: normal; font-weight: no= rmal; line-height: 23.324px; text-align: start; text-indent: 0px; text-transfo= rm: none; widows: 1; float: none; display: inline !important; background-color= : rgb(255, 255, 255);"><span style=3D"margin: 0px; padding: 0px; border: 0px; = outline: 0px; color: rgb(0, 0, 0); font-family: Tahoma, Arial, STHeiti, SimSun= ; font-size: 14px; font-style: normal; font-variant: normal; font-weight: norm= al; line-height: 23.324px; text-align: start; text-indent: 0px; text-transform= : none; widows: 1; float: none; display: inline !important; background-color: = rgb(255, 255, 255);">## substituting =3D></span></span></span></div><d= iv style=3D"clear: both;"><span style=3D"font-family: Tahoma, Arial, STHeiti, = SimSun; font-size: 14px; color: rgb(0, 0, 0);"><span style=3D"color: rgb(0, 0,= 0); font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; font-style:= normal; font-variant: normal; font-weight: normal; line-height: 23.324px; tex= t-align: start; text-indent: 0px; text-transform: none; widows: 1; float: none= ; display: inline !important; background-color: rgb(255, 255, 255);">swap_tota= l =3D <span style=3D"color: rgb(0, 0, 0); font-family: Tahoma, Arial, STH= eiti, SimSun; font-size: 14px; font-style: normal; font-variant: normal; font-= weight: normal; line-height: 23.324px; text-align: start; text-indent: 0px; te= xt-transform: none; widows: 1; float: none; display: inline !important; backgr= ound-color: rgb(255, 255, 255);">29999, <span style=3D"color: rgb(0, 0, = 0); font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; font-style: = normal; font-variant: normal; font-weight: normal; line-height: 23.324px; text= -align: start; text-indent: 0px; text-transform: none; widows: 1; float: none;= display: inline !important; background-color: rgb(255, 255, 255);">swap_free = =3D 24901, <span style=3D"color: rgb(0, 0, 0); font-family: Tahoma, Arial= , STHeiti, SimSun; font-size: 14px; font-style: normal; font-variant: normal; = font-weight: normal; line-height: 23.324px; text-align: start; text-indent: 0p= x; text-transform: none; widows: 1; float: none; display: inline !important; b= ackground-color: rgb(255, 255, 255);">mem_available =3D ? </span></span></span= </span></span></div><div style=3D"clear: both;"><span style=3D"font-family: T= ahoma, Arial, STHeiti, SimSun; font-size: 14px; color: rgb(0, 0, 0);"><span st= yle=3D"color: rgb(0, 0, 0); font-family: Tahoma, Arial, STHeiti, SimSun; font-= size: 14px; font-style: normal; font-variant: normal; font-weight: normal; lin= e-height: 23.324px; text-align: start; text-indent: 0px; text-transform: none;= widows: 1; float: none; display: inline !important; background-color: rgb(255= , 255, 255);"><span style=3D"color: rgb(0, 0, 0); font-family: Tahoma, Arial, = STHeiti, SimSun; font-size: 14px; font-style: normal; font-variant: normal; fo= nt-weight: normal; line-height: 23.324px; text-align: start; text-indent: 0px;= text-transform: none; widows: 1; float: none; display: inline !important; bac= kground-color: rgb(255, 255, 255);"><span style=3D"color: rgb(0, 0, 0); font-f= amily: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; font-style: normal; fo= nt-variant: normal; font-weight: normal; line-height: 23.324px; text-align: st= art; text-indent: 0px; text-transform: none; widows: 1; float: none; display: = inline !important; background-color: rgb(255, 255, 255);"><span style=3D"color= : rgb(0, 0, 0); font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; = font-style: normal; font-variant: normal; font-weight: normal; line-height: 23= .324px; text-align: start; text-indent: 0px; text-transform: none; widows: 1; = float: none; display: inline !important; background-color: rgb(255, 255, 255);= ">(<span style=3D"color: rgb(0, 0, 0); font-family: Tahoma, Arial, STHeiti, Si= mSun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: = normal; line-height: 23.324px; text-align: start; text-indent: 0px; text-trans=
3. DC<br >Compatibility Version: 3.5<br ><br >4. Cluster<br >Memory Optimizat= ion: For Server Load - Allow scheduling of 150% of physical memory<br >Memory = Balloon: Enable Memory Balloon Optimization<br >Enable KSM: Share memory pages= across all available memory (best KSM effectivness)<br ><br >5. HOST<br >name= : n33, n34<br >mem: 32G<br ><br >6. VM<br >[n33] 11 vms<br >(min, max) =3D (2G= ,4G) =3D 8<br >(min, max) =3D (2G,8G) =3D 1<br >(min, max) =3D (2G,2G) =3D 2<b= r >total: 22G/44G<br ><br >[n34] 7 vms<br >(min, max) =3D (0.5G,1G) =3D 1<br >= (min, max) =3D (1G,2G) =3D 1<br >(min, max) =3D (2G,2G) =3D 1<br >(min, max) =3D= (2G,4G) =3D 3<br >(min, max) =3D (8G,8G) =3D 1<br >total: 17.5G/25G<br >-----= ---------------------------------------<br >(min, max) =3D (2G,4G) stands for:= <br >Memory Size: 4G<br >Physical Memory Guaranteed: 2G<br >Memory Balloon Dev= ice Enabled: checked<br >--------------------------------------------<br ><br = 7. rpm version<br >[root@n33 ~]# rpm -qa |grep vdsm<br >vdsm-yajsonrpc-4.16.2= 7-0.el6.noarch<br >vdsm-jsonrpc-4.16.27-0.el6.noarch<br >vdsm-cli-4.16.27-0.el= 6.noarch<br >vdsm-python-zombiereaper-4.16.27-0.el6.noarch<br >vdsm-xmlrpc-4.1= 6.27-0.el6.noarch<br >vdsm-python-4.16.27-0.el6.noarch<br >vdsm-4.16.27-0.el6.= x86_64<br ><br >[root@engine ~]# rpm -qa |grep ovirt<br >ovirt-release36-001-2= .noarch<br >ovirt-engine-setup-base-3.6.0.3-1.el6.noarch<br >ovirt-engine-setu=
total &nb= sp;used free shared = buffers cached<br >Mem: 32= 057 31713 344 &nbs=
if (!memoryChecker.evaluate(vds, vm= )) {<br > int hostAavai= lableMem =3D SlaValidator.getInstance().getHostAvailableMemoryLimit(vds);<br >= log.debug("Host '{}' h= as {} MB available. Insufficient memory to run the VM",<br > &nbs=
<br >#-----------code--------------2#<br >!isVMSwapValueLegal then throw exc= eption, right?<br >so,, when we migrate vm from n33 to n34, the swap status on= n34 actually is:<br >(swap_total - swap_free) > mem_available<br ><br >swa=
------=ALIBOUNDARY_26648_4e09c940_568341f3_65a5f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Doron,Thank you, I will do things like "swapoff" later.=C2=A01) Just a litt= le confused about how to caculate the value.###and I quote,----And in your cas= e we see the value is > 0.This means that=C2=A0swap_total < (swap_free+mem_ava= ilable) or in generalyour host is swapping.----###data in my case:[n34]#=C2=A0= free=C2=A0-m=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0total=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0used=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0free=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0shared=C2=A0=C2=A0= =C2=A0=C2=A0buffers=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0cachedMem:=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A032057=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A03171= 3=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0344=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A00=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A078=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A013074-/+=C2=A0buffers/cache:=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A018560=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A01349= 7Swap:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A029999=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A05098=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A024901Physical=C2=A0= Memory:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A032057=C2=A0MB=C2=A0total,=C2=A018593=C2=A0MB=C2=A0used,=C2=A0= 13464=C2=A0MB=C2=A0freeSwap=C2=A0Size:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A029999=C2=A0MB=C2=A0total,=C2=A05098=C2=A0MB=C2=A0used,=C2=A024901=C2=A0M= B=C2=A0freeMax=C2=A0free=C2=A0Memory=C2=A0for=C2=A0scheduling=C2=A0new=C2=A0VM= s:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A021644.5=C2=A0MB----## formula=C2=A0in my case:= =C2=A0swap_total -=C2=A0swap_free >=C2=A0mem_available## substituting=C2=A0=3D= uld be explicit=C2=A0indicated=C2=A0in=C2=A0the=C2=A0document.(for instance: h= ttp://www.ovirt.org/OVirt_Administration_Guide)-------------------------------= -----------------------------------From:Doron Fediuck <dfediuck@redhat.com>Tim= e:2015 Dec 29 (Tue) 20:40To:pc <pc@pcswo.com>Cc:users <users@ovirt.org>, Golan= , Roy <rgolan@redhat.com>Subject:Re: [ovirt-users] host xxx did no satisfy int= ernal filter Memory because its swap value was illegal.On Tue, Dec 29, 2015 at= 5:54 AM, pc <pc@pcswo.com> wrote:[sorry, this is my first time to use mailing= list, repost again, with content from html to plain text]### Description ###1= . problem1) migrate vm {name:xyz001, mem(min, max) =3D (2G,4G)} from ovirt hos= t n33 to n34, failed.2) shutting down vm {name: test001, mem(min, max) =3D (1G= ,1G)} on n34, update test001's config: Host->Start Running On: Specific(n34), = then start test001, while, it's running on n33.2. err messageError while execu= ting action: migrate[engine gui]xyz001:Cannot migrate VM. There is no host tha= t satisfies current scheduling constraints. See below for details:The host n33= did not satisfy internal filter Memory because has availabe 1863 MB memory. I= nsufficient free memory to run the VM.The host n34 did not satisfy internal fi= lter Memory because its swap value was illegal.[engine.log]INFO=C2=A0 [org.ovi= rt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] Lock Acquire= d to object 'EngineLock:{exclusiveLocks=3D'[73351885-9a92-4317-baaf-e4f2bed117= 1a=3D<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName test11>]', sharedLock= s=3D'null'}'INFO=C2=A0 [org.ovirt.engine.core.bll.scheduling.SchedulingManager= ] (default task-23) [5916aa3b] Candidate host 'n34' ('2ae3a219-ae9a-4347-b1e2-= 0e100360231e') was filtered out by 'VAR__FILTERTYPE__INTERNAL' filter 'Memory'= (correlation id: null)INFO=C2=A0 [org.ovirt.engine.core.bll.scheduling.Schedu= lingManager] (default task-23) [5916aa3b] Candidate host 'n33' ('688aec34-5630= -478e-ae5e-9d57990804e5') was filtered out by 'VAR__FILTERTYPE__INTERNAL' filt= er 'Memory' (correlation id: null)WARN=C2=A0 [org.ovirt.engine.core.bll.Migrat= eVmCommand] (default task-23) [5916aa3b] CanDoAction of action 'MigrateVm' fai= led for user admin@internal. Reasons: VAR__ACTION__MIGRATE,VAR__TYPE__VM,SCHED= ULING_ALL_HOSTS_FILTERED_OUT,VAR__FILTERTYPE__INTERNAL,$hostName n33,$filterNa= me Memory,$availableMem 1863,VAR__DETAIL__NOT_ENOUGH_MEMORY,SCHEDULING_HOST_FI= LTERED_REASON_WITH_DETAIL,VAR__FILTERTYPE__INTERNAL,$hostName n34,$filterName = Memory,VAR__DETAIL__SWAP_VALUE_ILLEGAL,SCHEDULING_HOST_FILTERED_REASON_WITH_DE= TAILINFO=C2=A0 [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) = [5916aa3b] Lock freed to object 'EngineLock:{exclusiveLocks=3D'[73351885-9a92-= 4317-baaf-e4f2bed1171a=3D<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName t= est11>]', sharedLocks=3D'null'}'3. DCCompatibility Version: 3.54. ClusterMemor= y Optimization: For Server Load - Allow scheduling of 150% of physical memoryM= emory Balloon: Enable Memory Balloon OptimizationEnable KSM: Share memory page= s across all available memory (best KSM effectivness)5. HOSTname: n33, n34mem:= 32G6. VM[n33] 11 vms(min, max) =3D (2G,4G) =3D 8(min, max) =3D (2G,8G) =3D 1(= min, max) =3D (2G,2G) =3D 2total: 22G/44G[n34] 7 vms(min, max) =3D (0.5G,1G) =3D= 1(min, max) =3D (1G,2G) =3D 1(min, max) =3D (2G,2G) =3D 1(min, max) =3D (2G,4= G) =3D 3(min, max) =3D (8G,8G) =3D 1total: 17.5G/25G--------------------------= ------------------(min, max) =3D (2G,4G) stands for:Memory Size: 4GPhysical Me= mory Guaranteed: 2GMemory Balloon Device Enabled: checked---------------------= -----------------------7. rpm version[root@n33 ~]# rpm -qa |grep vdsmvdsm-yajs= onrpc-4.16.27-0.el6.noarchvdsm-jsonrpc-4.16.27-0.el6.noarchvdsm-cli-4.16.27-0.= el6.noarchvdsm-python-zombiereaper-4.16.27-0.el6.noarchvdsm-xmlrpc-4.16.27-0.e= l6.noarchvdsm-python-4.16.27-0.el6.noarchvdsm-4.16.27-0.el6.x86_64[root@engine= ~]# rpm -qa |grep ovirtovirt-release36-001-2.noarchovirt-engine-setup-base-3.= 6.0.3-1.el6.noarchovirt-engine-setup-3.6.0.3-1.el6.noarchovirt-image-uploader-= 3.6.0-1.el6.noarchovirt-engine-wildfly-8.2.0-1.el6.x86_64ovirt-engine-setup-pl= ugin-vmconsole-proxy-helper-3.6.0.3-1.el6.noarchovirt-host-deploy-1.4.0-1.el6.= noarchovirt-engine-backend-3.6.0.3-1.el6.noarchovirt-engine-webadmin-portal-3.= 6.0.3-1.el6.noarchovirt-engine-jboss-as-7.1.1-1.el6.x86_64ovirt-engine-lib-3.6= .0.3-1.el6.noarchovirt-engine-setup-plugin-ovirt-engine-common-3.6.0.3-1.el6.n= oarchovirt-engine-setup-plugin-ovirt-engine-3.6.0.3-1.el6.noarchovirt-engine-s= etup-plugin-websocket-proxy-3.6.0.3-1.el6.noarchovirt-engine-sdk-python-3.6.0.= 3-1.el6.noarchovirt-iso-uploader-3.6.0-1.el6.noarchovirt-vmconsole-proxy-1.0.0= -1.el6.noarchovirt-engine-extensions-api-impl-3.6.0.3-1.el6.noarchovirt-engine= -websocket-proxy-3.6.0.3-1.el6.noarchovirt-engine-vmconsole-proxy-helper-3.6.0= .3-1.el6.noarchebay-cors-filter-1.0.1-0.1.ovirt.el6.noarchovirt-host-deploy-ja= va-1.4.0-1.el6.noarchovirt-engine-tools-3.6.0.3-1.el6.noarchovirt-engine-resta= pi-3.6.0.3-1.el6.noarchovirt-engine-3.6.0.3-1.el6.noarchovirt-engine-extension= -aaa-jdbc-1.0.1-1.el6.noarchovirt-engine-cli-3.6.0.1-1.el6.noarchovirt-vmconso= le-1.0.0-1.el6.noarchovirt-engine-wildfly-overlay-001-2.el6.noarchovirt-engine= -dbscripts-3.6.0.3-1.el6.noarchovirt-engine-userportal-3.6.0.3-1.el6.noarchovi= rt-guest-tools-iso-3.6.0-0.2_master.fc22.noarch### DB ###[root@engine ~]# su p= ostgresbash-4.1$ cd ~bash-4.1$ psql engineengine=3D# select vds_id, physical_m= em_mb, mem_commited, vm_active, vm_count, reserved_mem, guest_overhead, transp= arent_hugepages_state, pending_vmem_size from vds_dynamic;=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vds_id=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 | physical_mem_mb | mem_commited | vm_active | vm_count | re= served_mem | guest_overhead | transparent_hugepages_state | pending_vmem_size-= -------------------------------------+-----------------+--------------+-------= ----+----------+--------------+----------------+-----------------------------+= -------------------=C2=A0688aec34-5630-478e-ae5e-9d57990804e5 |=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A032057 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 45836 |=C2=A0 =C2=A0= =C2=A0 =C2=A0 11 |=C2=A0 =C2=A0 =C2=A0 =C2=A011 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 321 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A065 |=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A02 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00=C2=A02ae= 3a219-ae9a-4347-b1e2-0e100360231e |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A032= 057 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 26120 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A07 |=C2= =A0 =C2=A0 =C2=A0 =C2=A0 7 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 321 |=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A065 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02 |=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00(2 rows)### memory ###[n33]# fre= e -m=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0total=C2=A0 =C2=A0 =C2=A0 = =C2=A0used=C2=A0 =C2=A0 =C2=A0 =C2=A0free=C2=A0 =C2=A0 =C2=A0shared=C2=A0 =C2=A0= buffers=C2=A0 =C2=A0 =C2=A0cachedMem:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A032057=C2= =A0 =C2=A0 =C2=A0 31770=C2=A0 =C2=A0 =C2=A0 =C2=A0 287=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A041=C2=A0 =C2=A0 =C2=A0 =C2=A0634= 7-/+ buffers/cache:=C2=A0 =C2=A0 =C2=A0 25381=C2=A0 =C2=A0 =C2=A0 =C2=A06676Sw= ap:=C2=A0 =C2=A0 =C2=A0 =C2=A0 29999=C2=A0 =C2=A0 =C2=A0 10025=C2=A0 =C2=A0 =C2= =A0 19974Physical Memory:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 32057 MB total, 25646 MB used, 6411= MB freeSwap Size:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 29999 MB total, 10025= MB used, 19974 MB freeMax free Memory for scheduling new VMs:=C2=A0 =C2=A0 =C2= =A01928.5 MB[n34]# free -m=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tota= l=C2=A0 =C2=A0 =C2=A0 =C2=A0used=C2=A0 =C2=A0 =C2=A0 =C2=A0free=C2=A0 =C2=A0 =C2= =A0shared=C2=A0 =C2=A0 buffers=C2=A0 =C2=A0 =C2=A0cachedMem:=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A032057=C2=A0 =C2=A0 =C2=A0 31713=C2=A0 =C2=A0 =C2=A0 =C2=A0 344=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A078=C2=A0 =C2= =A0 =C2=A0 13074-/+ buffers/cache:=C2=A0 =C2=A0 =C2=A0 18560=C2=A0 =C2=A0 =C2=A0= 13497Swap:=C2=A0 =C2=A0 =C2=A0 =C2=A0 29999=C2=A0 =C2=A0 =C2=A0 =C2=A05098=C2= =A0 =C2=A0 =C2=A0 24901Physical Memory:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 32057 MB total, 18593= MB used, 13464 MB freeSwap Size:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2999= 9 MB total, 5098 MB used, 24901 MB freeMax free Memory for scheduling new VMs:= =C2=A0 =C2=A0 =C2=A021644.5 MB### code #####from: https://github.com/oVirt/ovi= rt-enginev3.6.0##from: D:\code\java\ovirt-engine\backend\manager\modules\dal\s= rc\main\resources\bundles\AppErrors.propertiesVAR__DETAIL__SWAP_VALUE_ILLEGAL=3D= $detailMessage its swap value was illegal##from: D:\code\java\ovirt-engine\bac= kend\manager\modules\bll\src\main\java\org\ovirt\engine\core\bll\scheduling\po= licyunits\MemoryPolicyUnit.java#-----------code--------------1#=C2=A0 =C2=A0 p= rivate boolean isVMSwapValueLegal(VDS host) {=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (!= Config.<Boolean> getValue(ConfigValues.EnableSwapCheck)) {=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return true;=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }=C2=A0 =C2=A0 (omitted..)=C2=A0 =C2=A0= =C2=A0 =C2=A0 return ((swap_total - swap_free - mem_available) * 100 / physic= al_mem_mb) <=3D Config.<Integer> getValue(ConfigValues.BlockMigrationOnSwapUsa= gePercentage)=C2=A0 =C2=A0 (omitted..)=C2=A0 =C2=A0 }#-----------code---------= -----1#if EnableSwapCheck =3D False then return True, so we can simply disable= this option? Any Suggestion?[root@engine ~]# engine-config --get BlockMigrati= onOnSwapUsagePercentageBlockMigrationOnSwapUsagePercentage: 0 version: general= so,,Config.<Integer> getValue(ConfigValues.BlockMigrationOnSwapUsagePercentage= ) =3D 0so,,(swap_total - swap_free - mem_available) * 100 / physical_mem_mb <=3D= 0so,,swap_total - swap_free - mem_available <=3D 0right?so,, if (swap_total -= swap_free) <=3D mem_available then return True else return False#-----------c= ode--------------2#=C2=A0 =C2=A0 =C2=A0 =C2=A0for (VDS vds : hosts) {=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (!isVMSwapValueLegal(vds)) {=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 log.debug("Host '{}' swap value is ille= gal", vds.getName());=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 m= essages.addMessage(vds.getId(), EngineMessage.VAR__DETAIL__SWAP_VALUE_ILLEGAL.= toString());=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 continue;=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 if (!memoryChecker.evaluate(vds, vm)) {=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 int hostAavailableMem =3D SlaValidator.getInstance().getH= ostAvailableMemoryLimit(vds);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 log.debug("Host '{}' has {} MB available. Insufficient memory to run th= e VM",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 vds.getName(),=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 hostAavailableMem);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 messages.addMessage(vds.getId(), String.format("$avai= lableMem %1$d", hostAavailableMem));=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 messages.addMessage(vds.getId(), EngineMessage.VAR__DETAIL__NOT_= ENOUGH_MEMORY.toString());=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 continue;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (omitted..)=C2=A0 =C2=A0 =C2=A0 =C2=A0 }#-----------code----= ----------2#!isVMSwapValueLegal then throw exception, right?so,, when we migra= te vm from n33 to n34, the swap status on n34 actually is:(swap_total - swap_f= ree) > mem_availableswap_used > mem_available? confused...so,, the logic is:1)= check n33: swap[passed], then memory[failed], then goto (for..continue..loop)= 2) check n34: swap[failed], then goto (for..continue..loop)If I have misunders= tood anything, please let me know.### conclusion ###1) n33 do not have enough = memory. [yes, I know that.]2) n34 memory is illegal [why and how to solve it?]= 3) what I tried:--change config: BlockMigrationOnSwapUsagePercentage[root@engi= ne ~]# engine-config --set BlockMigrationOnSwapUsagePercentage=3D75 -cver gene= ral[root@engine ~]# engine-config --get BlockMigrationOnSwapUsagePercentageBlo= ckMigrationOnSwapUsagePercentage: 75 version: generalResult: failed.--disable = EnableSwapCheckHow? Option not found from 'engine-config --list', should I upd= ate table field direct from db?--disable swap partition on hostShould I do thi= s operation?--update ovirt-engine?No useful infomation found in latest release= note, should I do this operation?### help ###any help would be appreciated.ZY= XW. Referencehttp://www.ovirt.org/Sla/FreeMemoryCalculationhttp://lists.ovirt.= org/pipermail/users/2012-November/010858.htmlhttp://lists.ovirt.org/pipermail/= users/2013-March/013201.htmlhttp://comments.gmane.org/gmane.comp.emulators.ovi= rt.user/19288http://jim.rippon.me.uk/2013/07/ovirt-testing-english-instruction= s-for.htmlHi,=C2=A0Let me simplify things.We do not allow swapping in general.= The reason is that it kills the performanceof all hosts.As you were able to s= ee in our code (0 is the default config value we have)we expect the following = expression:swap_total - swap_free - mem_available) * 100 / physical_mem_mb) <=3D= 0And in your case we see the value is > 0.This means that=C2=A0swap_total < (= swap_free+mem_available) or in generalyour host is swapping.Since the host is = swapping, we do not allow to run a VM on it.Let me know if you have any furthe= r questions.Doron ------=ALIBOUNDARY_26648_4e09c940_568341f3_65a5f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div class=3D"__aliyun_email_body_block"><div style=3D"clear: both;"><span sty= le=3D"font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; color: rgb= (0, 0, 0);">Hi <span style=3D"color: rgb(0, 0, 0); font-family: Tahoma, Arial,= STHeiti, SimSun; font-size: 14px; font-style: normal; font-variant: normal; f= ont-weight: normal; line-height: 23.324px; text-align: start; text-indent: 0px= ; text-transform: none; widows: 1; float: none; display: inline !important; ba= ckground-color: rgb(255, 255, 255);">Doron</span>,</span></div><div style=3D"c= lear: both;"><span style=3D"font-family: Tahoma, Arial, STHeiti, SimSun; font-= size: 14px; color: rgb(0, 0, 0);"><br ></span></div><div style=3D"clear: both;= "><span style=3D"font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;= color: rgb(0, 0, 0);">Thank you, I will do things like "swapoff" later.</span= style=3D"margin: 0px; padding: 0px; border: 0px; outline: 0px; color: rgb(0, = 0, 0); font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; font-styl= e: normal; font-variant: normal; font-weight: normal; line-height: 23.324px; t= ext-align: start; text-indent: 0px; text-transform: none; widows: 1; backgroun= d-color: rgb(255, 255, 255);">And in your case we see the value is > 0.</di= v><div class=3D"gmail_extra" style=3D"margin: 0px; padding: 0px; border: 0px; = outline: 0px; color: rgb(0, 0, 0); font-family: Tahoma, Arial, STHeiti, SimSun= ; font-size: 14px; font-style: normal; font-variant: normal; font-weight: norm= al; line-height: 23.324px; text-align: start; text-indent: 0px; text-transform= : none; widows: 1; background-color: rgb(255, 255, 255);">This means that = ;swap_total < (swap_free+mem_available) or in general</div><div class=3D"gm= ail_extra" style=3D"margin: 0px; padding: 0px; border: 0px; outline: 0px; colo= r: rgb(0, 0, 0); font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;= font-style: normal; font-variant: normal; font-weight: normal; line-height: 2= 3.324px; text-align: start; text-indent: 0px; text-transform: none; widows: 1;= background-color: rgb(255, 255, 255);">your host is swapping.</div><span styl= e=3D"font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; color: rgb(= 0, 0, 0);">----</span></div><div style=3D"clear: both;"><span style=3D"font-fa= mily: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; color: rgb(0, 0, 0);">#= ##data in my case:</span></div><div style=3D"clear: both;"><span style=3D"font= -family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; color: rgb(0, 0, 0);= ">[n34]<br ># free -m<br > = total &= nbsp;used free  = ; shared buffers cach= ed<br >Mem: 32057 &n= bsp; 31713 &nb= sp;344 0  = ; 78 &nb= sp;13074<br >-/+ buffers/cache: 18560&= nbsp; 13497<br >Swap: &nbs= p; 29999 5098 &= nbsp; 24901<br ><br >Physical Memory: &= nbsp; &= nbsp; 3= 2057 MB total, 18593 MB used, 13464 MB = ;free<br >Swap Size:  = ;  = ; 29999= MB total, 5098 MB used, 24901 MB free= <br >Max free Memory for scheduling new VMs:&nbs= p; 21644.5 MB</span></div><div style=3D"clear: bot= h;"><span style=3D"font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14p= x; color: rgb(0, 0, 0);">----</span></div><div style=3D"clear: both;"><span st= yle=3D"font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; color: rg= b(0, 0, 0);"><span style=3D"color: rgb(0, 0, 0); font-family: Tahoma, Arial, S= THeiti, SimSun; font-size: 14px; font-style: normal; font-variant: normal; fon= t-weight: normal; line-height: 23.324px; text-align: start; text-indent: 0px; = text-transform: none; widows: 1; float: none; display: inline !important; back= ground-color: rgb(255, 255, 255);">## formula in my case: </span></s= pan></div><div style=3D"clear: both;"><span style=3D"font-family: Tahoma, Aria= l, STHeiti, SimSun; font-size: 14px; color: rgb(0, 0, 0);"><span style=3D"colo= r: rgb(0, 0, 0); font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;= font-style: normal; font-variant: normal; font-weight: normal; line-height: 2= 3.324px; text-align: start; text-indent: 0px; text-transform: none; widows: 1;= float: none; display: inline !important; background-color: rgb(255, 255, 255)= ;"><span style=3D"color: rgb(0, 0, 0); font-family: Tahoma, Arial, STHeiti, Si= mSun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: = normal; line-height: 23.324px; text-align: start; text-indent: 0px; text-trans= form: none; widows: 1; float: none; display: inline !important; background-col= or: rgb(255, 255, 255);">swap_total - </span><span style=3D"margin: 0px; = padding: 0px; border: 0px; outline: 0px; color: rgb(0, 0, 0); font-family: Tah= oma, Arial, STHeiti, SimSun; font-size: 14px; font-style: normal; font-variant= : normal; font-weight: normal; line-height: 23.324px; text-align: start; text-= indent: 0px; text-transform: none; widows: 1; float: none; display: inline !im= portant; background-color: rgb(255, 255, 255);">swap_free > mem_availa= ble</span></span></span></div><div style=3D"clear: both;"><span style=3D"font-= family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; color: rgb(0, 0, 0);"= form: none; widows: 1; float: none; display: inline !important; background-col= or: rgb(255, 255, 255);">mem_available is </span>344 or <span = style=3D"color: rgb(0, 0, 0); font-family: Tahoma, Arial, STHeiti, SimSun; fon= t-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; l= ine-height: 23.324px; text-align: start; text-indent: 0px; text-transform: non= e; widows: 1; float: none; display: inline !important; background-color: rgb(2= 55, 255, 255);">13497 ? Obviously the former value match the fomula,= right?)</span></span></span></span></span></span></div><div style=3D"clear: b= oth;"><br ></div><div style=3D"clear: both;">2) suggestion</div><div style=3D"= clear: both;">Disable swap on ovirt host should be explicit indicated&nbs= p;in the document.(for instance: http://www.ovirt.org/OVirt_Administ= ration_Guide)</div><div style=3D"clear: both;"><span style=3D"font-family: Tah= oma, Arial, STHeiti, SimSun; font-size: 14px; color: rgb(0, 0, 0);"><br ></spa= n></div><div style=3D"clear: both;"><span style=3D"font-family: Tahoma, Arial,= STHeiti, SimSun; font-size: 14px; color: rgb(0, 0, 0);"><br ></span></div><di= v style=3D"clear: both;"><span style=3D"font-family: Tahoma, Arial, STHeiti, S= imSun; font-size: 14px; color: rgb(0, 0, 0);"><br ></span></div><blockquote st= yle=3D"margin-right: 0px; margin-top: 0px; margin-bottom: 0px;"><div style=3D"= clear: both;"><span style=3D"font-family: Tahoma, Arial, STHeiti, SimSun; font= -size: 14px; color: rgb(0, 0, 0);">-------------------------------------------= -----------------------</span></div><div style=3D"clear: both;"><span style=3D= "font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; color: rgb(0, 0= , 0);">From:Doron Fediuck <dfediuck@redhat.com></span></div><div style=3D= "clear: both;"><span style=3D"font-family: Tahoma, Arial, STHeiti, SimSun; fon= t-size: 14px; color: rgb(0, 0, 0);">Time:2015 Dec 29 (Tue) 20:40</span></div><= div style=3D"clear: both;"><span style=3D"font-family: Tahoma, Arial, STHeiti,= SimSun; font-size: 14px; color: rgb(0, 0, 0);">To:pc <pc@pcswo.com></sp= an></div><div style=3D"clear: both;"><span style=3D"font-family: Tahoma, Arial= , STHeiti, SimSun; font-size: 14px; color: rgb(0, 0, 0);">Cc:users <users@o= virt.org>, Golan, Roy <rgolan@redhat.com></span></div><div style=3D"c= lear: both;"><span style=3D"font-family: Tahoma, Arial, STHeiti, SimSun; font-= size: 14px; color: rgb(0, 0, 0);">Subject:Re: [ovirt-users] host xxx did no sa= tisfy internal filter Memory because its swap value was illegal.</span></div><= div style=3D"clear: both;"><span style=3D"font-family: Tahoma, Arial, STHeiti,= SimSun; font-size: 14px; color: rgb(0, 0, 0);"><br ></span></div><div ><br ><= div class=3D"gmail_extra"><br ><div class=3D"gmail_quote">On Tue, Dec 29, 2015= at 5:54 AM, pc <<a href=3D"mailto:pc@pcswo.com" target=3D"_blank">pc@pcswo= .com</a>> wrote:<br >[sorry, this is my first time to use mailing list, rep= ost again, with content from html to plain text]<br ><br >### Description ###<= br >1. problem<br >1) migrate vm {name:xyz001, mem(min, max) =3D (2G,4G)} from= ovirt host n33 to n34, failed.<br >2) shutting down vm {name: test001, mem(mi= n, max) =3D (1G,1G)} on n34, update test001's config: Host->Start Running O= n: Specific(n34), then start test001, while, it's running on n33.<br ><br >2. = err message<br >Error while executing action: migrate<br >[engine gui]<br >xyz= 001:<br >Cannot migrate VM. There is no host that satisfies current scheduling= constraints. See below for details:<br >The host n33 did not satisfy internal= filter Memory because has availabe 1863 MB memory. Insufficient free memory t= o run the VM.<br >The host n34 did not satisfy internal filter Memory because = its swap value was illegal.<br ><br ><br >[engine.log]<br >INFO [org.ovi= rt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] Lock Acquire= d to object 'EngineLock:{exclusiveLocks=3D'[73351885-9a92-4317-baaf-e4f2bed117= 1a=3D<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName test11>]', shar= edLocks=3D'null'}'<br >INFO [org.ovirt.engine.core.bll.scheduling.Schedu= lingManager] (default task-23) [5916aa3b] Candidate host 'n34' ('2ae3a219-ae9a= -4347-b1e2-0e100360231e') was filtered out by 'VAR__FILTERTYPE__INTERNAL' filt= er 'Memory' (correlation id: null)<br >INFO [org.ovirt.engine.core.bll.s= cheduling.SchedulingManager] (default task-23) [5916aa3b] Candidate host 'n33'= ('688aec34-5630-478e-ae5e-9d57990804e5') was filtered out by 'VAR__FILTERTYPE= __INTERNAL' filter 'Memory' (correlation id: null)<br >WARN [org.ovirt.e= ngine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] CanDoAction of a= ction 'MigrateVm' failed for user admin@internal. Reasons: VAR__ACTION__MIGRAT= E,VAR__TYPE__VM,SCHEDULING_ALL_HOSTS_FILTERED_OUT,VAR__FILTERTYPE__INTERNAL,$h= ostName n33,$filterName Memory,$availableMem 1863,VAR__DETAIL__NOT_ENOUGH_MEMO= RY,SCHEDULING_HOST_FILTERED_REASON_WITH_DETAIL,VAR__FILTERTYPE__INTERNAL,$host= Name n34,$filterName Memory,VAR__DETAIL__SWAP_VALUE_ILLEGAL,SCHEDULING_HOST_FI= LTERED_REASON_WITH_DETAIL<br >INFO [org.ovirt.engine.core.bll.MigrateVmC= ommand] (default task-23) [5916aa3b] Lock freed to object 'EngineLock:{exclusi= veLocks=3D'[73351885-9a92-4317-baaf-e4f2bed1171a=3D<VM, ACTION_TYPE_FAILED_= VM_IS_BEING_MIGRATED$VmName test11>]', sharedLocks=3D'null'}'<br ><br ><br = p-3.6.0.3-1.el6.noarch<br >ovirt-image-uploader-3.6.0-1.el6.noarch<br >ovirt-e= ngine-wildfly-8.2.0-1.el6.x86_64<br >ovirt-engine-setup-plugin-vmconsole-proxy= -helper-3.6.0.3-1.el6.noarch<br >ovirt-host-deploy-1.4.0-1.el6.noarch<br >ovir= t-engine-backend-3.6.0.3-1.el6.noarch<br >ovirt-engine-webadmin-portal-3.6.0.3= -1.el6.noarch<br >ovirt-engine-jboss-as-7.1.1-1.el6.x86_64<br >ovirt-engine-li= b-3.6.0.3-1.el6.noarch<br >ovirt-engine-setup-plugin-ovirt-engine-common-3.6.0= .3-1.el6.noarch<br >ovirt-engine-setup-plugin-ovirt-engine-3.6.0.3-1.el6.noarc= h<br >ovirt-engine-setup-plugin-websocket-proxy-3.6.0.3-1.el6.noarch<br >ovirt= -engine-sdk-python-3.6.0.3-1.el6.noarch<br >ovirt-iso-uploader-3.6.0-1.el6.noa= rch<br >ovirt-vmconsole-proxy-1.0.0-1.el6.noarch<br >ovirt-engine-extensions-a= pi-impl-3.6.0.3-1.el6.noarch<br >ovirt-engine-websocket-proxy-3.6.0.3-1.el6.no= arch<br >ovirt-engine-vmconsole-proxy-helper-3.6.0.3-1.el6.noarch<br >ebay-cor= s-filter-1.0.1-0.1.ovirt.el6.noarch<br >ovirt-host-deploy-java-1.4.0-1.el6.noa= rch<br >ovirt-engine-tools-3.6.0.3-1.el6.noarch<br >ovirt-engine-restapi-3.6.0= .3-1.el6.noarch<br >ovirt-engine-3.6.0.3-1.el6.noarch<br >ovirt-engine-extensi= on-aaa-jdbc-1.0.1-1.el6.noarch<br >ovirt-engine-cli-3.6.0.1-1.el6.noarch<br >o= virt-vmconsole-1.0.0-1.el6.noarch<br >ovirt-engine-wildfly-overlay-001-2.el6.n= oarch<br >ovirt-engine-dbscripts-3.6.0.3-1.el6.noarch<br >ovirt-engine-userpor= tal-3.6.0.3-1.el6.noarch<br >ovirt-guest-tools-iso-3.6.0-0.2_master.fc22.noarc= h<br ><br ><br >### DB ###<br >[root@engine ~]# su postgres<br >bash-4.1$ cd ~= <br >bash-4.1$ psql engine<br >engine=3D# select vds_id, physical_mem_mb, mem_= commited, vm_active, vm_count, reserved_mem, guest_overhead, transparent_hugep= ages_state, pending_vmem_size from vds_dynamic;<br >  = ; vds_id = | physical_mem_mb | mem_commited | vm_active | vm_count | reserv= ed_mem | guest_overhead | transparent_hugepages_state | pending_vmem_size<br >= --------------------------------------+-----------------+--------------+------= -----+----------+--------------+----------------+-----------------------------= +-------------------<br > 688aec34-5630-478e-ae5e-9d57990804e5 | &n= bsp; 32057 | 45836 |&nbs= p; 11 | 11 |  = ; 321 | 65 | = ; = 2 |  = ;0<br > 2ae3a219-ae9a-4347-b1e2-0e100360231e | = 32057 | 26120 | &= nbsp; 7 | 7 | &nbs= p; 321 | 65 | &nbs= p;  = ;2 | 0<br >(2 row= s)<br ><br ><br ><br >### memory ###<br >[n33]<br ># free -m<br > = total used = free shared buffers = cached<br >Mem: 32057 &nbs= p; 31770 287 &nbs= p; 0 41 6347<br >-/= + buffers/cache: 25381 6676<br >= Swap: 29999 10025 = 19974<br ><br >Physical Memory:  = ; 32057 MB total, 2564= 6 MB used, 6411 MB free<br >Swap Size:  = ; = 29999 MB total, 10025 MB used, 19974 MB free<br >Max free Memory for scheduli= ng new VMs: 1928.5 MB<br ><br ><br >[n34]<br ># free -m<br = p; 0 78 130= 74<br >-/+ buffers/cache: 18560 13497<= br >Swap: 29999 5098 = ; 24901<br ><br >Physical Memory: &nb= sp; 32057 MB to= tal, 18593 MB used, 13464 MB free<br >Swap Size: &n= bsp; &nb= sp; 29999 MB total, 5098 MB used, 24901 MB free<br >Max free Memory for= scheduling new VMs: 21644.5 MB<br ><br ><br ><br >### code= ###<br >##from: <a href=3D"https://github.com/oVirt/ovirt-engine" target=3D"_= blank">https://github.com/oVirt/ovirt-engine</a><br >v3.6.0<br ><br >##from: D= :\code\java\ovirt-engine\backend\manager\modules\dal\src\main\resources\bundle= s\AppErrors.properties<br >VAR__DETAIL__SWAP_VALUE_ILLEGAL=3D$detailMessage it= s swap value was illegal<br ><br >##from: D:\code\java\ovirt-engine\backend\ma= nager\modules\bll\src\main\java\org\ovirt\engine\core\bll\scheduling\policyuni= ts\MemoryPolicyUnit.java<br >#-----------code--------------1#<br >  = ; private boolean isVMSwapValueLegal(VDS host) {<br > &nbs= p; if (!Config.<Boolean> getValue(ConfigValues.EnableSwapCheck)) {<br >&= nbsp; return tr= ue;<br > }<br > &= nbsp; (omitted..)<br > return ((swap_total - swap_f= ree - mem_available) * 100 / physical_mem_mb) <=3D Config.<Integer> g= etValue(ConfigValues.BlockMigrationOnSwapUsagePercentage)<br > (o= mitted..)<br > }<br >#-----------code--------------1#<br >if Enab= leSwapCheck =3D False then return True, so we can simply disable this option? = Any Suggestion?<br ><br >[root@engine ~]# engine-config --get BlockMigrationOn= SwapUsagePercentage<br >BlockMigrationOnSwapUsagePercentage: 0 version: genera= l<br ><br >so,,<br >Config.<Integer> getValue(ConfigValues.BlockMigratio= nOnSwapUsagePercentage) =3D 0<br >so,,<br >(swap_total - swap_free - mem_avail= able) * 100 / physical_mem_mb <=3D 0<br >so,,<br >swap_total - swap_free - = mem_available <=3D 0<br >right?<br >so,, if (swap_total - swap_free) <=3D= mem_available then return True else return False<br ><br ><br >#-----------co= de--------------2#<br > for (VDS vds : hosts) {<br >= if (!isVMSwapValueLegal(vds)) {<br >= log.debug("Host '{}' s= wap value is illegal", vds.getName());<br > = messages.addMessage(vds.getId(), EngineMessage.VAR__DETAI= L__SWAP_VALUE_ILLEGAL.toString());<br > &nbs= p; continue;<br > }<br = p; vds.getName(= ),<br > &= nbsp; hostAavailableMem);<br > = messages.addMessage(vds.getId(), String.format("$availableMem %= 1$d", hostAavailableMem));<br >  = ; messages.addMessage(vds.getId(), EngineMessage.VAR__DETAIL__NOT_ENOUG= H_MEMORY.toString());<br > &nb= sp; continue;<br > }<br >  = ; (omitted..)<br > }<br= p_used > mem_available? confused...<br ><br >so,, the logic is:<br >1) chec= k n33: swap[passed], then memory[failed], then goto (for..continue..loop)<br >= 2) check n34: swap[failed], then goto (for..continue..loop)<br ><br >If I have= misunderstood anything, please let me know.<br ><br ><br ><br >### conclusion= ###<br >1) n33 do not have enough memory. [yes, I know that.]<br >2) n34 memo= ry is illegal [why and how to solve it?]<br >3) what I tried:<br >--change con= fig: BlockMigrationOnSwapUsagePercentage<br >[root@engine ~]# engine-config --= set BlockMigrationOnSwapUsagePercentage=3D75 -cver general<br >[root@engine ~]= # engine-config --get BlockMigrationOnSwapUsagePercentage<br >BlockMigrationOn= SwapUsagePercentage: 75 version: general<br ><br >Result: failed.<br ><br >--d= isable EnableSwapCheck<br >How? Option not found from 'engine-config --list', = should I update table field direct from db?<br ><br ><br >--disable swap parti= tion on host<br >Should I do this operation?<br ><br >--update ovirt-engine?<b= r >No useful infomation found in latest release note, should I do this operati= on?<br ><br ><br >### help ###<br >any help would be appreciated.<br ><br >ZYX= W. Reference<br ><a href=3D"http://www.ovirt.org/Sla/FreeMemoryCalculation" ta= rget=3D"_blank">http://www.ovirt.org/Sla/FreeMemoryCalculation</a><br ><a href= =3D"http://lists.ovirt.org/pipermail/users/2012-November/010858.html" target=3D= "_blank">http://lists.ovirt.org/pipermail/users/2012-November/010858.html</a><= br ><a href=3D"http://lists.ovirt.org/pipermail/users/2013-March/013201.html" = target=3D"_blank">http://lists.ovirt.org/pipermail/users/2013-March/013201.htm= l</a><br ><a href=3D"http://comments.gmane.org/gmane.comp.emulators.ovirt.user= /19288" target=3D"_blank">http://comments.gmane.org/gmane.comp.emulators.ovirt= .user/19288</a><br ><a href=3D"http://jim.rippon.me.uk/2013/07/ovirt-testing-e= nglish-instructions-for.html" target=3D"_blank">http://jim.rippon.me.uk/2013/0= 7/ovirt-testing-english-instructions-for.html</a><br ><br ><div ><br ></div><d= iv >Hi, </div><div >Let me simplify things.</div><div ><br ></div><div >W= e do not allow swapping in general. The reason is that it kills the performanc= e</div><div >of all hosts.</div><div ><br ></div><div >As you were able to see= in our code (0 is the default config value we have)</div><div >we expect the = following expression:</div><div ><br ></div><div >swap_total - swap_free - mem= _available) * 100 / physical_mem_mb) <=3D 0<br ><br ></div></div>And in you= r case we see the value is > 0.</div><div class=3D"gmail_extra">This means = that swap_total < (swap_free+mem_available) or in general</div><div cl= ass=3D"gmail_extra">your host is swapping.</div><div class=3D"gmail_extra"><br=
</div><div class=3D"gmail_extra">Since the host is swapping, we do not allow= to run a VM on it.</div><div class=3D"gmail_extra"><br ></div><div class=3D"g= mail_extra">Let me know if you have any further questions.</div><div class=3D"= gmail_extra">Doron</div></div></blockquote><div ><br ></div></div> ------=ALIBOUNDARY_26648_4e09c940_568341f3_65a5f--

Hi Doron, [repost...I forgot to change html to plain test again when I replied a few hours ago...sorry about the format..] Thank you, I disabled swap on hosts, and migrated 2 vms from n33 to n34 an hour ago, everything's fine. 1) Just a little confused about how to caculate the value. ###and I quote, ---- And in your case we see the value is > 0. This means that swap_total < (swap_free+mem_available) or in general your host is swapping. ---- ###data in my case: [n34] # free -m total used free shared buffers cached Mem: 32057 31713 344 0 78 13074 -/+ buffers/cache: 18560 13497 Swap: 29999 5098 24901 Physical Memory: 32057 MB total, 18593 MB used, 13464 MB free Swap Size: 29999 MB total, 5098 MB used, 24901 MB free Max free Memory for scheduling new VMs: 21644.5 MB ---- ## formula in my case: swap_total - swap_free > mem_available ## substituting => swap_total = 29999, swap_free = 24901, mem_available = ? (mem_available is 344 or 13497 ? Obviously the former value match the fomula, right?) 2) suggestion Disable swap on ovirt host should be explicit indicated in the document.(for instance: http://www.ovirt.org/OVirt_Administration_Guide) ------------------------------------------------------------------ From:Doron Fediuck <dfediuck@redhat.com> Time:2015 Dec 29 (Tue) 20:40 To:pc <pc@pcswo.com> Cc:users <users@ovirt.org>, Golan, Roy <rgolan@redhat.com> Subject:Re: [ovirt-users] host xxx did no satisfy internal filter Memory because its swap value was illegal. On Tue, Dec 29, 2015 at 5:54 AM, pc <pc@pcswo.com> wrote: [sorry, this is my first time to use mailing list, repost again, with content from html to plain text] ### Description ### 1. problem 1) migrate vm {name:xyz001, mem(min, max) = (2G,4G)} from ovirt host n33 to n34, failed. 2) shutting down vm {name: test001, mem(min, max) = (1G,1G)} on n34, update test001's config: Host->Start Running On: Specific(n34), then start test001, while, it's running on n33. 2. err message Error while executing action: migrate [engine gui] xyz001: Cannot migrate VM. There is no host that satisfies current scheduling constraints. See below for details: The host n33 did not satisfy internal filter Memory because has availabe 1863 MB memory. Insufficient free memory to run the VM. The host n34 did not satisfy internal filter Memory because its swap value was illegal. [engine.log] INFO [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] Lock Acquired to object 'EngineLock:{exclusiveLocks='[73351885-9a92-4317-baaf-e4f2bed1171a=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName test11>]', sharedLocks='null'}' INFO [org.ovirt.engine.core.bll.scheduling.SchedulingManager] (default task-23) [5916aa3b] Candidate host 'n34' ('2ae3a219-ae9a-4347-b1e2-0e100360231e') was filtered out by 'VAR__FILTERTYPE__INTERNAL' filter 'Memory' (correlation id: null) INFO [org.ovirt.engine.core.bll.scheduling.SchedulingManager] (default task-23) [5916aa3b] Candidate host 'n33' ('688aec34-5630-478e-ae5e-9d57990804e5') was filtered out by 'VAR__FILTERTYPE__INTERNAL' filter 'Memory' (correlation id: null) WARN [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] CanDoAction of action 'MigrateVm' failed for user admin@internal. Reasons: VAR__ACTION__MIGRATE,VAR__TYPE__VM,SCHEDULING_ALL_HOSTS_FILTERED_OUT,VAR__FILTERTYPE__INTERNAL,$hostName n33,$filterName Memory,$availableMem 1863,VAR__DETAIL__NOT_ENOUGH_MEMORY,SCHEDULING_HOST_FILTERED_REASON_WITH_DETAIL,VAR__FILTERTYPE__INTERNAL,$hostName n34,$filterName Memory,VAR__DETAIL__SWAP_VALUE_ILLEGAL,SCHEDULING_HOST_FILTERED_REASON_WITH_DETAIL INFO [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] Lock freed to object 'EngineLock:{exclusiveLocks='[73351885-9a92-4317-baaf-e4f2bed1171a=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName test11>]', sharedLocks='null'}' 3. DC Compatibility Version: 3.5 4. Cluster Memory Optimization: For Server Load - Allow scheduling of 150% of physical memory Memory Balloon: Enable Memory Balloon Optimization Enable KSM: Share memory pages across all available memory (best KSM effectivness) 5. HOST name: n33, n34 mem: 32G 6. VM [n33] 11 vms (min, max) = (2G,4G) = 8 (min, max) = (2G,8G) = 1 (min, max) = (2G,2G) = 2 total: 22G/44G [n34] 7 vms (min, max) = (0.5G,1G) = 1 (min, max) = (1G,2G) = 1 (min, max) = (2G,2G) = 1 (min, max) = (2G,4G) = 3 (min, max) = (8G,8G) = 1 total: 17.5G/25G -------------------------------------------- (min, max) = (2G,4G) stands for: Memory Size: 4G Physical Memory Guaranteed: 2G Memory Balloon Device Enabled: checked -------------------------------------------- 7. rpm version [root@n33 ~]# rpm -qa |grep vdsm vdsm-yajsonrpc-4.16.27-0.el6.noarch vdsm-jsonrpc-4.16.27-0.el6.noarch vdsm-cli-4.16.27-0.el6.noarch vdsm-python-zombiereaper-4.16.27-0.el6.noarch vdsm-xmlrpc-4.16.27-0.el6.noarch vdsm-python-4.16.27-0.el6.noarch vdsm-4.16.27-0.el6.x86_64 [root@engine ~]# rpm -qa |grep ovirt ovirt-release36-001-2.noarch ovirt-engine-setup-base-3.6.0.3-1.el6.noarch ovirt-engine-setup-3.6.0.3-1.el6.noarch ovirt-image-uploader-3.6.0-1.el6.noarch ovirt-engine-wildfly-8.2.0-1.el6.x86_64 ovirt-engine-setup-plugin-vmconsole-proxy-helper-3.6.0.3-1.el6.noarch ovirt-host-deploy-1.4.0-1.el6.noarch ovirt-engine-backend-3.6.0.3-1.el6.noarch ovirt-engine-webadmin-portal-3.6.0.3-1.el6.noarch ovirt-engine-jboss-as-7.1.1-1.el6.x86_64 ovirt-engine-lib-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-ovirt-engine-common-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-ovirt-engine-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-websocket-proxy-3.6.0.3-1.el6.noarch ovirt-engine-sdk-python-3.6.0.3-1.el6.noarch ovirt-iso-uploader-3.6.0-1.el6.noarch ovirt-vmconsole-proxy-1.0.0-1.el6.noarch ovirt-engine-extensions-api-impl-3.6.0.3-1.el6.noarch ovirt-engine-websocket-proxy-3.6.0.3-1.el6.noarch ovirt-engine-vmconsole-proxy-helper-3.6.0.3-1.el6.noarch ebay-cors-filter-1.0.1-0.1.ovirt.el6.noarch ovirt-host-deploy-java-1.4.0-1.el6.noarch ovirt-engine-tools-3.6.0.3-1.el6.noarch ovirt-engine-restapi-3.6.0.3-1.el6.noarch ovirt-engine-3.6.0.3-1.el6.noarch ovirt-engine-extension-aaa-jdbc-1.0.1-1.el6.noarch ovirt-engine-cli-3.6.0.1-1.el6.noarch ovirt-vmconsole-1.0.0-1.el6.noarch ovirt-engine-wildfly-overlay-001-2.el6.noarch ovirt-engine-dbscripts-3.6.0.3-1.el6.noarch ovirt-engine-userportal-3.6.0.3-1.el6.noarch ovirt-guest-tools-iso-3.6.0-0.2_master.fc22.noarch ### DB ### [root@engine ~]# su postgres bash-4.1$ cd ~ bash-4.1$ psql engine engine=# select vds_id, physical_mem_mb, mem_commited, vm_active, vm_count, reserved_mem, guest_overhead, transparent_hugepages_state, pending_vmem_size from vds_dynamic; vds_id | physical_mem_mb | mem_commited | vm_active | vm_count | reserved_mem | guest_overhead | transparent_hugepages_state | pending_vmem_size --------------------------------------+-----------------+--------------+-----------+----------+--------------+----------------+-----------------------------+------------------- 688aec34-5630-478e-ae5e-9d57990804e5 | 32057 | 45836 | 11 | 11 | 321 | 65 | 2 | 0 2ae3a219-ae9a-4347-b1e2-0e100360231e | 32057 | 26120 | 7 | 7 | 321 | 65 | 2 | 0 (2 rows) ### memory ### [n33] # free -m total used free shared buffers cached Mem: 32057 31770 287 0 41 6347 -/+ buffers/cache: 25381 6676 Swap: 29999 10025 19974 Physical Memory: 32057 MB total, 25646 MB used, 6411 MB free Swap Size: 29999 MB total, 10025 MB used, 19974 MB free Max free Memory for scheduling new VMs: 1928.5 MB [n34] # free -m total used free shared buffers cached Mem: 32057 31713 344 0 78 13074 -/+ buffers/cache: 18560 13497 Swap: 29999 5098 24901 Physical Memory: 32057 MB total, 18593 MB used, 13464 MB free Swap Size: 29999 MB total, 5098 MB used, 24901 MB free Max free Memory for scheduling new VMs: 21644.5 MB ### code ### ##from: https://github.com/oVirt/ovirt-engine v3.6.0 ##from: D:\code\java\ovirt-engine\backend\manager\modules\dal\src\main\resources\bundles\AppErrors.properties VAR__DETAIL__SWAP_VALUE_ILLEGAL=$detailMessage its swap value was illegal ##from: D:\code\java\ovirt-engine\backend\manager\modules\bll\src\main\java\org\ovirt\engine\core\bll\scheduling\policyunits\MemoryPolicyUnit.java #-----------code--------------1# private boolean isVMSwapValueLegal(VDS host) { if (!Config.<Boolean> getValue(ConfigValues.EnableSwapCheck)) { return true; } (omitted..) return ((swap_total - swap_free - mem_available) * 100 / physical_mem_mb) <= Config.<Integer> getValue(ConfigValues.BlockMigrationOnSwapUsagePercentage) (omitted..) } #-----------code--------------1# if EnableSwapCheck = False then return True, so we can simply disable this option? Any Suggestion? [root@engine ~]# engine-config --get BlockMigrationOnSwapUsagePercentage BlockMigrationOnSwapUsagePercentage: 0 version: general so,, Config.<Integer> getValue(ConfigValues.BlockMigrationOnSwapUsagePercentage) = 0 so,, (swap_total - swap_free - mem_available) * 100 / physical_mem_mb <= 0 so,, swap_total - swap_free - mem_available <= 0 right? so,, if (swap_total - swap_free) <= mem_available then return True else return False #-----------code--------------2# for (VDS vds : hosts) { if (!isVMSwapValueLegal(vds)) { log.debug("Host '{}' swap value is illegal", vds.getName()); messages.addMessage(vds.getId(), EngineMessage.VAR__DETAIL__SWAP_VALUE_ILLEGAL.toString()); continue; } if (!memoryChecker.evaluate(vds, vm)) { int hostAavailableMem = SlaValidator.getInstance().getHostAvailableMemoryLimit(vds); log.debug("Host '{}' has {} MB available. Insufficient memory to run the VM", vds.getName(), hostAavailableMem); messages.addMessage(vds.getId(), String.format("$availableMem %1$d", hostAavailableMem)); messages.addMessage(vds.getId(), EngineMessage.VAR__DETAIL__NOT_ENOUGH_MEMORY.toString()); continue; } (omitted..) } #-----------code--------------2# !isVMSwapValueLegal then throw exception, right? so,, when we migrate vm from n33 to n34, the swap status on n34 actually is: (swap_total - swap_free) > mem_available swap_used > mem_available? confused... so,, the logic is: 1) check n33: swap[passed], then memory[failed], then goto (for..continue..loop) 2) check n34: swap[failed], then goto (for..continue..loop) If I have misunderstood anything, please let me know. ### conclusion ### 1) n33 do not have enough memory. [yes, I know that.] 2) n34 memory is illegal [why and how to solve it?] 3) what I tried: --change config: BlockMigrationOnSwapUsagePercentage [root@engine ~]# engine-config --set BlockMigrationOnSwapUsagePercentage=75 -cver general [root@engine ~]# engine-config --get BlockMigrationOnSwapUsagePercentage BlockMigrationOnSwapUsagePercentage: 75 version: general Result: failed. --disable EnableSwapCheck How? Option not found from 'engine-config --list', should I update table field direct from db? --disable swap partition on host Should I do this operation? --update ovirt-engine? No useful infomation found in latest release note, should I do this operation? ### help ### any help would be appreciated. ZYXW. Reference http://www.ovirt.org/Sla/FreeMemoryCalculation http://lists.ovirt.org/pipermail/users/2012-November/010858.html http://lists.ovirt.org/pipermail/users/2013-March/013201.html http://comments.gmane.org/gmane.comp.emulators.ovirt.user/19288 http://jim.rippon.me.uk/2013/07/ovirt-testing-english-instructions-for.html Hi, Let me simplify things. We do not allow swapping in general. The reason is that it kills the performance of all hosts. As you were able to see in our code (0 is the default config value we have) we expect the following expression: swap_total - swap_free - mem_available) * 100 / physical_mem_mb) <= 0 And in your case we see the value is > 0. This means that swap_total < (swap_free+mem_available) or in general your host is swapping. Since the host is swapping, we do not allow to run a VM on it. Let me know if you have any further questions. Doron

Hi, Glad to hear all is well now. Just to recap regarding your question; All the values you mention are measured for every scheduling decision. The conclusion I gave you is based on the code. The actual numbers may vary so unless you check the values while the scheduler is working, every number we use is an approximation and it's hard to provide an exact numeric result other than the formula. Take care and happy new year, Doron On Wed, Dec 30, 2015 at 9:02 AM, pc <pc@pcswo.com> wrote:
Hi Doron, [repost...I forgot to change html to plain test again when I replied a few hours ago...sorry about the format..]
Thank you, I disabled swap on hosts, and migrated 2 vms from n33 to n34 an hour ago, everything's fine.
1) Just a little confused about how to caculate the value. ###and I quote, ---- And in your case we see the value is > 0. This means that swap_total < (swap_free+mem_available) or in general your host is swapping. ---- ###data in my case: [n34] # free -m total used free shared buffers cached Mem: 32057 31713 344 0 78 13074 -/+ buffers/cache: 18560 13497 Swap: 29999 5098 24901
Physical Memory: 32057 MB total, 18593 MB used, 13464 MB free Swap Size: 29999 MB total, 5098 MB used, 24901 MB free Max free Memory for scheduling new VMs: 21644.5 MB ---- ## formula in my case: swap_total - swap_free > mem_available ## substituting => swap_total = 29999, swap_free = 24901, mem_available = ? (mem_available is 344 or 13497 ? Obviously the former value match the fomula, right?)
2) suggestion Disable swap on ovirt host should be explicit indicated in the document.(for instance: http://www.ovirt.org/OVirt_Administration_Guide)
------------------------------------------------------------------ From:Doron Fediuck <dfediuck@redhat.com> Time:2015 Dec 29 (Tue) 20:40 To:pc <pc@pcswo.com> Cc:users <users@ovirt.org>, Golan, Roy <rgolan@redhat.com> Subject:Re: [ovirt-users] host xxx did no satisfy internal filter Memory because its swap value was illegal.
On Tue, Dec 29, 2015 at 5:54 AM, pc <pc@pcswo.com> wrote: [sorry, this is my first time to use mailing list, repost again, with content from html to plain text]
### Description ### 1. problem 1) migrate vm {name:xyz001, mem(min, max) = (2G,4G)} from ovirt host n33 to n34, failed. 2) shutting down vm {name: test001, mem(min, max) = (1G,1G)} on n34, update test001's config: Host->Start Running On: Specific(n34), then start test001, while, it's running on n33.
2. err message Error while executing action: migrate [engine gui] xyz001: Cannot migrate VM. There is no host that satisfies current scheduling constraints. See below for details: The host n33 did not satisfy internal filter Memory because has availabe 1863 MB memory. Insufficient free memory to run the VM. The host n34 did not satisfy internal filter Memory because its swap value was illegal.
[engine.log] INFO [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] Lock Acquired to object 'EngineLock:{exclusiveLocks='[73351885-9a92-4317-baaf-e4f2bed1171a=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName test11>]', sharedLocks='null'}' INFO [org.ovirt.engine.core.bll.scheduling.SchedulingManager] (default task-23) [5916aa3b] Candidate host 'n34' ('2ae3a219-ae9a-4347-b1e2-0e100360231e') was filtered out by 'VAR__FILTERTYPE__INTERNAL' filter 'Memory' (correlation id: null) INFO [org.ovirt.engine.core.bll.scheduling.SchedulingManager] (default task-23) [5916aa3b] Candidate host 'n33' ('688aec34-5630-478e-ae5e-9d57990804e5') was filtered out by 'VAR__FILTERTYPE__INTERNAL' filter 'Memory' (correlation id: null) WARN [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] CanDoAction of action 'MigrateVm' failed for user admin@internal. Reasons: VAR__ACTION__MIGRATE,VAR__TYPE__VM,SCHEDULING_ALL_HOSTS_FILTERED_OUT,VAR__FILTERTYPE__INTERNAL,$hostName n33,$filterName Memory,$availableMem 1863,VAR__DETAIL__NOT_ENOUGH_MEMORY,SCHEDULING_HOST_FILTERED_REASON_WITH_DETAIL,VAR__FILTERTYPE__INTERNAL,$hostName n34,$filterName Memory,VAR__DETAIL__SWAP_VALUE_ILLEGAL,SCHEDULING_HOST_FILTERED_REASON_WITH_DETAIL INFO [org.ovirt.engine.core.bll.MigrateVmCommand] (default task-23) [5916aa3b] Lock freed to object 'EngineLock:{exclusiveLocks='[73351885-9a92-4317-baaf-e4f2bed1171a=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName test11>]', sharedLocks='null'}'
3. DC Compatibility Version: 3.5
4. Cluster Memory Optimization: For Server Load - Allow scheduling of 150% of physical memory Memory Balloon: Enable Memory Balloon Optimization Enable KSM: Share memory pages across all available memory (best KSM effectivness)
5. HOST name: n33, n34 mem: 32G
6. VM [n33] 11 vms (min, max) = (2G,4G) = 8 (min, max) = (2G,8G) = 1 (min, max) = (2G,2G) = 2 total: 22G/44G
[n34] 7 vms (min, max) = (0.5G,1G) = 1 (min, max) = (1G,2G) = 1 (min, max) = (2G,2G) = 1 (min, max) = (2G,4G) = 3 (min, max) = (8G,8G) = 1 total: 17.5G/25G -------------------------------------------- (min, max) = (2G,4G) stands for: Memory Size: 4G Physical Memory Guaranteed: 2G Memory Balloon Device Enabled: checked --------------------------------------------
7. rpm version [root@n33 ~]# rpm -qa |grep vdsm vdsm-yajsonrpc-4.16.27-0.el6.noarch vdsm-jsonrpc-4.16.27-0.el6.noarch vdsm-cli-4.16.27-0.el6.noarch vdsm-python-zombiereaper-4.16.27-0.el6.noarch vdsm-xmlrpc-4.16.27-0.el6.noarch vdsm-python-4.16.27-0.el6.noarch vdsm-4.16.27-0.el6.x86_64
[root@engine ~]# rpm -qa |grep ovirt ovirt-release36-001-2.noarch ovirt-engine-setup-base-3.6.0.3-1.el6.noarch ovirt-engine-setup-3.6.0.3-1.el6.noarch ovirt-image-uploader-3.6.0-1.el6.noarch ovirt-engine-wildfly-8.2.0-1.el6.x86_64 ovirt-engine-setup-plugin-vmconsole-proxy-helper-3.6.0.3-1.el6.noarch ovirt-host-deploy-1.4.0-1.el6.noarch ovirt-engine-backend-3.6.0.3-1.el6.noarch ovirt-engine-webadmin-portal-3.6.0.3-1.el6.noarch ovirt-engine-jboss-as-7.1.1-1.el6.x86_64 ovirt-engine-lib-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-ovirt-engine-common-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-ovirt-engine-3.6.0.3-1.el6.noarch ovirt-engine-setup-plugin-websocket-proxy-3.6.0.3-1.el6.noarch ovirt-engine-sdk-python-3.6.0.3-1.el6.noarch ovirt-iso-uploader-3.6.0-1.el6.noarch ovirt-vmconsole-proxy-1.0.0-1.el6.noarch ovirt-engine-extensions-api-impl-3.6.0.3-1.el6.noarch ovirt-engine-websocket-proxy-3.6.0.3-1.el6.noarch ovirt-engine-vmconsole-proxy-helper-3.6.0.3-1.el6.noarch ebay-cors-filter-1.0.1-0.1.ovirt.el6.noarch ovirt-host-deploy-java-1.4.0-1.el6.noarch ovirt-engine-tools-3.6.0.3-1.el6.noarch ovirt-engine-restapi-3.6.0.3-1.el6.noarch ovirt-engine-3.6.0.3-1.el6.noarch ovirt-engine-extension-aaa-jdbc-1.0.1-1.el6.noarch ovirt-engine-cli-3.6.0.1-1.el6.noarch ovirt-vmconsole-1.0.0-1.el6.noarch ovirt-engine-wildfly-overlay-001-2.el6.noarch ovirt-engine-dbscripts-3.6.0.3-1.el6.noarch ovirt-engine-userportal-3.6.0.3-1.el6.noarch ovirt-guest-tools-iso-3.6.0-0.2_master.fc22.noarch
### DB ### [root@engine ~]# su postgres bash-4.1$ cd ~ bash-4.1$ psql engine engine=# select vds_id, physical_mem_mb, mem_commited, vm_active, vm_count, reserved_mem, guest_overhead, transparent_hugepages_state, pending_vmem_size from vds_dynamic; vds_id | physical_mem_mb | mem_commited | vm_active | vm_count | reserved_mem | guest_overhead | transparent_hugepages_state | pending_vmem_size
--------------------------------------+-----------------+--------------+-----------+----------+--------------+----------------+-----------------------------+------------------- 688aec34-5630-478e-ae5e-9d57990804e5 | 32057 | 45836 | 11 | 11 | 321 | 65 | 2 | 0 2ae3a219-ae9a-4347-b1e2-0e100360231e | 32057 | 26120 | 7 | 7 | 321 | 65 | 2 | 0 (2 rows)
### memory ### [n33] # free -m total used free shared buffers cached Mem: 32057 31770 287 0 41 6347 -/+ buffers/cache: 25381 6676 Swap: 29999 10025 19974
Physical Memory: 32057 MB total, 25646 MB used, 6411 MB free Swap Size: 29999 MB total, 10025 MB used, 19974 MB free Max free Memory for scheduling new VMs: 1928.5 MB
[n34] # free -m total used free shared buffers cached Mem: 32057 31713 344 0 78 13074 -/+ buffers/cache: 18560 13497 Swap: 29999 5098 24901
Physical Memory: 32057 MB total, 18593 MB used, 13464 MB free Swap Size: 29999 MB total, 5098 MB used, 24901 MB free Max free Memory for scheduling new VMs: 21644.5 MB
### code ### ##from: https://github.com/oVirt/ovirt-engine v3.6.0
##from: D:\code\java\ovirt-engine\backend\manager\modules\dal\src\main\resources\bundles\AppErrors.properties VAR__DETAIL__SWAP_VALUE_ILLEGAL=$detailMessage its swap value was illegal
##from: D:\code\java\ovirt-engine\backend\manager\modules\bll\src\main\java\org\ovirt\engine\core\bll\scheduling\policyunits\MemoryPolicyUnit.java #-----------code--------------1# private boolean isVMSwapValueLegal(VDS host) { if (!Config.<Boolean> getValue(ConfigValues.EnableSwapCheck)) { return true; } (omitted..) return ((swap_total - swap_free - mem_available) * 100 / physical_mem_mb) <= Config.<Integer> getValue(ConfigValues.BlockMigrationOnSwapUsagePercentage) (omitted..) } #-----------code--------------1# if EnableSwapCheck = False then return True, so we can simply disable this option? Any Suggestion?
[root@engine ~]# engine-config --get BlockMigrationOnSwapUsagePercentage BlockMigrationOnSwapUsagePercentage: 0 version: general
so,, Config.<Integer> getValue(ConfigValues.BlockMigrationOnSwapUsagePercentage) = 0 so,, (swap_total - swap_free - mem_available) * 100 / physical_mem_mb <= 0 so,, swap_total - swap_free - mem_available <= 0 right? so,, if (swap_total - swap_free) <= mem_available then return True else return False
#-----------code--------------2# for (VDS vds : hosts) { if (!isVMSwapValueLegal(vds)) { log.debug("Host '{}' swap value is illegal", vds.getName()); messages.addMessage(vds.getId(), EngineMessage.VAR__DETAIL__SWAP_VALUE_ILLEGAL.toString()); continue; } if (!memoryChecker.evaluate(vds, vm)) { int hostAavailableMem = SlaValidator.getInstance().getHostAvailableMemoryLimit(vds); log.debug("Host '{}' has {} MB available. Insufficient memory to run the VM", vds.getName(), hostAavailableMem); messages.addMessage(vds.getId(), String.format("$availableMem %1$d", hostAavailableMem)); messages.addMessage(vds.getId(), EngineMessage.VAR__DETAIL__NOT_ENOUGH_MEMORY.toString()); continue; } (omitted..) }
#-----------code--------------2# !isVMSwapValueLegal then throw exception, right? so,, when we migrate vm from n33 to n34, the swap status on n34 actually is: (swap_total - swap_free) > mem_available
swap_used > mem_available? confused...
so,, the logic is: 1) check n33: swap[passed], then memory[failed], then goto (for..continue..loop) 2) check n34: swap[failed], then goto (for..continue..loop)
If I have misunderstood anything, please let me know.
### conclusion ### 1) n33 do not have enough memory. [yes, I know that.] 2) n34 memory is illegal [why and how to solve it?] 3) what I tried: --change config: BlockMigrationOnSwapUsagePercentage [root@engine ~]# engine-config --set BlockMigrationOnSwapUsagePercentage=75 -cver general [root@engine ~]# engine-config --get BlockMigrationOnSwapUsagePercentage BlockMigrationOnSwapUsagePercentage: 75 version: general
Result: failed.
--disable EnableSwapCheck How? Option not found from 'engine-config --list', should I update table field direct from db?
--disable swap partition on host Should I do this operation?
--update ovirt-engine? No useful infomation found in latest release note, should I do this operation?
### help ### any help would be appreciated.
ZYXW. Reference http://www.ovirt.org/Sla/FreeMemoryCalculation http://lists.ovirt.org/pipermail/users/2012-November/010858.html http://lists.ovirt.org/pipermail/users/2013-March/013201.html http://comments.gmane.org/gmane.comp.emulators.ovirt.user/19288 http://jim.rippon.me.uk/2013/07/ovirt-testing-english-instructions-for.html
Hi, Let me simplify things.
We do not allow swapping in general. The reason is that it kills the performance of all hosts.
As you were able to see in our code (0 is the default config value we have) we expect the following expression:
swap_total - swap_free - mem_available) * 100 / physical_mem_mb) <= 0
And in your case we see the value is > 0. This means that swap_total < (swap_free+mem_available) or in general your host is swapping.
Since the host is swapping, we do not allow to run a VM on it.
Let me know if you have any further questions. Doron
participants (2)
-
Doron Fediuck
-
pc