Changeset 1583 for DCWoRMS/branches


Ignore:
Timestamp:
02/04/16 14:19:12 (9 years ago)
Author:
wojtekp
Message:
 
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  
    154154                for(Device device: cpu.getParent().getParent().getResourceCharacteristic().getDevices()){ 
    155155                        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*/){ 
    157157                                        Fan fan = (Fan) device; 
    158158                                        V = fan.getAirflowInterface().getRecentAirflow().getValue(); 
     
    196196                NodeGroup ng = (NodeGroup) cpu.getParent().getParent(); 
    197197                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){ 
    199199                                Tin = n.getThermalInterface().getRecentTemperature().getValue(); 
    200200 
  • DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginFansMng.java

    r1500 r1583  
    111111                for(Device d: n.getParent().getResourceCharacteristic().getDevices()){ 
    112112                        //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){ 
    114114                                Fan f = (Fan) d; 
    115115                                int speed; 
  • DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginMigrate.java

    r1500 r1583  
    137137                for(Device d: n.getParent().getResourceCharacteristic().getDevices()){ 
    138138                        //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){ 
    140140                                Fan f = (Fan) d; 
    141141                                int speed; 
  • DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginPowerCapping.java

    r1500 r1583  
    125125                for(Device d: n.getParent().getResourceCharacteristic().getDevices()){ 
    126126                        //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){ 
    128128                                Fan f = (Fan) d; 
    129129                                int speed; 
     
    316316 
    317317                                                                        if(fan.getChilledResources().contains(n.getFullName())){ 
    318                                                                                 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 
     318                                                                                fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_30")); 
    319319                                                                        } 
    320320                                                                } 
     
    409409 
    410410                                                                        if(fan.getChilledResources().contains(n.getFullName())){ 
    411                                                                                 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 
     411                                                                                fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_30")); 
    412412                                                                        } 
    413413                                                                } 
  • DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPlugin.java

    r1500 r1583  
    2929 
    3030        private static double Pidle = 6; 
    31         private static double Pfull = 16; 
     31        private static double Pfull = 20; 
    3232 
    3333 
     
    8989                for(Device device: node.getParent().getResourceCharacteristic().getDevices()){ 
    9090                        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){ 
    9292                                        Fan fan = (Fan) device; 
    9393                                        V = fan.getAirflowInterface().getRecentAirflow().getValue(); 
  • DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPluginPowerCapping.java

    r1500 r1583  
    4242        private double next_timer = -1; 
    4343 
    44         private static double Pidle = 15; 
    45         private static double Pfull = 76; 
     44        private static double Pidle = 6; 
     45        private static double Pfull = 20; 
    4646 
    4747 
     
    5555                double powerConsumption = 0; 
    5656 
    57                 /*double Pcpu = 0;       
     57                double Pcpu = 0;         
    5858                for(Processor cpu: node.getProcessors()){ 
    5959                        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; 
    6463                 
    6564                /*if(powerCapLevel!= -1 && powerConsumption > powerCapLevel){ 
     
    114113                for(Device device: node.getParent().getResourceCharacteristic().getDevices()){ 
    115114                        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){ 
    117116                                        Fan fan = (Fan) device; 
    118117                                        V = fan.getAirflowInterface().getRecentAirflow().getValue(); 
  • DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeGroupEnergyEstimationPlugin.java

    r1500 r1583  
    2121                        try{ 
    2222                                powerConsumption = powerConsumption + node.getPowerInterface().getRecentPowerUsage().getValue(); 
     23                                powerConsumption = powerConsumption + node.getProcessors().get(0).getResourceCharacteristic().getDevices().get(0).getPowerInterface().getRecentPowerUsage().getValue(); 
    2324 
    2425                        } catch (Exception e){ 
    2526                        } 
    2627                } 
    27  
    2828                for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){ 
    2929                        if(device.getType().equals(StandardResourceType.Fan)){ 
  • DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/PowerLeakageEnergyEstimationPlugin.java

    r1500 r1583  
    11package experiments.simpat2014.models.article; 
    22 
    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; 
    123import 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; 
    164import schedframe.resources.devices.Device; 
    175import schedframe.resources.devices.PhysicalResource; 
    186import schedframe.scheduling.manager.tasks.JobRegistry; 
    19 import simulator.DataCenterWorkloadSimulator; 
    207import example.energy.BaseEnergyEstimationPlugin; 
    21 import example.energy.coolemall.CoolEmAllTestbedMeasurements; 
    22 import gridsim.dcworms.DCWormsTags; 
     8 
    239 
    2410public class PowerLeakageEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{ 
    2511 
    26         private static double Tidle = 28; 
    27         private static double Tfull = 60; 
    28          
    2912        public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry, 
    3013                        PhysicalResource resource) { 
    3114 
    32                 double powerConsumption = 0; 
     15                double powerLekage = 0; 
    3316                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(); 
    3723                /*Device pl = (Device) resource; 
    3824                if(pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() > 90){ 
    3925                        powerConsumption = powerConsumption + 15; 
    4026                }*/ 
    41                 return powerConsumption; 
     27                return powerLekage; 
    4228        } 
    4329 
Note: See TracChangeset for help on using the changeset viewer.