SimGrid
3.21
Versatile Simulation of Distributed Systems
|
This is the link energy plugin, accounting for the dissipated energy in the simulated platform.
The energy consumption of a link depends directly on its current traffic load. Specify that consumption in your platform file as follows:
<link id="SWITCH1" bandwidth="125Mbps" latency="5us" sharing_policy="SHARED" > <prop id="watt_range" value="100.0:200.0" /> <prop id="watt_off" value="10" /> </link>
The first property means that when your link is switched on, but without anything to do, it will dissipate 100 Watts. If it's fully loaded, it will dissipate 200 Watts. If its load is at 50%, then it will dissipate 150 Watts. The second property means that when your host is turned off, it will dissipate only 10 Watts (please note that these values are arbitrary).
To simulate the energy-related elements, first call the simgrid::energy::sg_link_energy_plugin_init() before your MSG_init(), and then use the following function to retrieve the consumption of a given link: sg_link_get_consumed_energy().
Functions | |
void | sg_link_energy_plugin_init () |
Enable energy plugin. More... | |
void sg_link_energy_plugin_init | ( | ) |
Enable energy plugin.
Enable energy plugin to get joules consumption of each cpu. You should call this function before MSG_init().