Class ServerConsolidationImpl
- java.lang.Object
-
- de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.AbstractTactic
-
- de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.impl.ServerConsolidationImpl
-
- All Implemented Interfaces:
ITactic
public class ServerConsolidationImpl extends AbstractTactic
Implements a server consolidation heuristic. This heuristic finds two hardly utilised resource containers and reallocates all components of these two resource containers to one resource container
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.log4j.Logger
logger
-
Fields inherited from class de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.AbstractTactic
copy, individualFactory
-
-
Constructor Summary
Constructors Constructor Description ServerConsolidationImpl(org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype> copy, DSEIndividualFactory individualFactory, DSEWorkflowConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doesMatchPrecondition(DSEIndividual individual)
Checks the precondition by trying to generate candidates and see whether the list is larger than 0.List<TacticsResultCandidate>
getHeuristicCandidates(DSEIndividual individual, UtilisationResultCacheAndHelper resultsHelper)
Generates collection of candidates by applying the server consolidation heuristic Checks whether there is one resource container r with a utilisation_r <= THRESHOLD_LOW_UTILISATION and whether there are another n used resource containers x_1 to x_n with enough free capacity (keeping the utilisation under 0.9) so that the the load of r could be distributed: Sum_{i=1}^{n} utilisation_x_i + utilisation_r < 0.9*n The number of free resource container n must not exceed the number of components deployed to r.-
Methods inherited from class de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.AbstractTactic
doesNotImprove, getHeuristicWeight, getNumberOfGeneratedCandidates, improves, increaseCounterOfGeneratedCandidates, setHeuristicWeight
-
-
-
-
Constructor Detail
-
ServerConsolidationImpl
public ServerConsolidationImpl(org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype> copy, DSEIndividualFactory individualFactory, DSEWorkflowConfiguration configuration)
- Parameters:
copy
- Used to copy genotypeindividualFactory
- Used to build individual
-
-
Method Detail
-
doesMatchPrecondition
public boolean doesMatchPrecondition(DSEIndividual individual)
Checks the precondition by trying to generate candidates and see whether the list is larger than 0.- Parameters:
individual
-- Returns:
-
getHeuristicCandidates
public List<TacticsResultCandidate> getHeuristicCandidates(DSEIndividual individual, UtilisationResultCacheAndHelper resultsHelper)
Generates collection of candidates by applying the server consolidation heuristic Checks whether there is one resource container r with a utilisation_r <= THRESHOLD_LOW_UTILISATION and whether there are another n used resource containers x_1 to x_n with enough free capacity (keeping the utilisation under 0.9) so that the the load of r could be distributed: Sum_{i=1}^{n} utilisation_x_i + utilisation_r < 0.9*n The number of free resource container n must not exceed the number of components deployed to r. TODO: take resource demand of deployed components into account. TODO: take utilisation of other resources into account. TODO: The counting of deployed components does not take into account that some allocation degrees are inactive if subsystems are exchanged. Thus, only genomes where all allocation options are active are supported.- Parameters:
individual
- Individual which the heuristic should be applied toresultsHelper
-- Returns:
- Collection of improved individuals
-
-