{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "YouTube per-CPU CGroup residency analysis (with eas 1.3)\n", "=======================\n", "This is a run of the eas 1.3 branch from common on a wahoo device, with the following patches:\n", "```\n", "-rw-r----- 1 joelaf eng 11772 Jul 21 12:24 0001-sched-fair-streamline-find_best_target-heuristics.patch\n", "-rw-r----- 1 joelaf eng 2962 Jul 21 12:24 0002-events-add-tracepoint-for-find_best_target.patch\n", "-rw-r----- 1 joelaf eng 3307 Jul 21 12:24 0003-sched-fair-Update-signals-of-nohz-cpus-if-we-are-goi.patch\n", "-rw-r----- 1 joelaf eng 1441 Jul 21 12:24 0004-sched-fair-kick-nohz-idle-balance-for-misfit-task.patch\n", "-rw-r----- 1 joelaf eng 1424 Jul 21 12:24 0005-Revert-sched-fair-ensure-utilization-signals-are-syn.patch\n", "-rw-r----- 1 joelaf eng 1478 Jul 21 12:24 0006-sched-fair-Sync-task-util-before-EAS-wakeup.patch\n", "-rw-r----- 1 joelaf eng 3889 Jul 21 12:24 0007-sched-fair-Try-to-estimate-possible-idle-states.patch\n", "-rw-r----- 1 joelaf eng 3563 Jul 21 12:24 0008-sched-fair-Add-a-backup_cpu-to-find_best_target.patch\n", "```\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Populating the interactive namespace from numpy and matplotlib\n" ] } ], "source": [ "#!/usr/bin/env python\n", "%pylab inline\n", "import trappy\n", "from trace import Trace\n", "import logging\n", "import pandas as pd\n", "import numpy as np\n", "import os\n", "\n", "from conf import LisaLogging\n", "LisaLogging.setup(level=logging.ERROR)\n", "logging.info('#### Setup FTrace')\n", "path_to_html = \"/home/joelaf/repo/lisa-aosp/external/lisa/results/UiBench_eas13_4.4.56-g931b784e1a3f-29955-gb23d9461001d/trace.html\"" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "tr = Trace(None, path_to_html,\n", " cgroup_info = { \n", " 'cgroups': ['foreground', 'background', 'system-background', 'top-app', 'rt'],\n", " 'controller_ids': { 4: 'cpuset', 2: 'schedtune' }\n", " },\n", " events=[ 'sched_switch', 'cgroup_attach_task_devlib', 'cgroup_attach_task', 'sched_process_fork' ],\n", " normalize_time=False)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Total amount of time spent per Cgroup (schedtune)\n", "===========================\n", "(NaN is the idle task)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false, "scrolled": false }, "outputs": [ { "data": { "text/html": [ "
\n", " | cpu_0 | \n", "cpu_1 | \n", "cpu_2 | \n", "cpu_3 | \n", "cpu_4 | \n", "cpu_5 | \n", "cpu_6 | \n", "cpu_7 | \n", "total | \n", "
---|---|---|---|---|---|---|---|---|---|
schedtune | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
background | \n", "0.178679 | \n", "0.162434 | \n", "0.006303 | \n", "0.137763 | \n", "0.000000 | \n", "0.000000 | \n", "0.340880 | \n", "0.132754 | \n", "0.958813 | \n", "
foreground | \n", "4.764832 | \n", "1.649135 | \n", "0.575451 | \n", "0.279686 | \n", "0.004638 | \n", "0.612560 | \n", "0.029432 | \n", "0.041374 | \n", "7.957108 | \n", "
root | \n", "1.804184 | \n", "2.222201 | \n", "2.202443 | \n", "1.062518 | \n", "0.165631 | \n", "0.121599 | \n", "0.078268 | \n", "0.130777 | \n", "7.787621 | \n", "
top-app | \n", "0.331268 | \n", "2.307085 | \n", "0.033864 | \n", "0.008763 | \n", "1.702661 | \n", "2.928956 | \n", "0.085323 | \n", "0.015168 | \n", "7.413088 | \n", "
NaN | \n", "25.280481 | \n", "25.992496 | \n", "29.519760 | \n", "30.957460 | \n", "30.457757 | \n", "28.666548 | \n", "31.771127 | \n", "32.015897 | \n", "234.661526 | \n", "