Changeset 1583 for DCWoRMS/branches
- Timestamp:
- 02/04/16 14:19:12 (9 years ago)
- Location:
- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/CpuEnergyEstimationPlugin.java
r1500 r1583 154 154 for(Device device: cpu.getParent().getParent().getResourceCharacteristic().getDevices()){ 155 155 if(device.getType().equals(StandardResourceType.Fan)){ 156 if(Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) /*|| Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW*/){156 if(Integer.valueOf(device.getName().split("_")[1]).intValue() == Integer.valueOf(cpu.getParent().getName().split("_")[1]).intValue() /*|| Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW*/){ 157 157 Fan fan = (Fan) device; 158 158 V = fan.getAirflowInterface().getRecentAirflow().getValue(); … … 196 196 NodeGroup ng = (NodeGroup) cpu.getParent().getParent(); 197 197 for(Node n: ng.getNodes()){ 198 if(Integer.valueOf(n.getName().split("_")[1]) - Integer.valueOf(cpu.getParent().getName().split("_")[1]) == EnvironmentConditions.NODES_IN_A_ROW){198 if(Integer.valueOf(n.getName().split("_")[1]).intValue() - Integer.valueOf(cpu.getParent().getName().split("_")[1]).intValue() == EnvironmentConditions.NODES_IN_A_ROW){ 199 199 Tin = n.getThermalInterface().getRecentTemperature().getValue(); 200 200 -
DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginFansMng.java
r1500 r1583 111 111 for(Device d: n.getParent().getResourceCharacteristic().getDevices()){ 112 112 //System.out.println(d.getName() + "; " + n.getName()); 113 if(Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) || Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){113 if(Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() || Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() - EnvironmentConditions.NODES_IN_A_ROW){ 114 114 Fan f = (Fan) d; 115 115 int speed; -
DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginMigrate.java
r1500 r1583 137 137 for(Device d: n.getParent().getResourceCharacteristic().getDevices()){ 138 138 //System.out.println(d.getName() + "; " + n.getName()); 139 if(Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) || Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){139 if(Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() || Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() - EnvironmentConditions.NODES_IN_A_ROW){ 140 140 Fan f = (Fan) d; 141 141 int speed; -
DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginPowerCapping.java
r1500 r1583 125 125 for(Device d: n.getParent().getResourceCharacteristic().getDevices()){ 126 126 //System.out.println(d.getName() + "; " + n.getName()); 127 if(Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) || Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){127 if(Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() || Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() - EnvironmentConditions.NODES_IN_A_ROW){ 128 128 Fan f = (Fan) d; 129 129 int speed; … … 316 316 317 317 if(fan.getChilledResources().contains(n.getFullName())){ 318 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName(" 2"));318 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_30")); 319 319 } 320 320 } … … 409 409 410 410 if(fan.getChilledResources().contains(n.getFullName())){ 411 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName(" 2"));411 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_30")); 412 412 } 413 413 } -
DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPlugin.java
r1500 r1583 29 29 30 30 private static double Pidle = 6; 31 private static double Pfull = 16;31 private static double Pfull = 20; 32 32 33 33 … … 89 89 for(Device device: node.getParent().getResourceCharacteristic().getDevices()){ 90 90 if(device.getType().equals(StandardResourceType.Fan)){ 91 if(Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(node.getName().split("_")[1]) || Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){91 if(Integer.valueOf(device.getName().split("_")[1]).intValue() == Integer.valueOf(node.getName().split("_")[1]).intValue() || Integer.valueOf(device.getName().split("_")[1]).intValue() == Integer.valueOf(cpu.getParent().getName().split("_")[1]).intValue() - EnvironmentConditions.NODES_IN_A_ROW){ 92 92 Fan fan = (Fan) device; 93 93 V = fan.getAirflowInterface().getRecentAirflow().getValue(); -
DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPluginPowerCapping.java
r1500 r1583 42 42 private double next_timer = -1; 43 43 44 private static double Pidle = 15;45 private static double Pfull = 76;44 private static double Pidle = 6; 45 private static double Pfull = 20; 46 46 47 47 … … 55 55 double powerConsumption = 0; 56 56 57 /*double Pcpu = 0;57 double Pcpu = 0; 58 58 for(Processor cpu: node.getProcessors()){ 59 59 Pcpu = Pcpu + cpu.getPowerInterface().getRecentPowerUsage().getValue(); 60 }*/ 61 62 //powerConsumption = Pidle + (Pfull- Pidle) * node.getLoadInterface().getRecentUtilization().getValue()/100; 63 powerConsumption = Pidle + node.getProcessors().get(0).getPowerInterface().getRecentPowerUsage().getValue(); 60 } 61 62 powerConsumption = Pcpu + Pidle + (Pfull- Pidle) * node.getLoadInterface().getRecentUtilization().getValue()/100; 64 63 65 64 /*if(powerCapLevel!= -1 && powerConsumption > powerCapLevel){ … … 114 113 for(Device device: node.getParent().getResourceCharacteristic().getDevices()){ 115 114 if(device.getType().equals(StandardResourceType.Fan)){ 116 if(Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(node.getName().split("_")[1]) || Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){115 if(Integer.valueOf(device.getName().split("_")[1]).intValue() == Integer.valueOf(node.getName().split("_")[1]).intValue() || Integer.valueOf(device.getName().split("_")[1]).intValue() == Integer.valueOf(cpu.getParent().getName().split("_")[1]).intValue() - EnvironmentConditions.NODES_IN_A_ROW){ 117 116 Fan fan = (Fan) device; 118 117 V = fan.getAirflowInterface().getRecentAirflow().getValue(); -
DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeGroupEnergyEstimationPlugin.java
r1500 r1583 21 21 try{ 22 22 powerConsumption = powerConsumption + node.getPowerInterface().getRecentPowerUsage().getValue(); 23 powerConsumption = powerConsumption + node.getProcessors().get(0).getResourceCharacteristic().getDevices().get(0).getPowerInterface().getRecentPowerUsage().getValue(); 23 24 24 25 } catch (Exception e){ 25 26 } 26 27 } 27 28 28 for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){ 29 29 if(device.getType().equals(StandardResourceType.Fan)){ -
DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/PowerLeakageEnergyEstimationPlugin.java
r1500 r1583 1 1 package experiments.simpat2014.models.article; 2 2 3 import java.util.List;4 5 import schedframe.resources.CoolEmAllResourceType;6 import schedframe.resources.computing.ComputingResource;7 import schedframe.resources.computing.Node;8 import schedframe.resources.computing.Processor;9 import schedframe.resources.computing.Rack;10 import schedframe.resources.computing.coolemall.ComputeBox1;11 import schedframe.resources.computing.coolemall.NodeGroup;12 3 import schedframe.resources.computing.profiles.energy.ResourceEvent; 13 import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;14 import schedframe.resources.computing.profiles.energy.power.PState;15 import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;16 4 import schedframe.resources.devices.Device; 17 5 import schedframe.resources.devices.PhysicalResource; 18 6 import schedframe.scheduling.manager.tasks.JobRegistry; 19 import simulator.DataCenterWorkloadSimulator;20 7 import example.energy.BaseEnergyEstimationPlugin; 21 import example.energy.coolemall.CoolEmAllTestbedMeasurements; 22 import gridsim.dcworms.DCWormsTags; 8 23 9 24 10 public class PowerLeakageEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{ 25 11 26 private static double Tidle = 28;27 private static double Tfull = 60;28 29 12 public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry, 30 13 PhysicalResource resource) { 31 14 32 double power Consumption= 0;15 double powerLekage = 0; 33 16 Device pl = (Device) resource; 34 double tempDiff = pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() - Tidle; 35 double factor = 0.01 * tempDiff; 36 powerConsumption = factor * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue(); 17 double tempDiff = pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() - 65; 18 if(tempDiff < 0) 19 return 0; 20 21 powerLekage = 0.02 * tempDiff * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue(); 22 //powerConsumption = factor * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue(); 37 23 /*Device pl = (Device) resource; 38 24 if(pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() > 90){ 39 25 powerConsumption = powerConsumption + 15; 40 26 }*/ 41 return power Consumption;27 return powerLekage; 42 28 } 43 29
Note: See TracChangeset
for help on using the changeset viewer.