bachelorThesis/task_slowdown/task_slowdown_table.ipynb

367 lines
14 KiB
Text

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Task slowdown"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import json\n",
"import sys\n",
"import gzip\n",
"import pandas\n",
"import seaborn as sns\n",
"import matplotlib as mpl\n",
"import matplotlib.pyplot as plt\n",
"from IPython.display import display, HTML"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Legend for columns:\n",
"- *n_fsh*: number of jobs that terminated with status 6 (FINISH)\n",
"- *n_non*: number of jobs that did not terminate with status 6 or did not terminate at all\n",
"- *finished%*: `n_fsh` / (`n_fsh` + `n_non`)\n",
"- *c_zero_end*: count of number of **Finished** jobs that have a last execution time of `0` \n",
"- *s_last*: sum of execution times for last events\n",
"- *m_last*: mean execution time for last event\n",
"- *s_all*: sum of all execution times for all events\n",
"- *m_all*: mean execution time for all events\n",
"- *s_slow*: sum of **slowdown** values computed for each job: `job_slowdown` = sum(`exec_time`) / last(`exec_time`)\n",
"- *m_slow*: mean job-wise **slowdown** value, i.e. `s_slow` / `n_fsh`\n",
"- *m_slow_2*: priority-wise mean **slowdown**, i.e. `s_all` / `s_last`"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\\taskslowdown{Cluster A}{\n",
"\\begin{tabular}{rrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" -1 & 10.620113 & 1.097556 \\\\\n",
" 24 & 0.000000 & NaN \\\\\n",
" 25 & 0.333054 & 82.973285 \\\\\n",
" 100 & 0.000000 & NaN \\\\\n",
" 101 & 81.917703 & 30.798089 \\\\\n",
" 102 & 0.000000 & NaN \\\\\n",
" 103 & 14.990678 & 1.130579 \\\\\n",
" 105 & 57.678214 & 1.078733 \\\\\n",
" 107 & 53.926543 & 1.016187 \\\\\n",
" 114 & 0.000000 & NaN \\\\\n",
" 115 & 4.108501 & 1.004324 \\\\\n",
" 116 & 13.045304 & 1.032749 \\\\\n",
" 117 & 0.000000 & NaN \\\\\n",
" 118 & 11.907081 & 1.003494 \\\\\n",
" 119 & 21.264583 & 1.504923 \\\\\n",
" 170 & 0.000000 & NaN \\\\\n",
" 200 & 27.211754 & 4.116760 \\\\\n",
" 205 & 0.000000 & NaN \\\\\n",
" 210 & 0.000000 & NaN \\\\\n",
" 214 & 0.000000 & NaN \\\\\n",
" 215 & 0.000000 & NaN \\\\\n",
" 360 & 0.616372 & 2.924018 \\\\\n",
" 400 & 0.000000 & NaN \\\\\n",
" 450 & 2.203423 & 1.142450 \\\\\n",
" 500 & 0.000000 & NaN \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster B}{\n",
"\\begin{tabular}{rrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 45.193049 & 1.176397 \\\\\n",
" 25 & 0.018094 & 133.481864 \\\\\n",
" 80 & 0.000000 & NaN \\\\\n",
" 100 & 0.000000 & NaN \\\\\n",
" 101 & 66.479321 & 433.414195 \\\\\n",
" 103 & 0.106377 & 1.645114 \\\\\n",
" 105 & 0.463292 & 2.408090 \\\\\n",
" 107 & 0.000000 & NaN \\\\\n",
" 114 & 0.676897 & 1.003422 \\\\\n",
" 115 & 4.117647 & 5.916852 \\\\\n",
" 116 & 8.316438 & 1.109652 \\\\\n",
" 117 & 0.000000 & NaN \\\\\n",
" 118 & 0.311290 & 1.000000 \\\\\n",
" 119 & 0.195997 & 2.555160 \\\\\n",
" 170 & 0.000000 & NaN \\\\\n",
" 199 & 0.000000 & NaN \\\\\n",
" 200 & 30.916717 & 9.707524 \\\\\n",
" 205 & 0.000000 & NaN \\\\\n",
" 210 & 0.000000 & NaN \\\\\n",
" 214 & 0.000000 & NaN \\\\\n",
" 215 & 0.000000 & NaN \\\\\n",
" 360 & 3.502999 & 1.612147 \\\\\n",
" 450 & 0.612913 & 1.057515 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster C}{\n",
"\\begin{tabular}{rrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 50.887820 & 1.105787 \\\\\n",
" 3 & 0.000000 & NaN \\\\\n",
" 10 & 0.000000 & NaN \\\\\n",
" 25 & 22.468276 & 8.191258 \\\\\n",
" 100 & 0.000000 & NaN \\\\\n",
" 101 & 52.628263 & 421.490544 \\\\\n",
" 103 & 0.005336 & 2.794339 \\\\\n",
" 105 & 0.023521 & 1.372291 \\\\\n",
" 107 & 0.000245 & 14.708268 \\\\\n",
" 114 & 0.022221 & 1.011266 \\\\\n",
" 115 & 0.281832 & 1.980743 \\\\\n",
" 116 & 0.013836 & 1.022119 \\\\\n",
" 117 & 93.165468 & 1.000000 \\\\\n",
" 118 & 0.004137 & 1.100009 \\\\\n",
" 119 & 2.215917 & 2.044049 \\\\\n",
" 170 & 0.000000 & NaN \\\\\n",
" 200 & 3.606796 & 4.139724 \\\\\n",
" 205 & 0.000000 & NaN \\\\\n",
" 210 & 0.000000 & NaN \\\\\n",
" 214 & 0.000000 & NaN \\\\\n",
" 215 & 0.000000 & NaN \\\\\n",
" 360 & 4.367418 & 2.061085 \\\\\n",
" 450 & 1.512578 & 1.066014 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster D}{\n",
"\\begin{tabular}{rrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 26.522899 & 1.116002 \\\\\n",
" 5 & 0.000000 & NaN \\\\\n",
" 25 & 16.293068 & 65.676400 \\\\\n",
" 100 & 0.000000 & NaN \\\\\n",
" 101 & 45.314870 & 315.954065 \\\\\n",
" 103 & 0.004540 & 1.065721 \\\\\n",
" 105 & 0.051712 & 2.897040 \\\\\n",
" 107 & 0.000350 & 1.551354 \\\\\n",
" 114 & 0.000000 & NaN \\\\\n",
" 115 & 5.189033 & 2.186562 \\\\\n",
" 116 & 0.126154 & 1.278510 \\\\\n",
" 117 & 85.714286 & 1.000000 \\\\\n",
" 118 & 0.054055 & 2.048749 \\\\\n",
" 119 & 0.441844 & 3.020486 \\\\\n",
" 197 & 0.000000 & NaN \\\\\n",
" 199 & 0.000000 & NaN \\\\\n",
" 200 & 6.528759 & 5.514350 \\\\\n",
" 205 & 0.000000 & NaN \\\\\n",
" 210 & 0.000000 & NaN \\\\\n",
" 214 & 0.000000 & NaN \\\\\n",
" 215 & 0.000000 & NaN \\\\\n",
" 360 & 1.594977 & 2.476706 \\\\\n",
" 450 & 0.611145 & 1.330248 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster E}{\n",
"\\begin{tabular}{rrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 42.805214 & 1.439544 \\\\\n",
" 25 & 5.344531 & 2.676136 \\\\\n",
" 100 & 0.000000 & NaN \\\\\n",
" 101 & 0.015918 & 1.122507 \\\\\n",
" 103 & 0.021660 & 3.163046 \\\\\n",
" 105 & 0.404803 & 14.750313 \\\\\n",
" 107 & 0.000000 & NaN \\\\\n",
" 114 & 0.000000 & NaN \\\\\n",
" 115 & 0.027326 & 1.000000 \\\\\n",
" 116 & 0.000000 & NaN \\\\\n",
" 117 & 0.000000 & NaN \\\\\n",
" 118 & 0.000000 & NaN \\\\\n",
" 119 & 0.458256 & 10.310893 \\\\\n",
" 170 & 0.000000 & NaN \\\\\n",
" 200 & 1.959258 & 8.535722 \\\\\n",
" 201 & 0.000000 & NaN \\\\\n",
" 205 & 0.000000 & NaN \\\\\n",
" 210 & 0.000000 & NaN \\\\\n",
" 215 & 0.000000 & NaN \\\\\n",
" 220 & 0.000000 & NaN \\\\\n",
" 360 & 37.157031 & 2.873243 \\\\\n",
" 450 & 0.548458 & 1.113283 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster F}{\n",
"\\begin{tabular}{rrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 45.208221 & 1.088162 \\\\\n",
" 25 & 0.647505 & 2.230960 \\\\\n",
" 100 & 0.000000 & NaN \\\\\n",
" 101 & 40.296631 & 323.858714 \\\\\n",
" 103 & 0.058418 & 1.167347 \\\\\n",
" 105 & 0.222372 & 1.550453 \\\\\n",
" 107 & 0.060860 & 1.012727 \\\\\n",
" 114 & 0.006958 & 1.000000 \\\\\n",
" 115 & 3.647104 & 5.094215 \\\\\n",
" 116 & 0.000000 & NaN \\\\\n",
" 117 & 0.000086 & 1.000000 \\\\\n",
" 118 & 0.002082 & 1.000000 \\\\\n",
" 119 & 31.354662 & 7.608799 \\\\\n",
" 200 & 3.653528 & 5.943247 \\\\\n",
" 201 & 0.000000 & NaN \\\\\n",
" 360 & 7.424790 & 2.171524 \\\\\n",
" 450 & 0.992623 & 1.021053 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster G}{\n",
"\\begin{tabular}{rrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 33.612201 & 1.138988 \\\\\n",
" 25 & 0.233338 & 8.692558 \\\\\n",
" 50 & 0.000000 & NaN \\\\\n",
" 100 & 0.000000 & NaN \\\\\n",
" 101 & 96.470338 & 19.378523 \\\\\n",
" 103 & 0.032539 & 1.271282 \\\\\n",
" 105 & 0.196286 & 1.000738 \\\\\n",
" 107 & 0.000000 & NaN \\\\\n",
" 114 & 0.000000 & NaN \\\\\n",
" 115 & 7.633588 & 1.802068 \\\\\n",
" 117 & 0.000000 & NaN \\\\\n",
" 118 & 48.969072 & 3.877102 \\\\\n",
" 119 & 0.085944 & 3.166077 \\\\\n",
" 170 & 0.000000 & NaN \\\\\n",
" 200 & 26.747126 & 14.573912 \\\\\n",
" 360 & 1.618878 & 2.119524 \\\\\n",
" 450 & 2.737219 & 1.036927 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster H}{\n",
"\\begin{tabular}{rrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 27.744380 & 1.122458 \\\\\n",
" 19 & 0.000000 & NaN \\\\\n",
" 25 & 1.042767 & 3.064188 \\\\\n",
" 101 & 100.000000 & 76.438090 \\\\\n",
" 103 & 0.481256 & 1.262067 \\\\\n",
" 105 & 1.427256 & 4.205547 \\\\\n",
" 107 & 0.000000 & NaN \\\\\n",
" 115 & 5.122494 & 1.000000 \\\\\n",
" 116 & 1.035309 & 73.447995 \\\\\n",
" 117 & 0.000050 & 1.000000 \\\\\n",
" 118 & 1.003331 & 1.947121 \\\\\n",
" 119 & 0.145214 & 7.301093 \\\\\n",
" 200 & 2.702770 & 5.798142 \\\\\n",
" 201 & 0.000000 & NaN \\\\\n",
" 220 & 0.000000 & NaN \\\\\n",
" 360 & 4.425746 & 2.018441 \\\\\n",
" 450 & 0.535389 & 1.054678 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n"
]
}
],
"source": [
"CLUSTERS = \"abcdefgh\"\n",
"DIR = \"/Users/maggicl/Git/bachelorThesis/task_slowdown/\"\n",
"\n",
"df = {}\n",
"\n",
"for cluster in CLUSTERS:\n",
" print(\"\\\\taskslowdown{Cluster \" + cluster.upper() + \"}{\")\n",
" df[cluster] = pandas.read_csv(DIR + \"/\" + cluster + \"_slowdown_table.csv\")\n",
" df[cluster][\"m_slow_2\"] = (df[cluster][\"s_all\"] / df[cluster][\"s_last\"]) \n",
" del df[cluster][\"s_slow\"]\n",
" del df[cluster][\"m_slow\"]\n",
" del df[cluster][\"m_all\"]\n",
" del df[cluster][\"m_last\"]\n",
" del df[cluster][\"s_all\"]\n",
" del df[cluster][\"s_last\"]\n",
" del df[cluster][\"c_zero_end\"]\n",
" del df[cluster][\"n_fsh\"]\n",
" del df[cluster][\"n_non\"]\n",
" del df[cluster][\"Unnamed: 0\"]\n",
" df[cluster][\"finished%\"] *= 100\n",
" print(df[cluster].to_latex(index=False))\n",
" print(\"}\")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"wc"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"tc"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}