...
 
Commits (96)
*.ipynb filter=nbstripout
*.ipynb diff=ipynb
build/
dist/
xlap.egg-info/
.ipynb_checkpoints/
\ No newline at end of file
.ipynb_checkpoints/
.venv/
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
jupyter = "*"
matplotlib = "*"
pandas = "*"
numpy = "*"
scipy = "*"
ruamel-yaml = "*"
scikit-learn = "*"
graphviz = "*"
jupyterlab = "*"
nbstripout = "*"
nbconvert = "*"
[requires]
python_version = "3.6"
This diff is collapsed.
......@@ -7,41 +7,48 @@
"# X-Lap in Action"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Imports"
"## Data Retrieval"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import logging\n",
"logger = logging.getLogger()\n",
"logger.setLevel(logging.DEBUG)\n",
"from ipywidgets import interact, interactive, fixed, interact_manual\n",
"import ipywidgets as widgets\n",
"from xlap.parse import evaluate, evaluate_side, parse_config\n",
"import xlap.analyse.jitter as jitter\n",
"from xlap.analyse.regress import linear as linear_regression\n",
"from xlap.analyse.trace import traces\n",
"from xlap.analyse.correlation import correlation\n",
"from xlap.analyse.latency import analyse\n",
"import pandas as pd\n",
"%matplotlib inline"
"from xlap.parse import evaluate, parse_config\n",
"config = parse_config()\n",
"data_files = {\n",
" \"sender\": \"rtn2018/20180417_testbed/\",\n",
" \"receiver\": \"rtn2018/20180417_testbed/\"\n",
"}\n",
"df_1GHz = evaluate(data_files[\"sender\"] + \"sender-1000000.csv\", data_files[\"receiver\"] + \"receiver-1000000.csv\", config=config, kind=0)\n",
"df_1GHz.name = \"1GHz\"\n",
"df_2GHz = evaluate(data_files[\"sender\"] + \"sender-2000000.csv\", data_files[\"receiver\"] + \"receiver-2000000.csv\", config=config, kind=0)\n",
"df_2GHz.name = \"2GHz\"\n",
"df_3GHz = evaluate(data_files[\"sender\"] + \"sender-3000000.csv\", data_files[\"receiver\"] + \"receiver-3000000.csv\", config=config, kind=0)\n",
"df_3GHz.name = \"3GHz\"\n",
"dfs = [df_1GHz, df_2GHz, df_3GHz]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data Retrieval"
"## Individual Packet Traces"
]
},
{
......@@ -50,16 +57,15 @@
"metadata": {},
"outputs": [],
"source": [
"config = parse_config()\n",
"data_files = config[\"data_files\"]\n",
"original = evaluate(data_files[\"sender\"], data_files[\"receiver\"], config=config, kind=0)"
"from xlap.analyse.trace import traces\n",
"traces(df_1GHz, config, global_xaxis=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Traces"
"## Trace Jitter Analysis"
]
},
{
......@@ -68,14 +74,15 @@
"metadata": {},
"outputs": [],
"source": [
"traces(original, config)"
"from xlap.analyse.jitter import multi_trace_jitter\n",
"multi_trace_jitter(dfs, config)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Jitter Analysis"
"## Latency Distributions"
]
},
{
......@@ -84,15 +91,25 @@
"metadata": {},
"outputs": [],
"source": [
"df = jitter.prep(original, config=config)\n",
"jitter.trace_jitter(df, threshold=500)"
"from xlap.analyse.cdf import multi_cdf\n",
"from xlap.analyse.util import colors\n",
"import copy\n",
"cfg = copy.deepcopy(config)\n",
"list(map(cfg[\"durations\"].pop, (\"Decoding\",\n",
" \"ReceiverIPC\",\n",
" \"HandlePacket\", \n",
" \"Feedback\", \n",
" \"SenderIPC\",\n",
" \"SenderEnqueued\",\n",
" \"Enqueue\")))\n",
"multi_cdf(dfs, cfg, colors=colors)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Correlation"
"## Correlation with E2E Latency"
]
},
{
......@@ -101,15 +118,15 @@
"metadata": {},
"outputs": [],
"source": [
"correlation(df[df[\"EndToEnd_D\"] < 500], config)"
"from xlap.analyse.correlation import multi_correlation\n",
"multi_correlation(dfs, config, colors=colors, figsize=(3.0,2.0), cols=4)"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"metadata": {},
"source": [
"# $\\Delta$elta\n",
"## Latency Criticality"
]
},
......@@ -119,7 +136,8 @@
"metadata": {},
"outputs": [],
"source": [
"d = analyse(original, config)"
"from xlap.analyse.latency import analyse\n",
"d = analyse(df_1GHz, config)"
]
},
{
......@@ -153,6 +171,41 @@
"source": [
"d.cfg"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Timing Behaviour"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from xlap.analyse.timing import timing_behaviour\n",
"timing_behaviour(df_1GHz, df_2GHz, config)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"timing_behaviour(df_1GHz, df_3GHz, config)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"timing_behaviour(df_2GHz, df_3GHz, config)"
]
}
],
"metadata": {
......@@ -171,21 +224,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
},
"widgets": {
"state": {
"df95aa8c42974dfeaf8e0a2c05100645": {
"views": [
{
"cell_index": 6
}
]
}
},
"version": "1.2.0"
"version": "3.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
1 40.112488 0.28655806569935959455261300
2 37.635804 0.13545612357162314105068459
3 44.867554 0.15736979554175162807913194
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
996816
analyzing CPU 1:
998867
analyzing CPU 2:
999414
analyzing CPU 3:
997363
analyzing CPU 4:
1000507
analyzing CPU 5:
999687
analyzing CPU 6:
1000234
analyzing CPU 7:
997089
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
925859
analyzing CPU 1:
1000097
analyzing CPU 2:
999960
analyzing CPU 3:
993535
analyzing CPU 4:
1000371
analyzing CPU 5:
998046
analyzing CPU 6:
993261
analyzing CPU 7:
992578
RAPL::Package energy {0}: 16.163391J
RAPL::PowerPlane0 (core) {0}: 1.458923J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 4.892883J
Time: 5.087s
Found Haswell CPU
RAPL::Package energy {0}: 23.949097J
RAPL::PowerPlane0 (core) {0}: 1.922913J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 5.827271J
Time: 5.729s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
1999921
analyzing CPU 1:
2000058
analyzing CPU 2:
1899980
analyzing CPU 3:
1999921
analyzing CPU 4:
1903125
analyzing CPU 5:
1970664
analyzing CPU 6:
1390976
analyzing CPU 7:
1978457
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
1998964
analyzing CPU 1:
1949746
analyzing CPU 2:
1915156
analyzing CPU 3:
1999921
analyzing CPU 4:
2000605
analyzing CPU 5:
1938535
analyzing CPU 6:
1998007
analyzing CPU 7:
1996093
RAPL::Package energy {0}: 15.436951J
RAPL::PowerPlane0 (core) {0}: 2.320251J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 4.621643J
Time: 4.858s
Found Haswell CPU
RAPL::Package energy {0}: 22.198853J
RAPL::PowerPlane0 (core) {0}: 2.989563J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 5.706726J
Time: 5.616s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
3000019
analyzing CPU 1:
3000019
analyzing CPU 2:
2999746
analyzing CPU 3:
2999882
analyzing CPU 4:
3000429
analyzing CPU 5:
3000156
analyzing CPU 6:
3000703
analyzing CPU 7:
3000429
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2901445
analyzing CPU 1:
2904726
analyzing CPU 2:
2873554
analyzing CPU 3:
2983886
analyzing CPU 4:
2900078
analyzing CPU 5:
2909375
analyzing CPU 6:
2860019
analyzing CPU 7:
2907050
RAPL::Package energy {0}: 21.381104J
RAPL::PowerPlane0 (core) {0}: 5.176331J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 4.532715J
Time: 4.759s
Found Haswell CPU
RAPL::Package energy {0}: 23.486450J
RAPL::PowerPlane0 (core) {0}: 4.465149J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 5.348450J
Time: 5.553s
Found Haswell CPU
gnuplot="gnuplot"
format="png"
echo "
set term $format
set output 'energy-efficiency.$format'
set boxwidth 0.5
set yrange [0:]
set xtic 1
set ylabel 'Per-package ET² (nJs²)'
set xlabel 'Processor speed (GHz)'
set style fill solid
set nokey
plot 'data.txt' using 1:3:xtic(1) with boxes" | $gnuplot
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
packets per sample: 4095
freq/kHz avg e2e latency/us total energy/J avg packet energy/mJ avg packet ET²/nJs²
======== ================== ============ ======================= ============================
1000000 171.03833943833945 40.112488 9.79547936507936507936 0.28655806569935959455261300
2000000 121.40195360195361 37.635804 9.19067252747252747252 0.13545612357162314105068459
3000000 119.84542124542125 44.867554 10.95666764346764346764 0.15736979554175162807913194
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
1005566
analyzing CPU 1:
1000097
analyzing CPU 2:
995859
analyzing CPU 3:
999003
analyzing CPU 4:
987929
analyzing CPU 5:
1000097
analyzing CPU 6:
998867
analyzing CPU 7:
999960
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
999960
analyzing CPU 1:
997910
analyzing CPU 2:
1000097
analyzing CPU 3:
3000156
analyzing CPU 4:
1000097
analyzing CPU 5:
905488
analyzing CPU 6:
2581250
analyzing CPU 7:
1005429
RAPL::Package energy {0}: 0.870178J
RAPL::PowerPlane0 (core) {0}: 0.098694J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.529358J
Time: 0.540s
Found Haswell CPU
RAPL::Package energy {0}: 5.580688J
RAPL::PowerPlane0 (core) {0}: 0.189087J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 1.984375J
Time: 2.137s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
1999921
analyzing CPU 1:
1986386
analyzing CPU 2:
1999921
analyzing CPU 3:
1989257
analyzing CPU 4:
1999921
analyzing CPU 5:
1813300
analyzing CPU 6:
2000058
analyzing CPU 7:
2000058
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2000058
analyzing CPU 1:
2000195
analyzing CPU 2:
1999921
analyzing CPU 3:
1899980
analyzing CPU 4:
1937578
analyzing CPU 5:
1818359
analyzing CPU 6:
1999921
analyzing CPU 7:
2000332
RAPL::Package energy {0}: 1.559082J
RAPL::PowerPlane0 (core) {0}: 0.370239J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.410339J
Time: 0.402s
Found Haswell CPU
RAPL::Package energy {0}: 5.509460J
RAPL::PowerPlane0 (core) {0}: 0.294189J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 1.947327J
Time: 2.127s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2956816
analyzing CPU 1:
3000019
analyzing CPU 2:
2999882
analyzing CPU 3:
3000019
analyzing CPU 4:
3000429
analyzing CPU 5:
3000019
analyzing CPU 6:
3001250
analyzing CPU 7:
3000019
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2900761
analyzing CPU 1:
2941367
analyzing CPU 2:
2899804
analyzing CPU 3:
2899941
analyzing CPU 4:
2900214
analyzing CPU 5:
3000976
analyzing CPU 6:
2962421
analyzing CPU 7:
2913886
RAPL::Package energy {0}: 0.902710J
RAPL::PowerPlane0 (core) {0}: 0.266296J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.333801J
Time: 0.342s
Found Haswell CPU
RAPL::Package energy {0}: 3.613647J
RAPL::PowerPlane0 (core) {0}: 0.369873J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 1.892212J
Time: 2.119s
Found Haswell CPU
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
999960
analyzing CPU 1:
997773
analyzing CPU 2:
998593
analyzing CPU 3:
992304
analyzing CPU 4:
1000097
analyzing CPU 5:
999960
analyzing CPU 6:
999003
analyzing CPU 7:
999960
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
980000
analyzing CPU 1:
999140
analyzing CPU 2:
999960
analyzing CPU 3:
992851
analyzing CPU 4:
1000507
analyzing CPU 5:
999414
analyzing CPU 6:
1165253
analyzing CPU 7:
3001386
RAPL::Package energy {0}: 1.098145J
RAPL::PowerPlane0 (core) {0}: 0.086792J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.536743J
Time: 0.545s
Found Haswell CPU
RAPL::Package energy {0}: 4.516418J
RAPL::PowerPlane0 (core) {0}: 0.168518J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 1.967102J
Time: 2.135s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
1999921
analyzing CPU 1:
1999921
analyzing CPU 2:
1999921
analyzing CPU 3:
1999921
analyzing CPU 4:
1999921
analyzing CPU 5:
2000605
analyzing CPU 6:
2000195
analyzing CPU 7:
2000058
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2000195
analyzing CPU 1:
1965742
analyzing CPU 2:
1999921
analyzing CPU 3:
1995546
analyzing CPU 4:
1900117
analyzing CPU 5:
2000058
analyzing CPU 6:
1975859
analyzing CPU 7:
2000058
RAPL::Package energy {0}: 1.880432J
RAPL::PowerPlane0 (core) {0}: 0.245728J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.388733J
Time: 0.393s
Found Haswell CPU
RAPL::Package energy {0}: 3.394165J
RAPL::PowerPlane0 (core) {0}: 0.222961J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 1.916870J
Time: 2.123s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2985937
analyzing CPU 1:
3000019
analyzing CPU 2:
3000019
analyzing CPU 3:
3000019
analyzing CPU 4:
3000429
analyzing CPU 5:
3000566
analyzing CPU 6:
3000839
analyzing CPU 7:
3000019
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2439199
analyzing CPU 1:
2908417
analyzing CPU 2:
2899941
analyzing CPU 3:
2899941
analyzing CPU 4:
2901035
analyzing CPU 5:
2914707
analyzing CPU 6:
2915937
analyzing CPU 7:
2976777
RAPL::Package energy {0}: 1.032043J
RAPL::PowerPlane0 (core) {0}: 0.267639J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.346741J
Time: 0.350s
Found Haswell CPU
RAPL::Package energy {0}: 3.479919J
RAPL::PowerPlane0 (core) {0}: 0.330322J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 1.913147J
Time: 2.122s
Found Haswell CPU
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
999960
analyzing CPU 1:
999003
analyzing CPU 2:
999960
analyzing CPU 3:
999960
analyzing CPU 4:
1000234
analyzing CPU 5:
1000234
analyzing CPU 6:
1000234
analyzing CPU 7:
999960
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
999960
analyzing CPU 1:
999960
analyzing CPU 2:
999960
analyzing CPU 3:
999960
analyzing CPU 4:
1000097
analyzing CPU 5:
1038652
analyzing CPU 6:
3001796
analyzing CPU 7:
1051503
RAPL::Package energy {0}: 1.036438J
RAPL::PowerPlane0 (core) {0}: 0.098511J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.543701J
Time: 0.553s
Found Haswell CPU
RAPL::Package energy {0}: 7.184692J
RAPL::PowerPlane0 (core) {0}: 0.268005J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 2.001587J
Time: 2.143s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
1999921
analyzing CPU 1:
2000058
analyzing CPU 2:
1999921
analyzing CPU 3:
1999375
analyzing CPU 4:
2000058
analyzing CPU 5:
2000742
analyzing CPU 6:
2000058
analyzing CPU 7:
1999375
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
1899980
analyzing CPU 1:
1905312
analyzing CPU 2:
1899980
analyzing CPU 3:
1903945
analyzing CPU 4:
1900390
analyzing CPU 5:
1902851
analyzing CPU 6:
1975312
analyzing CPU 7:
1132851
RAPL::Package energy {0}: 0.947144J
RAPL::PowerPlane0 (core) {0}: 0.175781J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.400391J
Time: 0.410s
Found Haswell CPU
RAPL::Package energy {0}: 4.487610J
RAPL::PowerPlane0 (core) {0}: 0.260498J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 1.959290J
Time: 2.141s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
3000019
analyzing CPU 1:
3000019
analyzing CPU 2:
3000156
analyzing CPU 3:
3000019
analyzing CPU 4:
3000839
analyzing CPU 5:
3000429
analyzing CPU 6:
3000292
analyzing CPU 7:
3000976
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2914707
analyzing CPU 1:
2908417
analyzing CPU 2:
2975136
analyzing CPU 3:
3000156
analyzing CPU 4:
2901171
analyzing CPU 5:
3000156
analyzing CPU 6:
3001660
analyzing CPU 7:
3000839
RAPL::Package energy {0}: 1.170532J
RAPL::PowerPlane0 (core) {0}: 0.287659J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.362305J
Time: 0.367s
Found Haswell CPU
RAPL::Package energy {0}: 3.496399J
RAPL::PowerPlane0 (core) {0}: 0.312683J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 1.928345J
Time: 2.138s
Found Haswell CPU
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
# Script to "fix" the cpu performance to a given frequency
self="$0"
## sudo cpupower -c 0-3 frequency-set -d 1000000 -u 1000000 && sudo cpupower -c 0-3 frequency-info -f
die() {
echo >&2 "$@"
exit 1
}
need() {
which "$1" >/dev/null 2>/dev/null || die "need executable: $1"
}
need cpupower
need nproc
need sleep
need cat
need id
uid=$(id -u)
numproc=$(nproc)
maxproc=$(($numproc - 1))
if [ "$uid" -ne 0 ]; then
die "not root"
fi
if [ -z "$1" ]; then
min=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq)
max=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq)
else
min="$1"
max="$1"
fi
cpupower -c "0-$maxproc" frequency-set -d "$min" -u "$max"
sleep 1
cpupower -c "0-$maxproc" frequency-info -f
#!/bin/sh
# activate or deactivate turbo boost
self="$0"
die() {
echo >&2 "$@"
exit 1
}
usage() {
die "usage: $self [a|d]"
}
uid=$(id -u)
if [ "$uid" -ne 0 ]; then
die "not root"
fi
case "$1" in
a*) echo 0 >/sys/devices/system/cpu/intel_pstate/no_turbo ;;
d*) echo 1 >/sys/devices/system/cpu/intel_pstate/no_turbo ;;
*) usage ;;
esac
#define XLAP
#include "xlap.h"
#include <stdatomic.h>
void XlapTimestampTableDumpHeader(FILE *out)
{
......
......@@ -5,6 +5,13 @@
#include <stdint.h>
#include <time.h>
#ifndef __cplusplus
# include <stdatomic.h>
#else
# include <atomic>
# define _Atomic(X) std::atomic< X >
#endif
/*
* Each timestamp contains both a cycle value and a time value, but some values
* might remain zero
......@@ -64,6 +71,7 @@ typedef enum XlapTimestampPacketKind {
ts_data_packet = 0,
ts_any_packet = 0,
ts_redundancy_packet = 1,
ts_feedback_packet = 2
} XlapTimestampPacketKind;
/*
......@@ -102,14 +110,12 @@ typedef struct XlapTimestampPlaceholder {
#else /* XLAP */
typedef char XlapTimestampPlaceholder;
#endif
/*
* update the clock value of a timestamp by setting an explicit value
*
* This macro will cause a SIGSEGV if the application does not install a
* timestamp table to the socket.
*/
#ifdef XLAP
# define XlapTimeStampValue(sck, kind, seqno, id, value) do { \
atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire)->rows[(seqno) % TS_ROWS].time[ts_##id].actual.t = value; \
......
data_files:
sender: "nsdi2018/results/2018_02_14_12_57_01_sender.csv"
receiver: "nsdi2018/results/2018_02_14_12_57_01_receiver.csv"
sender: "rtn2018/20180417_testbed/sender.csv"
receiver: "rtn2018/20180417_testbed/receiver.csv"
threads:
- app_send
- trans_send
......@@ -39,6 +39,14 @@ stamps:
Source: sender
Thread: app_send
Type: time
PrrtSendPacketStart:
Source: sender
Thread: trans_send
Type: none
PrrtSendPacketEnd:
Source: sender
Thread: trans_send
Type: none
PrrtTransmitStart:
Source: sender
......
import math
import numpy as np
from .util import cdf, extract_durations
import matplotlib.pyplot as plt
def multi_cdf(dfs, config, export=False, file_name="CDF.pdf", figsize= (4,4), cols=3, colors=None):
durations = extract_durations(config)
durations.remove("EndToEnd")
rows = int(math.ceil(len(durations) / cols))
items = len(durations)
fig, axes = plt.subplots(nrows=rows, ncols=cols)
fig.set_size_inches(figsize[0] * cols, figsize[1] * rows, forward=True)
names = []
for df in dfs:
names.append(df.name)
for idx, duration in enumerate(durations):
if items > cols:
ax = axes[idx // cols, idx % cols]
else:
ax = axes[idx]
for i, df in enumerate(dfs):
kwargs = dict()
if colors is not None:
kwargs["color"] = colors[i]
cdf(df[duration + "_D"], grid=True, ax=ax, **kwargs)
if(idx == 0):
ax.legend(names)
ax.set_ylabel("CDF")
ax.set_xlabel("{} [us]".format(duration))
plt.subplots_adjust(wspace=0.3,hspace=0.3)
plt.tight_layout()
if export and file_name is not None:
fig.savefig(file_name)
plt.show()
......@@ -3,25 +3,55 @@ import matplotlib.pyplot as plt
from xlap.analyse.util import extract_durations
def correlation(data_frame, config, export=False, file_name="Correlation.pdf"):
durations = [x + "_D" for x in extract_durations(config)]
durations.remove("EndToEnd_D")
def corr(df, duration, grid=False, ax=None, color="black", marker="+"):
df.plot.scatter(ax=ax,
y="EndToEnd_D",
x=duration + "_D",
grid=grid,
loglog=True,
marker=marker,
color=color)
def corr_multi(dfs, duration, colors=None, **kwargs):
if colors is None:
colors = ["green","blue","orange"]
markers = ["v", "^", ">", "<"]
for idf, df in enumerate(dfs):
corr(df, duration, color=colors[idf % len(colors)],
marker=markers[idf % len(markers)], **kwargs)
kwargs["ax"].set_xlabel("{} [us]".format(duration))
def multi_correlation(dfs, config, export=False, file_name="MultiCorrelation.pdf", figsize=(5.5,5.5), cols=2, colors=None, **kwargs):
durations = extract_durations(config)
durations.remove("EndToEnd")
cols = 4
rows = int(math.ceil(len(durations) / cols))
items = len(durations)
fig, axes = plt.subplots(nrows=rows, ncols=cols)
fig.set_size_inches(4 * cols, 3.5 * rows, forward=True)
fig.set_size_inches(figsize[0] * cols, figsize[1] * rows, forward=True)
names = []
for df in dfs:
if hasattr(df, "name"):
names.append(df.name)
i = 0
for duration in durations:
ax = data_frame.plot.scatter(ax=axes[i // cols, i % cols], y="EndToEnd_D", x=duration, grid=True, marker="+",
color="black")
ax.set_ylabel("EndToEnd [us]")
ax.margins(0.1, 0.1)
ax.set_xlabel("{} [us]".format(duration.replace("_D", "")))
i += 1
for idx, duration in enumerate(durations):