CS-16118 : LoadTest - Average VM deployment time is still very high compared to 2.2.14. It is more than double the time it took during 2.2.14.

Skipping threshold checks for cpu/memory in case the threshold values for cluster.cpu/memory.allocated.capacity.disablethreshold is set to 1.
Reviewed-by: Nitin
This commit is contained in:
Koushik Das 2012-08-22 17:36:19 +05:30
parent 1af59094b6
commit c4257acc41
1 changed files with 11 additions and 9 deletions

View File

@ -464,16 +464,18 @@ public class FirstFitPlanner extends PlannerBase implements DeploymentPlanner {
if (clusterListForVmAllocation == null || clusterListForVmAllocation.size() == 0){
return;
}
if (capacity == Capacity.CAPACITY_TYPE_CPU){
clustersCrossingThreshold = _capacityDao.listClustersCrossingThreshold(Capacity.CAPACITY_TYPE_CPU, plan.getDataCenterId(),
capacityThresholdMap.get(capacity), cpu_requested, ApiDBUtils.getCpuOverprovisioningFactor());
}else{
clustersCrossingThreshold = _capacityDao.listClustersCrossingThreshold(capacity, plan.getDataCenterId(),
capacityThresholdMap.get(capacity), ram_requested, 1.0f);//Mem overprov not supported yet
}
Float threshold = capacityThresholdMap.get(capacity);
if (threshold.floatValue() < 1.0f) {
if (capacity == Capacity.CAPACITY_TYPE_CPU){
clustersCrossingThreshold = _capacityDao.listClustersCrossingThreshold(capacity, plan.getDataCenterId(),
threshold, cpu_requested, ApiDBUtils.getCpuOverprovisioningFactor());
}else{
clustersCrossingThreshold = _capacityDao.listClustersCrossingThreshold(capacity, plan.getDataCenterId(),
threshold, ram_requested, 1.0f);//Mem overprov not supported yet
}
}
if (clustersCrossingThreshold != null && clustersCrossingThreshold.size() != 0){
// addToAvoid Set
avoid.addClusterList(clustersCrossingThreshold);