Skip to content
Snippets Groups Projects
Commit d066438d authored by Maël Madon's avatar Maël Madon
Browse files

made a more precise README and small fixes on the notebook files

parent dc03f930
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id:forced-resolution tags: %% Cell type:markdown id:forced-resolution tags:
# Downloading and preparing the workload and platform # Downloading and preparing the workload and platform
## Workload ## Workload
We use the reconverted log `METACENTRUM-2013-3.swf` available on [Parallel Workload Archive](https://www.cs.huji.ac.il/labs/parallel/workload/l_metacentrum2/index.html). We use the reconverted log `METACENTRUM-2013-3.swf` available on [Parallel Workload Archive](https://www.cs.huji.ac.il/labs/parallel/workload/l_metacentrum2/index.html).
%% Cell type:code id:f66eb756 tags: %% Cell type:code id:f66eb756 tags:
``` python ``` python
# Download the workload # Download the workload (548.3 MB unzipped)
!curl https://www.cs.huji.ac.il/labs/parallel/workload/l_metacentrum2/METACENTRUM-2013-3.swf.gz \ !curl https://www.cs.huji.ac.il/labs/parallel/workload/l_metacentrum2/METACENTRUM-2013-3.swf.gz \
--output workload/METACENTRUM-2013-3.swf.gz --output workload/METACENTRUM-2013-3.swf.gz
``` ```
%% Cell type:code id:bound-harvey tags: %% Cell type:code id:bound-harvey tags:
``` python ``` python
# Unzip the workload # Unzip the workload
!gunzip workload/METACENTRUM-2013-3.swf.gz !gunzip workload/METACENTRUM-2013-3.swf.gz
``` ```
%% Cell type:markdown id:graphic-rabbit tags: %% Cell type:markdown id:graphic-rabbit tags:
It is a 2-year-long trace from MetaCentrum, the national grid of the Czech republic. As mentionned in the [original paper releasing the log](https://www.cs.huji.ac.il/~feit/parsched/jsspp15/p5-klusacek.pdf), the platform is **very heterogeneous** and underwent majors changes during the logging period. For the purpose of our study, we perform the following selection. It is a 2-year-long trace from MetaCentrum, the national grid of the Czech republic. As mentionned in the [original paper releasing the log](https://www.cs.huji.ac.il/~feit/parsched/jsspp15/p5-klusacek.pdf), the platform is **very heterogeneous** and underwent majors changes during the logging period. For the purpose of our study, we perform the following selection.
First: First:
- we remove from the workload all the clusters whose nodes have **more than 16 cores** - we remove from the workload all the clusters whose nodes have **more than 16 cores**
- we truncate the workload to keep only 6 month (June to November 2014) where no major change was performed in the infrastructure (no cluster < 16 cores added nor removed, no reconfiguration in the scheduling system) - we truncate the workload to keep only 6 month (June to November 2014) where no major change was performed in the infrastructure (no cluster < 16 cores added nor removed, no reconfiguration in the scheduling system)
Second: Second:
- we remove from the workload the jobs with an **execution time greater than one day** - we remove from the workload the jobs with an **execution time greater than one day**
- we remove from the workload the jobs with a **number of requested cores greater than 16** - we remove from the workload the jobs with a **number of requested cores greater than 16**
To do so, we use a home made SWF parser. To do so, we use a the home-made SWF parser `swf_moulinette.py`:
%% Cell type:code id:ff40dcdd tags: %% Cell type:code id:ff40dcdd tags:
``` python ``` python
# First selection # First selection
# Create a swf with only the selected clusters and the 6 selected months # Create a swf with only the selected clusters and the 6 selected months
from time import * from time import *
begin_trace = 1356994806 # according to original SWF header begin_trace = 1356994806 # according to original SWF header
jun1_unix_time, nov30_unix_time = mktime(strptime('Sun Jun 1 00:00:00 2014')), mktime(strptime('Sun Nov 30 23:59:59 2014')) jun1_unix_time, nov30_unix_time = mktime(strptime('Sun Jun 1 00:00:00 2014')), mktime(strptime('Sun Nov 30 23:59:59 2014'))
jun1, nov30 = (int) (jun1_unix_time - begin_trace), (int) (nov30_unix_time - begin_trace) jun1, nov30 = (int) (jun1_unix_time - begin_trace), (int) (nov30_unix_time - begin_trace)
print("Unix Time Jun 1st 2014: {:.0f}".format( jun1_unix_time )) print("Unix Time Jun 1st 2014: {:.0f}".format( jun1_unix_time ))
print("Unix Time Nov 30th 2014: {:.0f}".format( nov30_unix_time )) print("Unix Time Nov 30th 2014: {:.0f}".format( nov30_unix_time ))
print("We should keep all the jobs submitted between {:d} and {:d}".format(jun1, nov30)) print("We should keep all the jobs submitted between {:d} and {:d}".format(jun1, nov30))
! ./scripts/swf_moulinette.py workload/METACENTRUM-2013-3.swf \ ! ./scripts/swf_moulinette.py workload/METACENTRUM-2013-3.swf \
-o workload/METACENTRUM_6months.swf \ -o workload/METACENTRUM_6months.swf \
--keep_only="submit_time >= {jun1} and submit_time <= {nov30}" \ --keep_only="submit_time >= {jun1} and submit_time <= {nov30}" \
--partitions_to_select 1 2 3 5 7 8 9 10 11 12 14 15 18 19 20 21 22 23 25 26 31 --partitions_to_select 1 2 3 5 7 8 9 10 11 12 14 15 18 19 20 21 22 23 25 26 31
``` ```
%% Output %% Output
Unix Time Jun 1st 2014: 1401573600 Unix Time Jun 1st 2014: 1401573600
Unix Time Nov 30th 2014: 1417388399 Unix Time Nov 30th 2014: 1417388399
We should keep all the jobs submitted between 44578794 and 60393593 We should keep all the jobs submitted between 44578794 and 60393593
Processing swf line 100000 Processing swf line 100000
Processing swf line 200000 Processing swf line 200000
Processing swf line 300000 Processing swf line 300000
Processing swf line 400000 Processing swf line 400000
Processing swf line 500000 Processing swf line 500000
Processing swf line 600000 Processing swf line 600000
Processing swf line 700000 Processing swf line 700000
Processing swf line 800000 Processing swf line 800000
Processing swf line 900000 Processing swf line 900000
Processing swf line 1000000 Processing swf line 1000000
Processing swf line 1100000 Processing swf line 1100000
Processing swf line 1200000 Processing swf line 1200000
Processing swf line 1300000 Processing swf line 1300000
Processing swf line 1400000 Processing swf line 1400000
Processing swf line 1500000 Processing swf line 1500000
Processing swf line 1600000 Processing swf line 1600000
Processing swf line 1700000 Processing swf line 1700000
Processing swf line 1800000 Processing swf line 1800000
Processing swf line 1900000 Processing swf line 1900000
Processing swf line 2000000 Processing swf line 2000000
Processing swf line 2100000 Processing swf line 2100000
Processing swf line 2200000 Processing swf line 2200000
Processing swf line 2300000 Processing swf line 2300000
Processing swf line 2400000 Processing swf line 2400000
Processing swf line 2500000 Processing swf line 2500000
Processing swf line 2600000 Processing swf line 2600000
Processing swf line 2700000 Processing swf line 2700000
Processing swf line 2800000 Processing swf line 2800000
Processing swf line 2900000 Processing swf line 2900000
Processing swf line 3000000 Processing swf line 3000000
Processing swf line 3100000 Processing swf line 3100000
Processing swf line 3200000 Processing swf line 3200000
Processing swf line 3300000 Processing swf line 3300000
Processing swf line 3400000 Processing swf line 3400000
Processing swf line 3500000 Processing swf line 3500000
Processing swf line 3600000 Processing swf line 3600000
Processing swf line 3700000 Processing swf line 3700000
Processing swf line 3800000 Processing swf line 3800000
Processing swf line 3900000 Processing swf line 3900000
Processing swf line 4000000 Processing swf line 4000000
Processing swf line 4100000 Processing swf line 4100000
Processing swf line 4200000 Processing swf line 4200000
Processing swf line 4300000 Processing swf line 4300000
Processing swf line 4400000 Processing swf line 4400000
Processing swf line 4500000 Processing swf line 4500000
Processing swf line 4600000 Processing swf line 4600000
Processing swf line 4700000 Processing swf line 4700000
Processing swf line 4800000 Processing swf line 4800000
Processing swf line 4900000 Processing swf line 4900000
Processing swf line 5000000 Processing swf line 5000000
Processing swf line 5100000 Processing swf line 5100000
Processing swf line 5200000 Processing swf line 5200000
Processing swf line 5300000 Processing swf line 5300000
Processing swf line 5400000 Processing swf line 5400000
Processing swf line 5500000 Processing swf line 5500000
Processing swf line 5600000 Processing swf line 5600000
Processing swf line 5700000 Processing swf line 5700000
------------------- -------------------
End parsing End parsing
Total 1649029 jobs and 556 users have been created. Total 1649029 jobs and 556 users have been created.
Total number of core-hours: 18222722 Total number of core-hours: 18222722
4075060 valid jobs were not selected (keep_only) for 75784902 core-hour 4075060 valid jobs were not selected (keep_only) for 75784902 core-hour
Jobs not selected: 71.2% in number, 80.6% in core-hour Jobs not selected: 71.2% in number, 80.6% in core-hour
7119 out of 5731209 lines in the file did not match the swf format 7119 out of 5731209 lines in the file did not match the swf format
30 jobs were not valid 30 jobs were not valid
%% Cell type:code id:6ec15ee8 tags: %% Cell type:code id:6ec15ee8 tags:
``` python ``` python
# Second selection # Second selection
# Keep only the selected jobs # Keep only the selected jobs
! ./scripts/swf_moulinette.py workload/METACENTRUM_6months.swf \ ! ./scripts/swf_moulinette.py workload/METACENTRUM_6months.swf \
-o workload/MC_selection_article.swf \ -o workload/MC_selection_article.swf \
--keep_only="nb_res <= 16 and run_time <= 24*3600" --keep_only="nb_res <= 16 and run_time <= 24*3600"
``` ```
%% Output %% Output
Processing swf line 100000 Processing swf line 100000
Processing swf line 200000 Processing swf line 200000
Processing swf line 300000 Processing swf line 300000
Processing swf line 400000 Processing swf line 400000
Processing swf line 500000 Processing swf line 500000
Processing swf line 600000 Processing swf line 600000
Processing swf line 700000 Processing swf line 700000
Processing swf line 800000 Processing swf line 800000
Processing swf line 900000 Processing swf line 900000
Processing swf line 1000000 Processing swf line 1000000
Processing swf line 1100000 Processing swf line 1100000
Processing swf line 1200000 Processing swf line 1200000
Processing swf line 1300000 Processing swf line 1300000
Processing swf line 1400000 Processing swf line 1400000
Processing swf line 1500000 Processing swf line 1500000
Processing swf line 1600000 Processing swf line 1600000
------------------- -------------------
End parsing End parsing
Total 1604201 jobs and 546 users have been created. Total 1604201 jobs and 546 users have been created.
Total number of core-hours: 4785357 Total number of core-hours: 4785357
44828 valid jobs were not selected (keep_only) for 13437365 core-hour 44828 valid jobs were not selected (keep_only) for 13437365 core-hour
Jobs not selected: 2.7% in number, 73.7% in core-hour Jobs not selected: 2.7% in number, 73.7% in core-hour
0 out of 1649030 lines in the file did not match the swf format 0 out of 1649030 lines in the file did not match the swf format
1 jobs were not valid 1 jobs were not valid
%% Cell type:markdown id:afde35e8 tags: %% Cell type:markdown id:afde35e8 tags:
## Platform ## Platform
According to the system specifications given in the [corresponding page in Parallel Workload Archive](https://www.cs.huji.ac.il/labs/parallel/workload/l_metacentrum2/index.html): from June 1st 2014 to Nov 30th 2014 there is no change in the platform for the clusters considered in our study (<16 cores). There is a total of **6304 cores**.(1) According to the system specifications given in the [corresponding page in Parallel Workload Archive](https://www.cs.huji.ac.il/labs/parallel/workload/l_metacentrum2/index.html): from June 1st 2014 to Nov 30th 2014 there is no change in the platform for the clusters considered in our study (<16 cores). There is a total of **6304 cores**.(1)
We build a platform file adapted to the remaining workload. We see above that the second selection cut 73.7\% of core-hours from the original workload. We choose to make an homogeneous with 16-core nodes. To have a coherent number of nodes, we count: We build a platform file adapted to the remaining workload. We see above that the second selection cuts 73.7\% of core-hours from the original workload. We choose to make an homogeneous cluster with 16-core nodes. To have a coherent number of nodes, we count:
$\#nodes = \frac{\#cores_{total} * \%kept_{core.hour}}{\#corePerNode} = 6304 * .263 / 16 = 104$ $\#nodes = \frac{\#cores_{total} * \%kept_{core.hour}}{\#corePerNode} = 6304 * .263 / 16 = 104$
In SimGrid platform language, this corresponds to such a cluster: In SimGrid platform language, this corresponds to such a cluster:
```xml ```xml
<cluster id="cluster_MC" prefix="MC_" suffix="" radical="0-103" core="16"> <cluster id="cluster_MC" prefix="MC_" suffix="" radical="0-103" core="16">
``` ```
The corresponding SimGrid platform file can be found in `platform/average_metacentrum.xml`. The corresponding SimGrid platform file can be found in `platform/average_metacentrum.xml`.
(1) clusters decomissionned before or comissionned after the 6-month period have been removed: $8+480+160+1792+256+576+88+416+108+168+752+112+588+48+152+160+192+24+224 = 6304$ (1) clusters decomissionned before or comissionned after the 6-month period have been removed: $8+480+160+1792+256+576+88+416+108+168+752+112+588+48+152+160+192+24+224 = 6304$
%% Cell type:code id:north-meeting tags:
``` python
```
......
# Exploration of different user levers for demand response in data centers # Characterization of different user behaviors for demand response in data centers
## List of experiments This repository contains the scripts and files needed to reproduce the experiments presented in the paper "Characterization of different user behaviors for demand response in data centers" submitted to [Euro-Par conference 2022](https://2022.euro-par.org/).
- TODO
## Install ## Description of the main files
Clone the repository - `0_prepare_workload.ipynb`: Jupyter notebook downloading and preparing the workload trace used in the experiments
- `campaign2.py`: Python script preparing and launching in parallel the 105 experiments. Each experiment corresponds to one instance of `instance2.py`.
- `analyse_campaign2.ipynb`: Jupyter notebook analysing the results and plotting the graphs shown in the article
```bash (campaign1 is another set of experiements not discussed in the article. We kept it here but beware that some path might be broken...)
git clone https://gitlab.irit.fr/sepia-pub/open-science/demand-response-user.git
```
For reproductibility, all the dependancies for these experiments and their version are managed with `nix` package manager. To install `nix`: ## Steps to reproduce
You will need ~10GB disk space for the inputs, outputs and dependencies.
### 1. Install
For the sake reproductibility, all the dependancies for these experiments and their version (release tag or commit number) are managed with the package manager Nix. If you don't have it on your machine, the following command should install it. Otherwise, please refer to [their documentation](https://nixos.org/download.html).
```bash ```bash
curl -L https://nixos.org/nix/install | sh curl -L https://nixos.org/nix/install | sh
``` ```
The main software used (and configured in the file `default.nix`) are: The main software used (and configured in the file `default.nix`) are:
- [batsim](https://batsim.org/) for the infrastructure simulation - [Batsim](https://batsim.org/) and [SimGrid](https://simgrid.org/) for the infrastructure simulation
- [batmen](https://gitlab.irit.fr/sepia-pub/mael/batmen): our set of schedulers for batsim and plugin to simulate users - [Batmen](https://gitlab.irit.fr/sepia-pub/mael/batmen): our set of schedulers for batsim and plugin to simulate users
- python3, .. . TODO for the data analysis - python3, pandas, jupyter, matplotlib etc. for the data analysis
## Start the simulation environment Enter a shell with all dependencies managed. This will take some time to download and compile the first time you launch it, but then all the environment is cached for future use.
TODO ```bash
``` bash nix-shell -A exp_env
nix-shell --pure ./env_nix.nix --show-trace #start the shell
jupyter notebook #open jupyter notebook
``` ```
### 2. Prepare input workload
Inside the nix shell, start a notebook and follow the steps presented in `0_prepare_workload.ipynb`:
```bash
jupyter notebook 0_prepare_workload.ipynb
```
### 3. Launch the campaign
Still inside the nix shell, launch the python script. It took about 2 hours for us to execute in parallel on a 16-core Intel Xeon E5-2630 v3 machine.
```bash
python3 campaign2.py
```
### 4. Analyse the results
```bash
jupyter notebook analyse_campaign2.ipynb
```
\ No newline at end of file
This diff is collapsed.
...@@ -30,13 +30,11 @@ let self = rec { ...@@ -30,13 +30,11 @@ let self = rec {
my_batsched = kapack.batsched.overrideAttrs (attr: rec { my_batsched = kapack.batsched.overrideAttrs (attr: rec {
name = "batmen"; name = "batmen";
version = "b63e95fad46962572b1f1d6db5bda979ca20dae0"; # commit "clean nix file and update README" version = "b63e95fad46962572b1f1d6db5bda979ca20dae0"; # commit "clean nix file and update README"
# version = "bab23fa5aa9c117d20fa74469147c1ce5fe58160";
src = kapack.pkgs.fetchgit rec { src = kapack.pkgs.fetchgit rec {
url = "https://gitlab.irit.fr/sepia-pub/mael/batmen.git"; url = "https://gitlab.irit.fr/sepia-pub/mael/batmen.git";
# url = "https://framagit.org/batsim/batsched";
rev = version; rev = version;
sha256 = "1q2s1f68j4wd8vzzzirpjp7851l342hq6dvd9ky5g62zdps5mqlj"; sha256 = "1q2s1f68j4wd8vzzzirpjp7851l342hq6dvd9ky5g62zdps5mqlj";
# sha256 = "0r8qcvhy6ivx6flzl2lhxi1farkqp4w5w5635v83ckj7cc721njs";
}; };
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment