{
"cells": [
{
"cell_type": "code",
"execution_count": 43,
"metadata": {
"collapsed": false,
"init_cell": false,
"run_control": {
"marked": false
}
},
"outputs": [],
"source": [
"# Enable in-notebook generation of plots\n",
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Experiments collected data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Data required to run this notebook are available for download at this link:\n",
"\n",
"https://www.dropbox.com/s/q9ulf3pusu0uzss/SchedTuneAnalysis.tar.xz?dl=0\n",
"\n",
"This archive has to be extracted from within the LISA's results folder."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Initial set of data"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false,
"hidden": true,
"hide_input": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[01;34m../../results/SchedTuneAnalysis/\u001b[00m\r\n",
"├── \u001b[01;35mboost15_cluster_freqs.png\u001b[00m\r\n",
"├── \u001b[01;35mboost15_task_util_task_ramp.png\u001b[00m\r\n",
"├── energy.json\r\n",
"├── output.log\r\n",
"├── platform.json\r\n",
"├── rt-app-task_ramp-0.log\r\n",
"├── test_00.json\r\n",
"├── trace_boost15.dat\r\n",
"├── trace_boost15.raw.txt\r\n",
"├── trace_boost15.txt\r\n",
"├── trace_boost25.dat\r\n",
"└── trace_noboost.dat\r\n",
"\r\n",
"0 directories, 12 files\r\n"
]
}
],
"source": [
"res_dir = '../../results/SchedTuneAnalysis/'\n",
"!tree {res_dir}"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true,
"hidden": true
},
"outputs": [],
"source": [
"noboost_trace = res_dir + 'trace_noboost.dat'\n",
"boost15_trace = res_dir + 'trace_boost15.dat'\n",
"boost25_trace = res_dir + 'trace_boost25.dat'\n",
"\n",
"# trace_file = noboost_trace\n",
"trace_file = boost15_trace\n",
"# trace_file = boost25_trace"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Loading support data collected from the target"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false,
"hidden": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Platform descriptio collected from the target:\n",
"{\n",
" \"nrg_model\": {\n",
" \"big\": {\n",
" \"cluster\": {\n",
" \"nrg_max\": 64\n",
" }, \n",
" \"cpu\": {\n",
" \"cap_max\": 1024, \n",
" \"nrg_max\": 616\n",
" }\n",
" }, \n",
" \"little\": {\n",
" \"cluster\": {\n",
" \"nrg_max\": 57\n",
" }, \n",
" \"cpu\": {\n",
" \"cap_max\": 447, \n",
" \"nrg_max\": 93\n",
" }\n",
" }\n",
" }, \n",
" \"clusters\": {\n",
" \"big\": [\n",
" 1, \n",
" 2\n",
" ], \n",
" \"little\": [\n",
" 0, \n",
" 3, \n",
" 4, \n",
" 5\n",
" ]\n",
" }, \n",
" \"cpus_count\": 6, \n",
" \"freqs\": {\n",
" \"big\": [\n",
" 450000, \n",
" 625000, \n",
" 800000, \n",
" 950000, \n",
" 1100000\n",
" ], \n",
" \"little\": [\n",
" 450000, \n",
" 575000, \n",
" 700000, \n",
" 775000, \n",
" 850000\n",
" ]\n",
" }, \n",
" \"topology\": [\n",
" [\n",
" 0, \n",
" 3, \n",
" 4, \n",
" 5\n",
" ], \n",
" [\n",
" 1, \n",
" 2\n",
" ]\n",
" ]\n",
"}\n"
]
}
],
"source": [
"import json\n",
"\n",
"# Load the platform information\n",
"with open('../../results/SchedTuneAnalysis/platform.json', 'r') as fh:\n",
" platform = json.load(fh)\n",
"print \"Platform descriptio collected from the target:\"\n",
"print json.dumps(platform, indent=4)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false,
"hidden": true
},
"outputs": [],
"source": [
"from trappy.stats.Topology import Topology\n",
"\n",
"# Create a topology descriptor\n",
"topology = Topology(platform['topology'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Trace analysis"
]
},