[Users] Question about: Host swap percentage is above the defined threshold.

Itamar Heim iheim at redhat.com
Fri Nov 30 11:17:24 UTC 2012


On 11/29/2012 09:17 PM, Daniel Rowe wrote:
> Hi
>
> I currently have a one node ovirt setup I am migrating VMs to.
>
> I have reached a point where trying to start new VMs I get:
>
> Error while executing action: Cannot run VM. Host swap percentage is
> above the defined threshold.
> - Check your configuration parameters for Host Swap Percentage.
>
> Adjusting the BlockMigrationOnSwapUsagePercentage setting seems to do nothing.
>
> The node does have lots of free RAM and is current sitting at 68%.
>
> The node is a full fedora 17 minimal install and does have a large
> swap partition on fast 15k SAS disks and 48gig of RAM.
>
> So why is changing the BlockMigrationOnSwapUsagePercentage not doing
> anything and how do it get more VMs running?
>
> I need to over commit a bit but will be adding a new identical node to
> spread the load once I get all the VMs off the machine I am migrating
> from.
>
> I also notice the "Shared Memory" value is 0% why is this so? Do I
> need to set something to get same page sharing?
>
> Thanks for any advice.
>
> Regards
> Daniel
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>


code snippet below if you care to run the numbers.
code also suggest you can disable the swap check via config.


if (!isVMSwapValueLegal(vds)) {
	sb.append("swap value is illegal");
         return VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_SWAP;
}

private static boolean isVMSwapValueLegal(VDS vds) {
	if (!Config.<Boolean> GetValue(ConfigValues.EnableSwapCheck)) {
             return true;
         }

         if (vds.getswap_total() == null || vds.getswap_free() == null 
|| vds.getmem_available() == null
                 || vds.getmem_available() <= 0 || 
vds.getphysical_mem_mb() == null || vds.getphysical_mem_mb() <= 0) {
             return true;
         }

         long swap_total = vds.getswap_total();
         long swap_free = vds.getswap_free();
         long mem_available = vds.getmem_available();
         long physical_mem_mb = vds.getphysical_mem_mb();

         return ((swap_total - swap_free - mem_available) * 100 / 
physical_mem_mb) <= Config
                 .<Integer> 
GetValue(ConfigValues.BlockMigrationOnSwapUsagePercentage);
     }



More information about the Users mailing list