Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ include_directories(src/ ${SimGrid_INCLUDE_DIR}/include /usr/local/include /opt/
set(SOURCE_FILES
src/WorkloadExecutionController.h
src/WorkloadExecutionController.cpp
src/BandwidthModifier.h
src/BandwidthModifier.cpp
src/SimpleSimulator.h
src/SimpleSimulator.cpp
src/JobSpecification.h
Expand Down
4 changes: 3 additions & 1 deletion data/platform-files/WLCG_disklessTier2_reduced100.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@
<router id="KITgateway"/>

<link id="GridKA_to_KIT" bandwidth="1150Mbps" latency="0us"/>
<link id="KIT_to_DESY" bandwidth="1150Mbps" latency="0us"/>
<link id="KIT_to_DESY" bandwidth="1150Mbps" latency="0us">
<prop id="variation" value="100000000,50000000"/>
</link>

</zone>

Expand Down
143 changes: 143 additions & 0 deletions data/platform-files/WLCG_disklessTier2_reduced50.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<?xml version="1.0"?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform version="4.1">
<config>
<prop id="network/loopback-bw" value="1000000000000"/>
</config>

<zone id="global" routing="Floyd">

<zone id="KIT" routing="Floyd">

<zone id="GridKA" routing="Floyd">

<!-- <host id="Tier1" speed="3194Mf" core="42400"> -->
<cluster id="Tier1" prefix="Tier1" radical="0-19" suffix="" speed="2555Mf" core="42" bw="1150Mbps" lat="0us">
<prop id="type" value="worker"/>
<prop id="ram" value="2.3744TiB"/>
<!-- <disk id="shared_cache" read_bw="16GBps" write_bw="16GBps">
<prop id="size" value="1PB"/>
<prop id="mount" value="/"/>
</disk> -->
</cluster>
<!-- </host> -->

<zone id="GridKA-service" routing="Floyd">

<host id="GridKA_dCache" speed="1000Gf" core="10">
<prop id="type" value="storage"/>
<disk id="hard_drive" read_bw="1.84Gbps" write_bw="1.84Gbps">
<prop id="size" value="7PB"/>
<prop id="mount" value="/"/>
</disk>
</host>

<host id="WMSHost" speed="10Gf" core="10">
<prop id="type" value="scheduler,executor"/>
<prop id="ram" value="16GB"/>
</host>

<router id="GridKAgateway"/>

<link id="GridKA_sched" bandwidth="230Mbps" latency="0us"/>

<link id="GridKA_Tier1_FATPIPE" bandwidth="2.3Gbps" latency="0us" sharing_policy="FATPIPE"/>
<link id="GridKA_Tier1" bandwidth="4.6Gbps" latency="0us"/>

<!-- <link id="GridKA_dcache" bandwidth="100Gbps" latency="0us"/> -->

<link id="GridKA_dcachepool_FATPIPE" bandwidth="0.92Gbps" latency="0us" sharing_policy="FATPIPE"/>
<link id="GridKA_dcachepool" bandwidth="1.84Gbps" latency="0us"/>

<route src="GridKAgateway" dst="WMSHost">
<link_ctn id="GridKA_sched"/>
</route>

<route src="GridKAgateway" dst="GridKA_dCache">
<link_ctn id="GridKA_dcachepool_FATPIPE"/>
<link_ctn id="GridKA_dcachepool"/>
</route>
</zone>

<zoneRoute src="GridKA-service" dst="Tier1" gw_src="GridKAgateway" gw_dst="Tier1Tier1_router">
<link_ctn id="GridKA_Tier1_FATPIPE"/>
<link_ctn id="GridKA_Tier1"/>
</zoneRoute>

</zone>


<zone id="KITcentral" routing="Floyd">

<router id="KITgateway"/>

<link id="GridKA_to_KIT" bandwidth="2.3Gbps" latency="0us"/>
<link id="KIT_to_DESY" bandwidth="2.3Gbps" latency="0us">
<!-- <prop id="variation" value="1000000000,500000000"/> -->
</link>

</zone>


<zoneRoute src="GridKA" dst="KITcentral" gw_src="GridKAgateway" gw_dst="KITgateway">
<link_ctn id="GridKA_to_KIT"/>
</zoneRoute>

</zone>


<zone id="DESY" routing="Floyd">

<zone id="DESYGrid" routing="Floyd">

<!-- <host id="Tier2" speed="2761Mf" core="200"> -->
<host id="Tier2" speed="2209Mf" core="400">
<prop id="type" value="worker"/>
<prop id="ram" value="5.0TiB"/>
</host>

<host id="DESY_dCache" speed="1000Gf" core="10">
<prop id="type" value="cache"/>
<disk id="hard_drive" read_bw="1.84Gbps" write_bw="1.84Gbps">
<prop id="size" value="7PB"/>
<prop id="mount" value="/"/>
</disk>
</host>

<router id="DESYGridgateway"/>

<link id="DESY_Tier2" bandwidth="0.92Gbps" latency="0us"/>

<link id="DESY_dCachepool" bandwidth="0.92Gbps" latency="0us"/>

<route src="DESYGridgateway" dst="Tier2">
<link_ctn id="DESY_Tier2"/>
</route>

<route src="DESYGridgateway" dst="DESY_dCache">
<link_ctn id="DESY_dCachepool"/>
</route>

</zone>

<zone id="DESYcentral" routing="Floyd">

<router id="DESYgateway"/>

<link id="DESYGrid_to_DESY" bandwidth="2.3Gbps" latency="0us"/>

</zone>

<zoneRoute src="DESYGrid" dst="DESYcentral" gw_src="DESYGridgateway" gw_dst="DESYgateway">
<link_ctn id="DESYGrid_to_DESY"/>
</zoneRoute>

</zone>

<zoneRoute src="KIT" dst="DESY" gw_src="KITgateway" gw_dst="DESYgateway">
<link_ctn id="KIT_to_DESY"/>
</zoneRoute>

</zone>

</platform>
8 changes: 4 additions & 4 deletions data/workload-configs/T1_DE_KIT_workloads.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Analysis_T1": {
"num_jobs": 48,
"num_jobs": 96,
"infiles_per_job": 10,
"cores": {
"type": "histogram",
Expand Down Expand Up @@ -31,7 +31,7 @@
"submission_time": 10
},
"Digi_T1": {
"num_jobs": 50,
"num_jobs": 100,
"infiles_per_job": 10,
"cores": {
"type": "histogram",
Expand Down Expand Up @@ -61,7 +61,7 @@
"submission_time": 10
},
"DataProcessing_T1": {
"num_jobs": 13,
"num_jobs": 26,
"infiles_per_job": 10,
"cores": {
"type": "histogram",
Expand Down Expand Up @@ -121,7 +121,7 @@
"submission_time": 10
},
"Merge_T1": {
"num_jobs": 5,
"num_jobs": 10,
"infiles_per_job": 10,
"cores": {
"type": "histogram",
Expand Down
8 changes: 4 additions & 4 deletions data/workload-configs/T2_DE_DESY_workloads.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Analysis_T2": {
"num_jobs": 108,
"num_jobs": 216,
"infiles_per_job": 10,
"cores": {
"type": "histogram",
Expand Down Expand Up @@ -31,7 +31,7 @@
"submission_time": 10
},
"Digi_T2": {
"num_jobs": 74,
"num_jobs": 148,
"infiles_per_job": 10,
"cores": {
"type": "histogram",
Expand Down Expand Up @@ -61,7 +61,7 @@
"submission_time": 10
},
"DataProcessing_T2": {
"num_jobs": 11,
"num_jobs": 22,
"infiles_per_job": 10,
"cores": {
"type": "histogram",
Expand Down Expand Up @@ -121,7 +121,7 @@
"submission_time": 10
},
"Merge_T2": {
"num_jobs": 4,
"num_jobs": 8,
"infiles_per_job": 10,
"cores": {
"type": "histogram",
Expand Down
69 changes: 69 additions & 0 deletions src/BandwidthModifier.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* Copyright (c) 2020. <ADD YOUR HEADER INFORMATION>.
* Generated with the wrench-init.in tool.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <iostream>
#include <algorithm>

#include "BandwidthModifier.h"

XBT_LOG_NEW_DEFAULT_CATEGORY(bandwidth_modifier, "Log category for BandwidthModifier");

/**
* @brief A "controller" that dynamically modifies a link's bandwidth
*
* @param hostname: the host on which this actor runs
* @param link_name: the name of the link whose bandwidth is to be modified
* @param period: the period in between two bandwidth modifications (in seconds)
* @param distribution: the normal distribution from which to same bandwidth modification values
*/
BandwidthModifier::BandwidthModifier(
const std::string &hostname,
const std::string &link_name,
double period,
std::normal_distribution<double>* distribution,
unsigned long seed) : wrench::ExecutionController(
hostname,
"bandwidth-modifier"), link_name(link_name), period(period), distribution(distribution), seed(seed) {

}

/**
* @brief main method of the BandwidthModifier actor
*
* @return 0 on completion
*
* @throw std::runtime_error
*/
int BandwidthModifier::main() {

wrench::TerminalOutput::setThisProcessLoggingColor(wrench::TerminalOutput::COLOR_GREEN);

// Retrieve the link
auto the_link = simgrid::s4u::Link::by_name_or_null(this->link_name);
if (the_link == nullptr) {
throw std::invalid_argument("BandwidthModifier::main(): The platform does not contain a link named '" + this->link_name +"'");
}

// Get its (original) bandwidth
const double original_bandwidth = the_link->get_bandwidth();

// Create RNG
std::mt19937 rng(this->seed);

while (true) {
// Sample bandwidth modification subtrahend
double reduction = (*this->distribution)(rng);
while ((original_bandwidth - reduction < 0) || reduction < 0) reduction = (*this->distribution)(rng);
// Update the link bandwidth
the_link->set_bandwidth(original_bandwidth - reduction);
// Sleep during the period
wrench::Simulation::sleep(period);
}
}

47 changes: 47 additions & 0 deletions src/BandwidthModifier.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* Copyright (c) 2020. <ADD YOUR HEADER INFORMATION>.
* Generated with the wrench-init.in tool.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#ifndef MY_BANDWIDTH_MODIFIER_H
#define MY_BANDWIDTH_MODIFIER_H

#include <wrench-dev.h>
#include <iostream>
#include <fstream>

#include "JobSpecification.h"
#include "LRU_FileList.h"

#include "util/Utils.h"

class Simulation;

class BandwidthModifier : public wrench::ExecutionController {
public:
// Constructor
BandwidthModifier(
const std::string &hostname,
const std::string &link_name,
double period,
std::normal_distribution<double>* distribution,
unsigned long seed);

private:

std::string link_name;
double period;
std::normal_distribution<double>* distribution;
std::mt19937 generator;
unsigned long seed;

int main() override;

};

#endif //MY_BANDWIDTH_MODIFIER_H

Loading