
{
"cell_type": "markdown",
"metadata": {
"hidden": true
},
"source": [
"We want to ensure that the task has the expected workload:
\n",
"- LITTLE CPU bandwidth of **[10, 35 and 60]%** every **2[ms]**\n",
"- activations every **32ms**\n",
"- always **starts on a big** core"
]
},
{
"cell_type": "markdown",
"metadata": {
"hidden": true
},
"source": [
"## Trace inspection"
]
},
{
"cell_type": "markdown",
"metadata": {
"hidden": true
},
"source": [
"### Using kernelshark"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false,
"hidden": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"version = 6\r\n"
]
}
],
"source": [
"# Let's look at the trace using kernelshark...\n",
"!kernelshark {trace_file} 2>/dev/null"
]
},
{
"cell_type": "markdown",
"metadata": {
"hidden": true
},
"source": [
"- Requires a lot of interactions and hand made measurements\n",
"- We cannot easily annotate our findings to produre a sharable notebook"
]
},
{
"cell_type": "markdown",
"metadata": {
"hidden": true
},
"source": [
"### Using the TRAPpy Trace Plotter"
]
},
{
"cell_type": "markdown",
"metadata": {
"hidden": true
},
"source": [
"An overall view on the trace is still useful to get a graps on what we are looking at."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"code_folding": [],
"collapsed": false,
"hidden": true
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"
\n", " | __comm | \n", "__cpu | \n", "__pid | \n", "comm | \n", "cpu | \n", "load_avg | \n", "load_sum | \n", "period_contrib | \n", "pid | \n", "util_avg | \n", "util_est | \n", "util_sum | \n", "cluster | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Time | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
0.000065 | \n", "trace-cmd | \n", "0 | \n", "2204 | \n", "trace-cmd | \n", "0 | \n", "452 | \n", "21607277 | \n", "125 | \n", "2204 | \n", "176 | \n", "176 | \n", "8446887 | \n", "LITTLE | \n", "
0.000081 | \n", "trace-cmd | \n", "0 | \n", "2204 | \n", "trace-cmd | \n", "0 | \n", "452 | \n", "21607277 | \n", "125 | \n", "2204 | \n", "176 | \n", "176 | \n", "8446887 | \n", "LITTLE | \n", "
0.000380 | \n", "<idle> | \n", "2 | \n", "0 | \n", "sudo | \n", "2 | \n", "0 | \n", "7 | \n", "576 | \n", "2203 | \n", "0 | \n", "941 | \n", "7 | \n", "big | \n", "
0.002055 | \n", "sudo | \n", "2 | \n", "2203 | \n", "sudo | \n", "2 | \n", "14 | \n", "688425 | \n", "219 | \n", "2203 | \n", "14 | \n", "941 | \n", "688425 | \n", "big | \n", "
0.002077 | \n", "sudo | \n", "2 | \n", "2203 | \n", "sudo | \n", "2 | \n", "14 | \n", "688425 | \n", "219 | \n", "2203 | \n", "14 | \n", "14 | \n", "688425 | \n", "big | \n", "
\n", " | __comm | \n", "__cpu | \n", "__pid | \n", "cpu | \n", "capacity | \n", "max_capacity | \n", "tip_capacity | \n", "
---|---|---|---|---|---|---|---|
Time | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
0.002708 | \n", "kschedfreq:0 | \n", "4 | \n", "1489 | \n", "0 | \n", "236 | \n", "447 | \n", "357.6 | \n", "
0.002710 | \n", "kschedfreq:0 | \n", "4 | \n", "1489 | \n", "3 | \n", "236 | \n", "447 | \n", "357.6 | \n", "
0.002711 | \n", "kschedfreq:0 | \n", "4 | \n", "1489 | \n", "4 | \n", "236 | \n", "447 | \n", "357.6 | \n", "
0.002712 | \n", "kschedfreq:0 | \n", "4 | \n", "1489 | \n", "5 | \n", "236 | \n", "447 | \n", "357.6 | \n", "
0.410816 | \n", "kschedfreq:1 | \n", "2 | \n", "1490 | \n", "1 | \n", "1024 | \n", "1024 | \n", "819.2 | \n", "
\n",
" \n",
" | \n",
"\n",
" \n",
" | \n",
"
\n", " | \n", " |